diff --git a/.gitignore b/.gitignore index 4e0ab31..2cc69a3 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,7 @@ __debug_bin* *.pdf bin upx -gotools +go2 *.exe fyne_metadata_init.go fyne.syso diff --git a/Dockerfile b/Dockerfile index 5901774..e692ce2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,7 +16,7 @@ COPY --from=tonistiigi/xx:golang / / ARG TARGETOS TARGETARCH TARGETVARIANT RUN echo 111111111111 -COPY gotools /go/src/gotools +COPY go2 /go/src/go2 COPY goodlink2 /go/src/goodlink2 RUN --mount=target=. \ diff --git a/Makefile b/Makefile index e3e1d15..c35d3a1 100644 --- a/Makefile +++ b/Makefile @@ -6,9 +6,9 @@ BuildTime=$(shell date +'%Y-%m-%d %H:%M:%S') GOBUILD=GO111MODULE=on \ GOPROXY="https://goproxy.cn,direct" \ go build -trimpath -ldflags \ - '-X "gotools.GitCommitLog=$(GitCommitLog)" \ - -X "gotools.GitStatus=$(GitStatus)" \ - -X "gotools.BuildTime=$(BuildTime)" \ + '-X "go2.GitCommitLog=$(GitCommitLog)" \ + -X "go2.GitStatus=$(GitStatus)" \ + -X "go2.BuildTime=$(BuildTime)" \ -w -s -buildid=' PLATFORM_LIST = \ diff --git a/build.sh b/build.sh index 11aed18..2b6a8b7 100755 --- a/build.sh +++ b/build.sh @@ -2,8 +2,8 @@ set -x -rm -rf gotools goodlink2 -cp -r ../gotools . +rm -rf go2 goodlink2 +cp -r ../go2 . cp -r ../goodlink2 . if [ -e "/usr/bin/upx" ]; then @@ -26,7 +26,7 @@ docker pull tonistiigi/xx:golang docker buildx build --platform linux/amd64 -t dev/goodlink:latest . -rm -rf gotools goodlink2 upx +rm -rf go2 goodlink2 upx sed -i "/$BUILD_TIME/s/$BUILD_TIME/111111111111/g" Dockerfile diff --git a/config/args.go b/config/args.go index f5376df..bf20434 100644 --- a/config/args.go +++ b/config/args.go @@ -3,7 +3,7 @@ package config import ( "flag" "fmt" - "gotools" + "go2" "os" ) @@ -54,7 +54,7 @@ func Help(ver string) { if *v { fmt.Printf("Version: %s\n", ver) - fmt.Print(gotools.BuildVersion()) + fmt.Print(go2.BuildVersion()) os.Exit(0) } } diff --git a/config/config.go b/config/config.go index 1f82a7c..1b5b59b 100644 --- a/config/config.go +++ b/config/config.go @@ -3,8 +3,8 @@ package config import ( "crypto/tls" "encoding/json" + "go2" "goodlink/aes" - "gotools" "io" "net/http" "time" @@ -38,7 +38,7 @@ func Init() error { var err error var resp *http.Response - if res = gotools.Utils().FileReadAll("config.json"); res == nil { + if res = go2.Utils().FileReadAll("config.json"); res == nil { client := &http.Client{ Transport: &http.Transport{ TLSClientConfig: &tls.Config{ @@ -70,8 +70,8 @@ func Init() error { body, _ := json.Marshal(configInfo) temp3 := aes.Encrypt(body, "goodlink") - gotools.Utils().FileDel("config.json") - gotools.Utils().FileAppend("config.json", []byte(temp3)) + go2.Utils().FileDel("config.json") + go2.Utils().FileAppend("config.json", []byte(temp3)) */ return nil } diff --git a/go.mod b/go.mod index 3acbd25..c653f4c 100644 --- a/go.mod +++ b/go.mod @@ -17,7 +17,7 @@ require ( golang.org/x/sys v0.34.0 golang.zx2c4.com/wireguard v0.0.0-20250521234502-f333402bd9cb goodlink2 v0.0.0 - gotools v0.0.0 + go2 v0.0.0 gvisor.dev/gvisor v0.0.0-20250806010417-2099bc1c6a2e ) @@ -92,7 +92,7 @@ require ( gopkg.in/yaml.v3 v3.0.1 // indirect ) -replace gotools => ../gotools +replace go2 => ../go2 replace goodlink2 => ../goodlink2 diff --git a/netstack/setup_windows.go b/netstack/setup_windows.go index 1f2c469..0d9e007 100644 --- a/netstack/setup_windows.go +++ b/netstack/setup_windows.go @@ -5,8 +5,8 @@ package netstack import ( "crypto/tls" "fmt" + "go2" "goodlink/winipcfg" - "gotools" "io" "net/http" "net/netip" @@ -70,7 +70,7 @@ func InitWintunDll() error { return err } - gotools.Utils().FileAppend("wintun.dll", res) + go2.Utils().FileAppend("wintun.dll", res) return nil } diff --git a/ui2/start.go b/ui2/start.go index 441187b..e9de6eb 100644 --- a/ui2/start.go +++ b/ui2/start.go @@ -4,7 +4,7 @@ package ui2 import ( "encoding/json" - "gotools" + "go2" "log" "os" "sync" @@ -89,7 +89,7 @@ func start_button_click() { }) log.Println(string(configByte)) os.Remove("goodlink.json") - gotools.Utils().FileAppend("goodlink.json", configByte) + go2.Utils().FileAppend("goodlink.json", configByte) } switch m_stats_start_button { diff --git a/ui2/ui.go b/ui2/ui.go index 17d3e01..53ea5d1 100644 --- a/ui2/ui.go +++ b/ui2/ui.go @@ -4,7 +4,7 @@ package ui2 import ( "encoding/json" - "gotools" + "go2" "log" "goodlink/config" @@ -37,7 +37,7 @@ const ( func GetMainUI(myWindow *fyne.Window) *fyne.Container { var configInfo config.ConfigInfo - json.Unmarshal(gotools.Utils().FileReadAll("goodlink.json"), &configInfo) + json.Unmarshal(go2.Utils().FileReadAll("goodlink.json"), &configInfo) log.Println(configInfo) m_validated_key = widget.NewEntry()