diff --git a/Makefile b/Makefile index 8f1b59d..73ded41 100644 --- a/Makefile +++ b/Makefile @@ -11,8 +11,8 @@ CGO_ENABLED := 0 GO111MODULE := on LDFLAGS += -w -s -buildid= -LDFLAGS += -X "$(MODULE)/version.Version=$(BUILD_VERSION)" -LDFLAGS += -X "$(MODULE)/version.GitCommit=$(BUILD_COMMIT)" +LDFLAGS += -X "$(MODULE)/internal/version.Version=$(BUILD_VERSION)" +LDFLAGS += -X "$(MODULE)/internal/version.GitCommit=$(BUILD_COMMIT)" GO_BUILD = GO111MODULE=$(GO111MODULE) CGO_ENABLED=$(CGO_ENABLED) \ go build $(BUILD_FLAGS) -ldflags '$(LDFLAGS)' -tags '$(BUILD_TAGS)' -trimpath diff --git a/engine/engine.go b/engine/engine.go index dddd501..5ed5228 100644 --- a/engine/engine.go +++ b/engine/engine.go @@ -9,12 +9,11 @@ import ( "github.com/xjasonlyu/tun2socks/v2/component/dialer" "github.com/xjasonlyu/tun2socks/v2/core/device" "github.com/xjasonlyu/tun2socks/v2/core/stack" + "github.com/xjasonlyu/tun2socks/v2/internal/version" "github.com/xjasonlyu/tun2socks/v2/log" "github.com/xjasonlyu/tun2socks/v2/proxy" "github.com/xjasonlyu/tun2socks/v2/stats" "github.com/xjasonlyu/tun2socks/v2/tunnel" - "github.com/xjasonlyu/tun2socks/v2/version" - "gopkg.in/yaml.v3" ) diff --git a/version/version.go b/internal/version/version.go similarity index 100% rename from version/version.go rename to internal/version/version.go diff --git a/stats/server.go b/stats/server.go index fdcbfb3..9a1b955 100644 --- a/stats/server.go +++ b/stats/server.go @@ -10,9 +10,9 @@ import ( "github.com/xjasonlyu/tun2socks/v2/internal/debug" "github.com/xjasonlyu/tun2socks/v2/internal/module" + V "github.com/xjasonlyu/tun2socks/v2/internal/version" "github.com/xjasonlyu/tun2socks/v2/log" "github.com/xjasonlyu/tun2socks/v2/tunnel/statistic" - V "github.com/xjasonlyu/tun2socks/v2/version" "github.com/go-chi/chi/v5" "github.com/go-chi/cors"