diff --git a/app/router/strategy_random.go b/app/router/strategy_random.go index 4e2138fad..bd0cbb7e7 100644 --- a/app/router/strategy_random.go +++ b/app/router/strategy_random.go @@ -3,13 +3,14 @@ package router import ( "context" + "google.golang.org/protobuf/runtime/protoiface" + core "github.com/v2fly/v2ray-core/v5" "github.com/v2fly/v2ray-core/v5/app/observatory" "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/dice" "github.com/v2fly/v2ray-core/v5/features" "github.com/v2fly/v2ray-core/v5/features/extension" - "google.golang.org/protobuf/runtime/protoiface" ) // RandomStrategy represents a random balancing strategy diff --git a/common/dice/dice.go b/common/dice/dice.go index 4647c7f19..2a8d7a189 100644 --- a/common/dice/dice.go +++ b/common/dice/dice.go @@ -4,11 +4,12 @@ package dice import ( crand "crypto/rand" - "github.com/v2fly/v2ray-core/v5/common" "io" "math/big" "math/rand" "time" + + "github.com/v2fly/v2ray-core/v5/common" ) // Roll returns a non-negative number between 0 (inclusive) and n (exclusive). diff --git a/infra/conf/v4/trojan.go b/infra/conf/v4/trojan.go index f7e385cac..56551da24 100644 --- a/infra/conf/v4/trojan.go +++ b/infra/conf/v4/trojan.go @@ -141,7 +141,7 @@ func (c *TrojanServerConfig) Build() (proto.Message, error) { return nil, newError(`Trojan fallbacks: "path" must be empty or start with "/"`) } if fb.Type == "" && fb.Dest != "" { - if fb.Dest == "serve-ws-none" { + if fb.Dest == "serve-ws-none" { // nolint:gocritic fb.Type = "serve" } else if filepath.IsAbs(fb.Dest) || fb.Dest[0] == '@' { fb.Type = "unix" diff --git a/infra/conf/v4/vless.go b/infra/conf/v4/vless.go index 0c76c43d0..f6d16e58d 100644 --- a/infra/conf/v4/vless.go +++ b/infra/conf/v4/vless.go @@ -90,7 +90,7 @@ func (c *VLessInboundConfig) Build() (proto.Message, error) { return nil, newError(`VLESS fallbacks: "path" must be empty or start with "/"`) } if fb.Type == "" && fb.Dest != "" { - if fb.Dest == "serve-ws-none" { + if fb.Dest == "serve-ws-none" { // nolint:gocritic fb.Type = "serve" } else if filepath.IsAbs(fb.Dest) || fb.Dest[0] == '@' { fb.Type = "unix" diff --git a/proxy/shadowsocks2022/encoding.go b/proxy/shadowsocks2022/encoding.go index f95e7173e..0bb28af50 100644 --- a/proxy/shadowsocks2022/encoding.go +++ b/proxy/shadowsocks2022/encoding.go @@ -5,16 +5,15 @@ import ( "crypto/cipher" cryptoRand "crypto/rand" "encoding/binary" - "github.com/v2fly/v2ray-core/v5/common/dice" "io" "time" - "github.com/v2fly/v2ray-core/v5/common" - "github.com/lunixbochs/struc" + "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/buf" "github.com/v2fly/v2ray-core/v5/common/crypto" + "github.com/v2fly/v2ray-core/v5/common/dice" "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/common/protocol" )