Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.23.1
toolchain go1.23.6

require (
github.com/matsuridayo/libneko v1.0.0 // replaced
github.com/matsuridayo/libneko v0.0.0-20240702024904-1c47a3af7199
github.com/miekg/dns v1.1.63
github.com/oschwald/maxminddb-golang v1.12.0 // indirect
github.com/sagernet/sing v0.6.6-0.20250406121928-926a5a1e8bb7
Expand Down Expand Up @@ -88,8 +88,6 @@ require (
lukechampine.com/blake3 v1.3.0 // indirect
)

replace github.com/matsuridayo/libneko => ./libneko

replace github.com/sagernet/sing-box => ./sing-box
replace github.com/sagernet/sing-box => github.com/matsuridayo/sing-box v0.0.0-20250410121602-01b72e129794

replace github.com/go-chi/chi/v5 v5.2.1 => github.com/go-chi/chi/v5 v5.2.2
4 changes: 4 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ github.com/libdns/libdns v0.2.2 h1:O6ws7bAfRPaBsgAYt8MDe2HcNBGC29hkZ9MX2eUSX3s=
github.com/libdns/libdns v0.2.2/go.mod h1:4Bj9+5CQiNMVGf87wjX4CY3HQJypUHRuLvlsfsZqLWQ=
github.com/logrusorgru/aurora v2.0.3+incompatible h1:tOpm7WcpBTn4fjmVfgpQq0EfczGlG91VSDkswnjF5A8=
github.com/logrusorgru/aurora v2.0.3+incompatible/go.mod h1:7rIyQOR62GCctdiQpZ/zOJlFyk6y+94wXzv6RNZgaR4=
github.com/matsuridayo/libneko v0.0.0-20240702024904-1c47a3af7199 h1:zv8GdEqhTXnn52/svG9i3aQxAXRLxXK97gZpHoNUUYM=
github.com/matsuridayo/libneko v0.0.0-20240702024904-1c47a3af7199/go.mod h1:IRO07Queptz/rGFvEW+3Hmwpx7MCup6WiDs4p5jMt4g=
github.com/matsuridayo/sing-box v0.0.0-20250410121602-01b72e129794 h1:maFFS/T1I9tASm8CQILH/0fH6d7Lm0iql2P/UMlGMVo=
github.com/matsuridayo/sing-box v0.0.0-20250410121602-01b72e129794/go.mod h1:RLRdTK1idH4dzKVl0KfPyPfF5grTw71+JpI2M/kj/OE=
github.com/mdlayher/netlink v1.7.2 h1:/UtM3ofJap7Vl4QWCPDGXY8d3GIY2UGSDbK+QWmY8/g=
github.com/mdlayher/netlink v1.7.2/go.mod h1:xraEF7uJbxLhc5fpHL4cPe221LI2bdttWlU+ZGLfQSw=
github.com/mdlayher/socket v0.4.1 h1:eM9y2/jlbs1M615oshPQOHZzj6R6wMT7bX5NPiQvn2U=
Expand Down
13 changes: 6 additions & 7 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,27 @@ set -e

source $SCRIPT_DIR/env.sh

bash $SCRIPT_DIR/sources.sh

if [ -z "$GOPATH" ]; then
GOPATH=$(go env GOPATH)
GOPATH=$(go env GOPATH)
fi

PATH="$PATH:$GOPATH/bin"
GOMOBILE_VERSION="v0.0.0-20231127183840-76ac6878050a"
GOMOBILE_URL=github.com/sagernet/gomobile
GOMOBILE_VERSION="v0.1.4"

cd "$SCRIPT_DIR/../"

# Install gomobile
if [ ! -f "$GOPATH/bin/gomobile" ]; then
go get -v "golang.org/x/mobile@$GOMOBILE_VERSION"
go install -v "$GOPATH/pkg/mod/golang.org/x/mobile@$GOMOBILE_VERSION/cmd/gomobile"
go get -v "$GOMOBILE_URL@$GOMOBILE_VERSION"
go install -v "$GOPATH/pkg/mod/$GOMOBILE_URL@$GOMOBILE_VERSION/cmd/gomobile"
fi

gomobile init
gomobile bind -v \
-androidapi 21 \
-trimpath \
-ldflags='-s -w' \
-ldflags='-s -w -buildid=' \
-tags='with_conntrack,with_gvisor,with_quic,with_wireguard,with_utls,with_clash_api,with_ech' .

rm -v "$GOPATH/bin/gomobile" "$GOPATH/bin/gobind" "$SCRIPT_DIR/../libcore-sources.jar"
6 changes: 0 additions & 6 deletions scripts/env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ if [ -z "$ANDROID_HOME" ]; then
fi

export ANDROID_NDK_HOME="$ANDROID_HOME/ndk/25.2.9519653"
export NDK="$ANDROID_NDK_HOME"

if [[ ! -f "$ANDROID_NDK_HOME/source.properties" ]]; then
echo "ERROR: Android NDK not found!"
exit 1
fi

DEPS=$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin

Expand Down
25 changes: 0 additions & 25 deletions scripts/sources.sh

This file was deleted.