mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-12-21 09:36:34 -05:00
code style
This commit is contained in:
parent
40f8e82204
commit
2bdc86049a
@ -5,14 +5,13 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/google/go-cmp/cmp"
|
"github.com/google/go-cmp/cmp"
|
||||||
"github.com/google/go-cmp/cmp/cmpopts"
|
"github.com/google/go-cmp/cmp/cmpopts"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common"
|
"github.com/v2fly/v2ray-core/v4/common"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStringListUnmarshalError(t *testing.T) {
|
func TestStringListUnmarshalError(t *testing.T) {
|
||||||
|
@ -6,15 +6,13 @@ import (
|
|||||||
"sort"
|
"sort"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform"
|
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
|
||||||
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/app/dns"
|
"github.com/v2fly/v2ray-core/v4/app/dns"
|
||||||
"github.com/v2fly/v2ray-core/v4/app/router"
|
"github.com/v2fly/v2ray-core/v4/app/router"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/common/platform"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
||||||
|
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NameServerConfig struct {
|
type NameServerConfig struct {
|
||||||
|
@ -2,9 +2,9 @@ package conf
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/dns"
|
"github.com/v2fly/v2ray-core/v4/proxy/dns"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -15,7 +15,6 @@ import (
|
|||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf"
|
"github.com/v2fly/v2ray-core/v4/infra/conf"
|
||||||
|
|
||||||
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
|
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -2,8 +2,8 @@ package conf
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
|
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -4,9 +4,10 @@ import (
|
|||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"google.golang.org/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/app/router"
|
"github.com/v2fly/v2ray-core/v4/app/router"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform"
|
"github.com/v2fly/v2ray-core/v4/common/platform"
|
||||||
"google.golang.org/protobuf/proto"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type GeoIPCache map[string]*router.GeoIP
|
type GeoIPCache map[string]*router.GeoIP
|
||||||
|
@ -5,8 +5,9 @@ import (
|
|||||||
"io"
|
"io"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
|
||||||
"google.golang.org/protobuf/encoding/protowire"
|
"google.golang.org/protobuf/encoding/protowire"
|
||||||
|
|
||||||
|
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -3,12 +3,11 @@ package standard
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/app/router"
|
"github.com/v2fly/v2ray-core/v4/app/router"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
||||||
)
|
)
|
||||||
|
|
||||||
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
|
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
|
||||||
|
@ -3,12 +3,11 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/http"
|
"github.com/v2fly/v2ray-core/v4/proxy/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -5,13 +5,11 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
"github.com/v2fly/v2ray-core/v4/app/router"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform"
|
"github.com/v2fly/v2ray-core/v4/common/platform"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
||||||
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/app/router"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type RouterRulesConfig struct {
|
type RouterRulesConfig struct {
|
||||||
|
@ -13,9 +13,8 @@ import (
|
|||||||
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
|
||||||
|
|
||||||
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
|
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/rule"
|
||||||
)
|
)
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
@ -3,12 +3,11 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
|
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,12 +3,11 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/socks"
|
"github.com/v2fly/v2ray-core/v4/proxy/socks"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -3,10 +3,9 @@ package conf
|
|||||||
import (
|
import (
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"
|
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/noop"
|
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/noop"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp"
|
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp"
|
||||||
|
@ -5,13 +5,12 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet"
|
"github.com/v2fly/v2ray-core/v4/transport/internet"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"
|
"github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"
|
||||||
"github.com/v2fly/v2ray-core/v4/transport/internet/http"
|
"github.com/v2fly/v2ray-core/v4/transport/internet/http"
|
||||||
|
@ -6,13 +6,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/trojan"
|
"github.com/v2fly/v2ray-core/v4/proxy/trojan"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -6,13 +6,12 @@ import (
|
|||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
core "github.com/v2fly/v2ray-core/v4"
|
core "github.com/v2fly/v2ray-core/v4"
|
||||||
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
|
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
|
||||||
"github.com/v2fly/v2ray-core/v4/app/proxyman"
|
"github.com/v2fly/v2ray-core/v4/app/proxyman"
|
||||||
"github.com/v2fly/v2ray-core/v4/app/stats"
|
"github.com/v2fly/v2ray-core/v4/app/stats"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
|
@ -6,13 +6,12 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"syscall"
|
"syscall"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/net"
|
"github.com/v2fly/v2ray-core/v4/common/net"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vless"
|
"github.com/v2fly/v2ray-core/v4/proxy/vless"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vless/inbound"
|
"github.com/v2fly/v2ray-core/v4/proxy/vless/inbound"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vless/outbound"
|
"github.com/v2fly/v2ray-core/v4/proxy/vless/outbound"
|
||||||
|
@ -4,12 +4,11 @@ import (
|
|||||||
"encoding/json"
|
"encoding/json"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
|
||||||
|
|
||||||
"github.com/golang/protobuf/proto"
|
"github.com/golang/protobuf/proto"
|
||||||
|
|
||||||
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
"github.com/v2fly/v2ray-core/v4/common/protocol"
|
||||||
"github.com/v2fly/v2ray-core/v4/common/serial"
|
"github.com/v2fly/v2ray-core/v4/common/serial"
|
||||||
|
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
|
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
|
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
|
||||||
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
|
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
|
||||||
|
Loading…
Reference in New Issue
Block a user