1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-04-16 18:49:16 -04:00

Reformat code

This commit is contained in:
世界
2021-10-28 18:34:19 +08:00
parent 0f1e21ceba
commit a66bb28aee
124 changed files with 255 additions and 184 deletions

View File

@@ -2,6 +2,7 @@ package cfgcommon
import (
"context"
"github.com/golang/protobuf/proto"
)

View File

@@ -2,6 +2,7 @@ package cfgcommon
import (
"context"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
)

View File

@@ -1,9 +1,10 @@
package sniffer
import (
"strings"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"strings"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@@ -1,8 +1,9 @@
package socketcfg
import (
"github.com/v2fly/v2ray-core/v4/transport/internet"
"strings"
"github.com/v2fly/v2ray-core/v4/transport/internet"
)
type SocketConfig struct {

View File

@@ -2,12 +2,12 @@ package testassist
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"testing"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
)
func LoadJSON(creator func() cfgcommon.Buildable) func(string) (proto.Message, error) {

View File

@@ -2,11 +2,13 @@ package tlscfg
import (
"encoding/base64"
"strings"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/transport/internet/tls"
"strings"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@@ -1,8 +1,9 @@
package geodata
import (
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"strings"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
)
type loader struct {

View File

@@ -1,12 +1,12 @@
package memconservative
import (
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"io/ioutil"
"strings"
"google.golang.org/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common/platform"
)

View File

@@ -1,9 +1,9 @@
package memconservative
import (
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"runtime"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
)

View File

@@ -1,11 +1,11 @@
package standard
import (
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"strings"
"google.golang.org/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
)

View File

@@ -2,14 +2,16 @@ package jsonpb
import (
"bytes"
"io"
"github.com/golang/protobuf/jsonpb"
"github.com/golang/protobuf/proto"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
"github.com/v2fly/v2ray-core/v4/common/serial"
"io"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@@ -3,11 +3,11 @@ package rule
import (
"context"
"encoding/json"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"strconv"
"strings"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
)

View File

@@ -3,12 +3,12 @@ package serial
import (
"bytes"
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"io"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common/errors"
json_reader "github.com/v2fly/v2ray-core/v4/infra/conf/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
)
type offset struct {

View File

@@ -5,11 +5,11 @@ package dns
import (
"context"
"encoding/json"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"sort"
"strings"
"github.com/v2fly/v2ray-core/v4/app/dns"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"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"
@@ -148,7 +148,7 @@ type DNSConfig struct {
DisableCache bool `json:"disableCache"`
DisableFallback bool `json:"disableFallback"`
DisableFallbackIfMatch bool `json:"disableFallbackIfMatch"`
cfgctx context.Context
cfgctx context.Context
}
type HostAddress struct {

View File

@@ -3,7 +3,6 @@ package dns_test
import (
"encoding/json"
"errors"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"io/fs"
"os"
"path/filepath"
@@ -15,8 +14,8 @@ import (
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
dns2 "github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/dns"
)

View File

@@ -2,11 +2,11 @@ package router
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/observatory/burst"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/app/router"
)
const (

View File

@@ -2,9 +2,6 @@ package router_test
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
router2 "github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
"testing"
"time"
_ "unsafe"
@@ -12,12 +9,15 @@ import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
// Geo loaders
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
router2 "github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
)
func TestRouterConfig(t *testing.T) {

View File

@@ -1,10 +1,11 @@
package v2jsonpb
import (
"github.com/v2fly/v2ray-core/v4/common/serial"
"google.golang.org/protobuf/proto"
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/common/serial"
)
type V2JsonProtobufFollowerFieldDescriptor struct {

View File

@@ -1,7 +1,8 @@
package v2jsonpb
import (
"github.com/v2fly/v2ray-core/v4/common/serial"
"io"
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/protobuf/proto"
@@ -9,7 +10,7 @@ import (
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
"io"
"github.com/v2fly/v2ray-core/v4/common/serial"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen

View File

@@ -1,11 +1,11 @@
package v4
import (
"google.golang.org/protobuf/types/known/anypb"
"strings"
"github.com/jhump/protoreflect/desc"
"github.com/jhump/protoreflect/dynamic"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/app/commander"
loggerservice "github.com/v2fly/v2ray-core/v4/app/log/command"

View File

@@ -2,12 +2,12 @@ package v4
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
)

View File

@@ -1,12 +1,12 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
)

View File

@@ -1,12 +1,12 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/dns"
)

View File

@@ -1,12 +1,12 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
)

View File

@@ -1,13 +1,13 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
)

View File

@@ -1,11 +1,11 @@
package v4_test
import (
"testing"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/proxy/http"
)

View File

@@ -2,16 +2,17 @@ package v4
import (
"encoding/json"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/app/observatory"
"github.com/v2fly/v2ray-core/v4/app/observatory/burst"
"github.com/v2fly/v2ray-core/v4/app/observatory/multiObservatory"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/taggedfeatures"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/app/observatory"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
)
type ObservatoryConfig struct {

View File

@@ -1,10 +1,10 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
)
func TestBufferSize(t *testing.T) {

View File

@@ -1,12 +1,12 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/app/reverse"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
)
func TestReverseConfig(t *testing.T) {

View File

@@ -2,11 +2,11 @@ package v4
import (
"encoding/json"
"google.golang.org/protobuf/types/known/anypb"
"github.com/golang/protobuf/jsonpb"
"github.com/jhump/protoreflect/desc"
"github.com/jhump/protoreflect/dynamic"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/common/serial"
)

View File

@@ -1,14 +1,14 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
)

View File

@@ -1,14 +1,14 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
)

View File

@@ -2,9 +2,6 @@ package v4
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/tlscfg"
"strings"
"github.com/golang/protobuf/proto"
@@ -12,6 +9,9 @@ import (
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/tlscfg"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"
httpheader "github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"

View File

@@ -2,15 +2,15 @@ package v4_test
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/transport"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"

View File

@@ -2,22 +2,23 @@ package v4
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/proxycfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/sniffer"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/dns"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/log"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
"google.golang.org/protobuf/types/known/anypb"
"strings"
"google.golang.org/protobuf/types/known/anypb"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/stats"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/proxycfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/sniffer"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/dns"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/log"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
)
var (

View File

@@ -2,26 +2,30 @@ package v4_test
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"google.golang.org/protobuf/types/known/anypb"
"reflect"
"testing"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
// Geo loaders
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
dns_proxy "github.com/v2fly/v2ray-core/v4/proxy/dns"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
@@ -31,10 +35,6 @@ import (
"github.com/v2fly/v2ray-core/v4/transport/internet/http"
"github.com/v2fly/v2ray-core/v4/transport/internet/tls"
"github.com/v2fly/v2ray-core/v4/transport/internet/websocket"
// Geo loaders
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
)
func TestV2RayConfig(t *testing.T) {

View File

@@ -1,14 +1,14 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"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/outbound"

View File

@@ -1,14 +1,14 @@
package v4_test
import (
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"testing"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
"github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"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/outbound"

View File

@@ -3,7 +3,9 @@ package v5cfg
import (
"context"
"encoding/json"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/environment/envctx"
"github.com/v2fly/v2ray-core/v4/common/environment/envimpl"
"github.com/v2fly/v2ray-core/v4/common/registry"

View File

@@ -2,7 +2,9 @@ package v5cfg
import (
"context"
"github.com/golang/protobuf/proto"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common/serial"

View File

@@ -1,11 +1,12 @@
package v5cfg
import (
"io"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
"io"
)
const jsonV5 = "jsonv5"

View File

@@ -2,7 +2,9 @@ package v5cfg
import (
"context"
"github.com/golang/protobuf/proto"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common/serial"

View File

@@ -3,7 +3,10 @@ package v5cfg
import (
"context"
"encoding/json"
"github.com/golang/protobuf/proto"
"google.golang.org/protobuf/types/known/anypb"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
@@ -12,7 +15,6 @@ import (
"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/synthetic/log"
"google.golang.org/protobuf/types/known/anypb"
)
func (c RootConfig) BuildV5(ctx context.Context) (proto.Message, error) {

View File

@@ -2,6 +2,7 @@ package v5cfg
import (
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/proxycfg"

View File

@@ -2,7 +2,9 @@ package v5cfg
import (
"context"
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/transport/internet"
)