diff --git a/tunnel/tools/libwg-go/Makefile b/tunnel/tools/libwg-go/Makefile index 427bfdc3..82c85db8 100644 --- a/tunnel/tools/libwg-go/Makefile +++ b/tunnel/tools/libwg-go/Makefile @@ -47,6 +47,7 @@ $(BUILDDIR)/go-$(GO_VERSION)/.prepared: $(GRADLE_USER_HOME)/caches/golang/$(GO_T $(DESTDIR)/libwg-go.so: export PATH := $(BUILDDIR)/go-$(GO_VERSION)/bin/:$(PATH) $(DESTDIR)/libwg-go.so: $(BUILDDIR)/go-$(GO_VERSION)/.prepared go.mod - go build -tags linux -ldflags="-X golang.zx2c4.com/wireguard/ipc.socketDirectory=/data/data/$(ANDROID_PACKAGE_NAME)/cache/wireguard -buildid=" -v -trimpath -buildvcs=false -o "$@" -buildmode c-shared + #go mod tidy + go build -tags linux -ldflags="-X gitea.hbanafa.com/hesham/wireguard-go/wireguard/ipc.socketDirectory=/data/data/$(ANDROID_PACKAGE_NAME)/cache/wireguard -buildid=" -v -trimpath -buildvcs=false -o "$@" -buildmode c-shared .DELETE_ON_ERROR: diff --git a/tunnel/tools/libwg-go/api-android.go b/tunnel/tools/libwg-go/api-android.go index d47c5d76..c7a5a079 100644 --- a/tunnel/tools/libwg-go/api-android.go +++ b/tunnel/tools/libwg-go/api-android.go @@ -21,10 +21,10 @@ import ( "unsafe" "golang.org/x/sys/unix" - "golang.zx2c4.com/wireguard/conn" - "golang.zx2c4.com/wireguard/device" - "golang.zx2c4.com/wireguard/ipc" - "golang.zx2c4.com/wireguard/tun" + "gitea.hbanafa.com/hesham/wireguard-go/conn" + "gitea.hbanafa.com/hesham/wireguard-go/device" + "gitea.hbanafa.com/hesham/wireguard-go/ipc" + "gitea.hbanafa.com/hesham/wireguard-go/tun" ) type AndroidLogger struct { @@ -213,7 +213,7 @@ func wgVersion() *C.char { return C.CString("unknown") } for _, dep := range info.Deps { - if dep.Path == "golang.zx2c4.com/wireguard" { + if dep.Path == "gitea.hbanafa.com/hesham/wireguard-go" { parts := strings.Split(dep.Version, "-") if len(parts) == 3 && len(parts[2]) == 12 { return C.CString(parts[2][:7]) diff --git a/tunnel/tools/libwg-go/go.mod b/tunnel/tools/libwg-go/go.mod index 9f9381ff..57b49b07 100644 --- a/tunnel/tools/libwg-go/go.mod +++ b/tunnel/tools/libwg-go/go.mod @@ -1,10 +1,10 @@ -module golang.zx2c4.com/wireguard/android +module gitea.hbanafa.com/hesham/wireguard-andoird go 1.20 require ( + gitea.hbanafa.com/hesham/wireguard-go v0.0.0-20231022001213-2e0774f246fb golang.org/x/sys v0.13.0 - golang.zx2c4.com/wireguard v0.0.0-20231022001213-2e0774f246fb ) require (