diff --git a/common/matcher/domain/matcher.go b/common/matcher/domain/matcher.go index 474253439..1abad45ca 100644 --- a/common/matcher/domain/matcher.go +++ b/common/matcher/domain/matcher.go @@ -1,9 +1,10 @@ package domain import ( + "strings" + "github.com/xtls/xray-core/common/matcher/str" "github.com/xtls/xray-core/features/routing" - "strings" ) var matcherTypeMap = map[MatchingType]str.Type{ diff --git a/common/matcher/geoip/conf.go b/common/matcher/geoip/conf.go index c2c9b8cb0..e7d89ac65 100644 --- a/common/matcher/geoip/conf.go +++ b/common/matcher/geoip/conf.go @@ -1,13 +1,12 @@ package geoip import ( - "github.com/xtls/xray-core/common/net" - "github.com/xtls/xray-core/infra/conf/common" "runtime" "strconv" "strings" "github.com/golang/protobuf/proto" + "github.com/xtls/xray-core/common/net" "github.com/xtls/xray-core/common/platform/filesystem" ) @@ -93,7 +92,7 @@ func find(data, code []byte) []byte { } } -func ParaseIPList(ips common.StringList) ([]*GeoIP, error) { +func ParaseIPList(ips []string) ([]*GeoIP, error) { var geoipList []*GeoIP var customCidrs []*CIDR diff --git a/common/session/session.go b/common/session/session.go index 7c7062aa6..9b32773f9 100644 --- a/common/session/session.go +++ b/common/session/session.go @@ -3,11 +3,11 @@ package session // import "github.com/xtls/xray-core/common/session" import ( "context" - "github.com/xtls/xray-core/common/matcher/domain" - "github.com/xtls/xray-core/common/matcher/geoip" "math/rand" "github.com/xtls/xray-core/common/errors" + "github.com/xtls/xray-core/common/matcher/domain" + "github.com/xtls/xray-core/common/matcher/geoip" "github.com/xtls/xray-core/common/net" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/signal" diff --git a/infra/conf/dns.go b/infra/conf/dns.go index 807600ecf..9a70e3e82 100644 --- a/infra/conf/dns.go +++ b/infra/conf/dns.go @@ -2,16 +2,17 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/common/matcher/geoip" - "github.com/xtls/xray-core/infra/conf/common" + "sort" "strings" "github.com/xtls/xray-core/app/dns" dm "github.com/xtls/xray-core/common/matcher/domain" "github.com/xtls/xray-core/common/matcher/domain/conf" + "github.com/xtls/xray-core/common/matcher/geoip" "github.com/xtls/xray-core/common/matcher/geosite" "github.com/xtls/xray-core/common/net" + "github.com/xtls/xray-core/infra/conf/common" ) type NameServerConfig struct { diff --git a/infra/conf/http.go b/infra/conf/http.go index 7b9acaa77..ebaaa7fdf 100644 --- a/infra/conf/http.go +++ b/infra/conf/http.go @@ -2,11 +2,11 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "github.com/golang/protobuf/proto" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/http" ) diff --git a/infra/conf/router.go b/infra/conf/router.go index 1f68e3049..504632677 100644 --- a/infra/conf/router.go +++ b/infra/conf/router.go @@ -2,7 +2,6 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "strconv" "strings" @@ -11,6 +10,7 @@ import ( "github.com/xtls/xray-core/common/matcher/geoip" "github.com/xtls/xray-core/common/matcher/geosite" "github.com/xtls/xray-core/common/net" + "github.com/xtls/xray-core/infra/conf/common" ) type RouterRulesConfig struct { diff --git a/infra/conf/shadowsocks.go b/infra/conf/shadowsocks.go index 42b9f0388..f5b4305d9 100644 --- a/infra/conf/shadowsocks.go +++ b/infra/conf/shadowsocks.go @@ -1,13 +1,13 @@ package conf import ( - "github.com/xtls/xray-core/infra/conf/common" "strings" "github.com/golang/protobuf/proto" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/shadowsocks" ) diff --git a/infra/conf/socks.go b/infra/conf/socks.go index ea2a41893..61d8295e6 100644 --- a/infra/conf/socks.go +++ b/infra/conf/socks.go @@ -2,11 +2,11 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "github.com/golang/protobuf/proto" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/socks" ) diff --git a/infra/conf/transport_authenticators.go b/infra/conf/transport_authenticators.go index f000e8d47..f0ddffe3d 100644 --- a/infra/conf/transport_authenticators.go +++ b/infra/conf/transport_authenticators.go @@ -1,11 +1,11 @@ package conf import ( - "github.com/xtls/xray-core/infra/conf/common" "sort" "github.com/golang/protobuf/proto" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/transport/internet/headers/http" "github.com/xtls/xray-core/transport/internet/headers/noop" "github.com/xtls/xray-core/transport/internet/headers/srtp" diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 980a49a82..9e929e97b 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -2,7 +2,6 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "math" "net/url" "strconv" @@ -12,6 +11,7 @@ import ( "github.com/xtls/xray-core/common/platform/filesystem" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/transport/internet" "github.com/xtls/xray-core/transport/internet/domainsocket" "github.com/xtls/xray-core/transport/internet/http" diff --git a/infra/conf/trojan.go b/infra/conf/trojan.go index b59894cb1..0a71e2438 100644 --- a/infra/conf/trojan.go +++ b/infra/conf/trojan.go @@ -2,7 +2,6 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "runtime" "strconv" "syscall" @@ -12,6 +11,7 @@ import ( "github.com/xtls/xray-core/common/net" "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/trojan" ) diff --git a/infra/conf/vless.go b/infra/conf/vless.go index 33a5c3b11..c7a07fb29 100644 --- a/infra/conf/vless.go +++ b/infra/conf/vless.go @@ -2,7 +2,6 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "runtime" "strconv" "syscall" @@ -13,6 +12,7 @@ import ( "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" "github.com/xtls/xray-core/common/uuid" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/vless" "github.com/xtls/xray-core/proxy/vless/inbound" "github.com/xtls/xray-core/proxy/vless/outbound" diff --git a/infra/conf/vmess.go b/infra/conf/vmess.go index 62084c092..9670dc299 100644 --- a/infra/conf/vmess.go +++ b/infra/conf/vmess.go @@ -2,7 +2,6 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/infra/conf/common" "strings" "github.com/golang/protobuf/proto" @@ -10,6 +9,7 @@ import ( "github.com/xtls/xray-core/common/protocol" "github.com/xtls/xray-core/common/serial" "github.com/xtls/xray-core/common/uuid" + "github.com/xtls/xray-core/infra/conf/common" "github.com/xtls/xray-core/proxy/vmess" "github.com/xtls/xray-core/proxy/vmess/inbound" "github.com/xtls/xray-core/proxy/vmess/outbound" diff --git a/infra/conf/xray.go b/infra/conf/xray.go index f87122210..02561c5ee 100644 --- a/infra/conf/xray.go +++ b/infra/conf/xray.go @@ -2,11 +2,7 @@ package conf import ( "encoding/json" - "github.com/xtls/xray-core/common/matcher/domain" - "github.com/xtls/xray-core/common/matcher/domain/conf" - "github.com/xtls/xray-core/common/matcher/geoip" - "github.com/xtls/xray-core/infra/conf/common" - "github.com/xtls/xray-core/transport/internet" + "log" "os" "strings" @@ -14,8 +10,13 @@ import ( "github.com/xtls/xray-core/app/dispatcher" "github.com/xtls/xray-core/app/proxyman" "github.com/xtls/xray-core/app/stats" + "github.com/xtls/xray-core/common/matcher/domain" + "github.com/xtls/xray-core/common/matcher/domain/conf" + "github.com/xtls/xray-core/common/matcher/geoip" "github.com/xtls/xray-core/common/serial" core "github.com/xtls/xray-core/core" + "github.com/xtls/xray-core/infra/conf/common" + "github.com/xtls/xray-core/transport/internet" "github.com/xtls/xray-core/transport/internet/xtls" )