diff --git a/Other/tun2socks/build.ps1 b/Other/tun2socks/build.ps1 index 0f731929..7d310b84 100644 --- a/Other/tun2socks/build.ps1 +++ b/Other/tun2socks/build.ps1 @@ -1,11 +1,21 @@ Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) +git clone https://github.com/xjasonlyu/tun2socks -b 'v2.3.0' src +if ( -Not $? ) { + Pop-Location + exit $lastExitCode +} +Push-Location src + $Env:CGO_ENABLED='0' $Env:GOROOT_FINAL='/usr' $Env:GOOS='windows' $Env:GOARCH='amd64' -go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\release\tun2socks.exe' +go build -a -trimpath -asmflags '-s -w' -ldflags '-s -w' -o '..\..\release\tun2socks.exe' Pop-Location -exit $lastExitCode +rm -Recurse -Force src + +Pop-Location +exit $lastExitCode \ No newline at end of file diff --git a/Other/tun2socks/deps.ps1 b/Other/tun2socks/deps.ps1 index f65581a1..e69de29b 100644 --- a/Other/tun2socks/deps.ps1 +++ b/Other/tun2socks/deps.ps1 @@ -1,8 +0,0 @@ -Push-Location (Split-Path $MyInvocation.MyCommand.Path -Parent) - -rm -Force go.* -go mod init tun2socks -go mod tidy - -Pop-Location -exit $lastExitCode diff --git a/Other/tun2socks/go.mod b/Other/tun2socks/go.mod deleted file mode 100644 index 344c97f8..00000000 --- a/Other/tun2socks/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module tun2socks - -go 1.17 diff --git a/Other/tun2socks/main.go b/Other/tun2socks/main.go deleted file mode 100644 index fbdbe4a2..00000000 --- a/Other/tun2socks/main.go +++ /dev/null @@ -1,5 +0,0 @@ -package main - -func main() { - -}