跳到主要内容

sing-box 编译整理



git clone
进入项目根目录

git checkout v1.11.4

git submodule update --init --recursive

还是项目根目录
创建目录
项目根目录/../sing-box-for-android/app/ibs
make lib_install

make lib_android

go run ./cmd/internal/build_libbox -target android

或修改

copyPath = filepath.Join("clients","android", "app", "libs")


gomobile all args: [bind -v -target android -androidapi 21 -javapkg=io.nekohasekai -libname=box -trimpath -buildvcs=false -ldflags -X github.com/sagernet/sing-box/constant.Version=1.11.4 -s -w -buildid= -tags with_gvisor,with_quic,with_wireguard,with_ech,with_utls,with_clash_api ./experimental/libbox]