diff --git a/app/dns/fakedns/fakedns_test.go b/app/dns/fakedns/fakedns_test.go index 7b37f4a84..9df481506 100644 --- a/app/dns/fakedns/fakedns_test.go +++ b/app/dns/fakedns/fakedns_test.go @@ -6,7 +6,6 @@ import ( "testing" "github.com/stretchr/testify/assert" - "golang.org/x/sync/errgroup" "github.com/v2fly/v2ray-core/v5/common" diff --git a/functions.go b/functions.go index 831f513b5..a3a09958f 100644 --- a/functions.go +++ b/functions.go @@ -4,9 +4,8 @@ import ( "bytes" "context" - "github.com/v2fly/v2ray-core/v5/common/environment/envctx" - "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/common/environment/envctx" "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/features/routing" "github.com/v2fly/v2ray-core/v5/transport/internet/udp" diff --git a/infra/conf/synthetic/router/router_test.go b/infra/conf/synthetic/router/router_test.go index c54b4791c..31ea8142e 100644 --- a/infra/conf/synthetic/router/router_test.go +++ b/infra/conf/synthetic/router/router_test.go @@ -13,8 +13,6 @@ import ( "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/common/serial" "github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist" - - // Geo loaders _ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative" _ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard" router2 "github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/router" diff --git a/infra/conf/v4/v2ray_test.go b/infra/conf/v4/v2ray_test.go index 0bfcb7ec5..e9726fca7 100644 --- a/infra/conf/v4/v2ray_test.go +++ b/infra/conf/v4/v2ray_test.go @@ -21,8 +21,6 @@ import ( "github.com/v2fly/v2ray-core/v5/common/serial" "github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/muxcfg" "github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist" - - // Geo loaders _ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative" _ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard" v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4" diff --git a/infra/vformat/main.go b/infra/vformat/main.go index 6e895e59f..30197420c 100644 --- a/infra/vformat/main.go +++ b/infra/vformat/main.go @@ -170,8 +170,12 @@ func main() { } goimportsArgs := []string{ - "-w", - "-local", "github.com/v2fly/v2ray-core", + "write", + "--NoInlineComments", + "--NoPrefixComments", + "--Section", "Standard", + "--Section", "Default", + "--Section", "pkgPrefix(github.com/v2fly/v2ray-core)", } RunMany(gofmt, gofmtArgs, rawFilesSlice) diff --git a/main/v2binding/v2binding.go b/main/v2binding/v2binding.go index 67b2820fc..d94278310 100644 --- a/main/v2binding/v2binding.go +++ b/main/v2binding/v2binding.go @@ -12,8 +12,6 @@ import ( "github.com/v2fly/v2ray-core/v5/app/router" "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/common/serial" - - // Initialization _ "github.com/v2fly/v2ray-core/v5/main/distro/all" "github.com/v2fly/v2ray-core/v5/proxy/blackhole" "github.com/v2fly/v2ray-core/v5/proxy/dokodemo" diff --git a/proxy/socks/client.go b/proxy/socks/client.go index 4347010d7..31d5f268c 100644 --- a/proxy/socks/client.go +++ b/proxy/socks/client.go @@ -4,13 +4,11 @@ import ( "context" "time" - "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" - "github.com/v2fly/v2ray-core/v5/transport/internet/udp" - core "github.com/v2fly/v2ray-core/v5" "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/buf" "github.com/v2fly/v2ray-core/v5/common/net" + "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "github.com/v2fly/v2ray-core/v5/common/protocol" "github.com/v2fly/v2ray-core/v5/common/retry" "github.com/v2fly/v2ray-core/v5/common/session" @@ -20,6 +18,7 @@ import ( "github.com/v2fly/v2ray-core/v5/features/policy" "github.com/v2fly/v2ray-core/v5/transport" "github.com/v2fly/v2ray-core/v5/transport/internet" + "github.com/v2fly/v2ray-core/v5/transport/internet/udp" ) // Client is a Socks5 client. diff --git a/proxy/vlite/inbound/inbound.go b/proxy/vlite/inbound/inbound.go index ebc0ee6f4..562635905 100644 --- a/proxy/vlite/inbound/inbound.go +++ b/proxy/vlite/inbound/inbound.go @@ -7,15 +7,6 @@ import ( "strconv" "sync" - "github.com/v2fly/v2ray-core/v5/common" - "github.com/v2fly/v2ray-core/v5/common/environment" - "github.com/v2fly/v2ray-core/v5/common/environment/envctx" - "github.com/v2fly/v2ray-core/v5/common/net" - "github.com/v2fly/v2ray-core/v5/common/session" - "github.com/v2fly/v2ray-core/v5/common/signal/done" - "github.com/v2fly/v2ray-core/v5/features/routing" - "github.com/v2fly/v2ray-core/v5/transport/internet" - "github.com/mustafaturan/bus" "github.com/xiaokangwang/VLite/interfaces" "github.com/xiaokangwang/VLite/interfaces/ibus" @@ -26,6 +17,15 @@ import ( "github.com/xiaokangwang/VLite/transport/udp/udpuni/udpunis" "github.com/xiaokangwang/VLite/transport/uni/uniserver" "github.com/xiaokangwang/VLite/workers/server" + + "github.com/v2fly/v2ray-core/v5/common" + "github.com/v2fly/v2ray-core/v5/common/environment" + "github.com/v2fly/v2ray-core/v5/common/environment/envctx" + "github.com/v2fly/v2ray-core/v5/common/net" + "github.com/v2fly/v2ray-core/v5/common/session" + "github.com/v2fly/v2ray-core/v5/common/signal/done" + "github.com/v2fly/v2ray-core/v5/features/routing" + "github.com/v2fly/v2ray-core/v5/transport/internet" ) //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen diff --git a/proxy/vlite/outbound/outbound.go b/proxy/vlite/outbound/outbound.go index c86e081b6..4960929b0 100644 --- a/proxy/vlite/outbound/outbound.go +++ b/proxy/vlite/outbound/outbound.go @@ -16,6 +16,7 @@ import ( "github.com/xiaokangwang/VLite/transport/udp/udpClient" "github.com/xiaokangwang/VLite/transport/udp/udpuni/udpunic" "github.com/xiaokangwang/VLite/transport/uni/uniclient" + client2 "github.com/xiaokangwang/VLite/workers/client" "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/environment" @@ -28,8 +29,6 @@ import ( "github.com/v2fly/v2ray-core/v5/transport" "github.com/v2fly/v2ray-core/v5/transport/internet" "github.com/v2fly/v2ray-core/v5/transport/internet/udp" - - client2 "github.com/xiaokangwang/VLite/workers/client" ) //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen diff --git a/transport/internet/headers/http/linkedreadRequest.go b/transport/internet/headers/http/linkedreadRequest.go index 457733125..9c700eb4c 100644 --- a/transport/internet/headers/http/linkedreadRequest.go +++ b/transport/internet/headers/http/linkedreadRequest.go @@ -3,8 +3,6 @@ package http import ( "bufio" "net/http" - - // required to use go:linkname _ "unsafe" )