JimhHan пре 4 година
родитељ
комит
4eb3acb4dd

+ 2 - 1
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{

+ 2 - 3
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
 

+ 2 - 2
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"

+ 3 - 2
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 {

+ 1 - 1
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"
 )
 

+ 1 - 1
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 {

+ 1 - 1
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"
 )
 

+ 1 - 1
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"
 )
 

+ 1 - 1
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"

+ 1 - 1
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"

+ 1 - 1
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"
 )
 

+ 1 - 1
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"

+ 1 - 1
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"

+ 6 - 5
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"
 )