mirror of
https://github.com/XTLS/Xray-core.git
synced 2024-11-15 01:09:20 +02:00
Fix: format
This commit is contained in:
parent
fc8b580017
commit
4eb3acb4dd
|
@ -1,9 +1,10 @@
|
||||||
package domain
|
package domain
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/common/matcher/str"
|
"github.com/xtls/xray-core/common/matcher/str"
|
||||||
"github.com/xtls/xray-core/features/routing"
|
"github.com/xtls/xray-core/features/routing"
|
||||||
"strings"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
var matcherTypeMap = map[MatchingType]str.Type{
|
var matcherTypeMap = map[MatchingType]str.Type{
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package geoip
|
package geoip
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/xtls/xray-core/common/net"
|
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
"github.com/xtls/xray-core/common/net"
|
||||||
"github.com/xtls/xray-core/common/platform/filesystem"
|
"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 geoipList []*GeoIP
|
||||||
var customCidrs []*CIDR
|
var customCidrs []*CIDR
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,11 @@ package session // import "github.com/xtls/xray-core/common/session"
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/xtls/xray-core/common/matcher/domain"
|
|
||||||
"github.com/xtls/xray-core/common/matcher/geoip"
|
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/common/errors"
|
"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/net"
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/signal"
|
"github.com/xtls/xray-core/common/signal"
|
||||||
|
|
|
@ -2,16 +2,17 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/common/matcher/geoip"
|
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/app/dns"
|
"github.com/xtls/xray-core/app/dns"
|
||||||
dm "github.com/xtls/xray-core/common/matcher/domain"
|
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/domain/conf"
|
||||||
|
"github.com/xtls/xray-core/common/matcher/geoip"
|
||||||
"github.com/xtls/xray-core/common/matcher/geosite"
|
"github.com/xtls/xray-core/common/matcher/geosite"
|
||||||
"github.com/xtls/xray-core/common/net"
|
"github.com/xtls/xray-core/common/net"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NameServerConfig struct {
|
type NameServerConfig struct {
|
||||||
|
|
|
@ -2,11 +2,11 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
"github.com/xtls/xray-core/proxy/http"
|
"github.com/xtls/xray-core/proxy/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -11,6 +10,7 @@ import (
|
||||||
"github.com/xtls/xray-core/common/matcher/geoip"
|
"github.com/xtls/xray-core/common/matcher/geoip"
|
||||||
"github.com/xtls/xray-core/common/matcher/geosite"
|
"github.com/xtls/xray-core/common/matcher/geosite"
|
||||||
"github.com/xtls/xray-core/common/net"
|
"github.com/xtls/xray-core/common/net"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
)
|
)
|
||||||
|
|
||||||
type RouterRulesConfig struct {
|
type RouterRulesConfig struct {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package conf
|
package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
"github.com/xtls/xray-core/proxy/shadowsocks"
|
"github.com/xtls/xray-core/proxy/shadowsocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,11 +2,11 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
"github.com/xtls/xray-core/proxy/socks"
|
"github.com/xtls/xray-core/proxy/socks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package conf
|
package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"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/http"
|
||||||
"github.com/xtls/xray-core/transport/internet/headers/noop"
|
"github.com/xtls/xray-core/transport/internet/headers/noop"
|
||||||
"github.com/xtls/xray-core/transport/internet/headers/srtp"
|
"github.com/xtls/xray-core/transport/internet/headers/srtp"
|
||||||
|
|
|
@ -2,7 +2,6 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"math"
|
"math"
|
||||||
"net/url"
|
"net/url"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
@ -12,6 +11,7 @@ import (
|
||||||
"github.com/xtls/xray-core/common/platform/filesystem"
|
"github.com/xtls/xray-core/common/platform/filesystem"
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"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"
|
||||||
"github.com/xtls/xray-core/transport/internet/domainsocket"
|
"github.com/xtls/xray-core/transport/internet/domainsocket"
|
||||||
"github.com/xtls/xray-core/transport/internet/http"
|
"github.com/xtls/xray-core/transport/internet/http"
|
||||||
|
|
|
@ -2,7 +2,6 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -12,6 +11,7 @@ import (
|
||||||
"github.com/xtls/xray-core/common/net"
|
"github.com/xtls/xray-core/common/net"
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
|
"github.com/xtls/xray-core/infra/conf/common"
|
||||||
"github.com/xtls/xray-core/proxy/trojan"
|
"github.com/xtls/xray-core/proxy/trojan"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,6 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"runtime"
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
@ -13,6 +12,7 @@ import (
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
"github.com/xtls/xray-core/common/uuid"
|
"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"
|
||||||
"github.com/xtls/xray-core/proxy/vless/inbound"
|
"github.com/xtls/xray-core/proxy/vless/inbound"
|
||||||
"github.com/xtls/xray-core/proxy/vless/outbound"
|
"github.com/xtls/xray-core/proxy/vless/outbound"
|
||||||
|
|
|
@ -2,7 +2,6 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/xtls/xray-core/infra/conf/common"
|
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
@ -10,6 +9,7 @@ import (
|
||||||
"github.com/xtls/xray-core/common/protocol"
|
"github.com/xtls/xray-core/common/protocol"
|
||||||
"github.com/xtls/xray-core/common/serial"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
"github.com/xtls/xray-core/common/uuid"
|
"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"
|
||||||
"github.com/xtls/xray-core/proxy/vmess/inbound"
|
"github.com/xtls/xray-core/proxy/vmess/inbound"
|
||||||
"github.com/xtls/xray-core/proxy/vmess/outbound"
|
"github.com/xtls/xray-core/proxy/vmess/outbound"
|
||||||
|
|
|
@ -2,11 +2,7 @@ package conf
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"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"
|
"log"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
@ -14,8 +10,13 @@ import (
|
||||||
"github.com/xtls/xray-core/app/dispatcher"
|
"github.com/xtls/xray-core/app/dispatcher"
|
||||||
"github.com/xtls/xray-core/app/proxyman"
|
"github.com/xtls/xray-core/app/proxyman"
|
||||||
"github.com/xtls/xray-core/app/stats"
|
"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"
|
"github.com/xtls/xray-core/common/serial"
|
||||||
core "github.com/xtls/xray-core/core"
|
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"
|
"github.com/xtls/xray-core/transport/internet/xtls"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue