Files
netch/Other/tun2socks/build.ps1
2021-10-04 22:35:19 +08:00

15 lines
400 B
PowerShell

Set-Location (Split-Path $MyInvocation.MyCommand.Path -Parent)
git clone https://github.com/xjasonlyu/tun2socks -b 'v2.3.1-1' src
if ( -Not $? ) {
exit $lastExitCode
}
Set-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'
exit $lastExitCode