Skip to content

源码编译

[email protected] edited this page Aug 26, 2024 · 2 revisions

Set up a proxy in Go to avoid network problems

go env -w GOPROXY=https://goproxy.cn,direct

Install dependencies in the Go source code

go get golang.org/x/text/encoding/unicode
go get golang.org/x/text/encoding/unicode
go get github.com/Binject/debug/pe
go get github.com/Ne0nd0g/go-clr
go get github.com/andreburgaud/[email protected]
go get github.com/kbinani/screenshot
go get github.com/shirou/gopsutil/net
go get github.com/shirou/gopsutil/process
go get github.com/togettoyou/wsc
go get github.com/xtaci/smux

1. Windows x64 AMD

set GOOS=windows
set GOARCH=amd64
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_64.exe main.go

2.Windows x86 AMD

set GOOS=windows
set GOARCH=386
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_86.exe main.go

3.Linux x64 ARM

set GOOS=linux
set GOARCH=arm64
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_64 main.go

4.Linux x86 ARM

set GOOS=darwin
set GOARCH=arm
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_86 main.go

5.MacOS x64 ARM

set GOOS=darwin
set GOARCH=arm64
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_64 main.go

6.MacOSx86 ARM

set GOOS=darwin
set GOARCH=arm
go build -a -ldflags="-s -w" -installsuffix cgo -o Main_86 main.go
Clone this wiki locally