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

update version: auto replacement to v5 path

This commit is contained in:
Shelikhoo
2022-01-02 15:16:23 +00:00
parent 9f0d7e7f40
commit 3ef7feaeaf
809 changed files with 2669 additions and 2641 deletions

View File

@@ -5,11 +5,11 @@ import (
"os"
"strings"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
type StringList []string

View File

@@ -8,10 +8,10 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"github.com/v2fly/v2ray-core/v4/common"
"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/v5/common"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
)
func TestStringListUnmarshalError(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"testing"
"time"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/duration"
)
type testWithDuration struct {

View File

@@ -1,6 +1,6 @@
package cfgcommon
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -1,6 +1,6 @@
package loader
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,7 +5,7 @@ import (
"strings"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
type ConfigCreator func() interface{}

View File

@@ -1,6 +1,6 @@
package muxcfg
import "github.com/v2fly/v2ray-core/v4/app/proxyman"
import "github.com/v2fly/v2ray-core/v5/app/proxyman"
type MuxConfig struct {
Enabled bool `json:"enabled"`

View File

@@ -1,6 +1,6 @@
package proxycfg
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -1,13 +1,13 @@
package proxycfg
import "github.com/v2fly/v2ray-core/v4/transport/internet"
import "github.com/v2fly/v2ray-core/v5/transport/internet"
type ProxyConfig struct {
Tag string `json:"tag"`
TransportLayerProxy bool `json:"transportLayer"`
}
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
// Build implements Buildable.
func (v *ProxyConfig) Build() (*internet.ProxyConfig, error) {

View File

@@ -3,8 +3,8 @@ package cfgcommon
import (
"context"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/infra/conf/geodata"
)
type configureLoadingContext int

View File

@@ -1,6 +1,6 @@
package sniffer
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -3,11 +3,11 @@ package sniffer
import (
"strings"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/app/proxyman"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
type SniffingConfig struct {
Enabled bool `json:"enabled"`

View File

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

View File

@@ -6,8 +6,8 @@ import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
)
func LoadJSON(creator func() cfgcommon.Buildable) func(string) (proto.Message, error) {

View File

@@ -1,6 +1,6 @@
package tlscfg
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -6,12 +6,12 @@ import (
"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"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/transport/internet/tls"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
type TLSConfig struct {
Insecure bool `json:"allowInsecure"`

View File

@@ -3,7 +3,7 @@ package geodata
import (
"strings"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
)
type AttributeList struct {

View File

@@ -1,6 +1,6 @@
package geodata
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

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

View File

@@ -8,11 +8,11 @@ import (
"runtime"
"testing"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
_ "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/v5/common"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/infra/conf/geodata"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
)
func init() {

View File

@@ -1,10 +1,10 @@
package geodata
import (
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
type LoaderImplementation interface {
LoadSite(filename, list string) ([]*routercommon.Domain, error)

View File

@@ -6,8 +6,8 @@ import (
"google.golang.org/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/common/platform"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common/platform"
)
type GeoIPCache map[string]*routercommon.GeoIP

View File

@@ -7,7 +7,7 @@ import (
"google.golang.org/protobuf/encoding/protowire"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
)
var (

View File

@@ -8,9 +8,9 @@ import (
"path/filepath"
"testing"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/platform"
"github.com/v2fly/v2ray-core/v4/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/platform"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
)
func init() {

View File

@@ -1,6 +1,6 @@
package memconservative
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -3,11 +3,11 @@ package memconservative
import (
"runtime"
"github.com/v2fly/v2ray-core/v4/app/router/routercommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/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/v5/common/errors/errorgen
type memConservativeLoader struct {
geoipcache GeoIPCache

View File

@@ -1,6 +1,6 @@
package standard
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,12 +5,12 @@ import (
"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"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/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/v5/common/errors/errorgen
func loadIP(filename, country string) ([]*routercommon.CIDR, error) {
geoipBytes, err := filesystem.ReadAsset(filename)

View File

@@ -3,7 +3,7 @@ package json
import (
"io"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v5/common/buf"
)
// State is the internal state of parser.

View File

@@ -7,8 +7,8 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/v2fly/v2ray-core/v4/common"
. "github.com/v2fly/v2ray-core/v4/infra/conf/json"
"github.com/v2fly/v2ray-core/v5/common"
. "github.com/v2fly/v2ray-core/v5/infra/conf/json"
)
func TestReader(t *testing.T) {

View File

@@ -1,6 +1,6 @@
package jsonpb
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -7,14 +7,14 @@ import (
"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"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/buf"
"github.com/v2fly/v2ray-core/v5/common/cmdarg"
"github.com/v2fly/v2ray-core/v5/common/serial"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
func loadJSONPB(data io.Reader) (*core.Config, error) {
coreconf := &core.Config{}

View File

@@ -1,6 +1,6 @@
package merge
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -19,7 +19,7 @@ import (
"bytes"
"encoding/json"
"github.com/v2fly/v2ray-core/v4/infra/conf/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/serial"
)
// JSONs merges multiple json contents into one json.

View File

@@ -10,8 +10,8 @@ import (
"strings"
"testing"
"github.com/v2fly/v2ray-core/v4/infra/conf/merge"
"github.com/v2fly/v2ray-core/v4/infra/conf/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/merge"
"github.com/v2fly/v2ray-core/v5/infra/conf/serial"
)
func TestMergeV2Style(t *testing.T) {

View File

@@ -1,6 +1,6 @@
package mergers
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,8 +5,8 @@ import (
"path/filepath"
"strings"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common/cmdarg"
)
// MergeAs load input and merge as specified format into m

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"io"
"github.com/v2fly/v2ray-core/v4/common/cmdarg"
"github.com/v2fly/v2ray-core/v4/infra/conf/merge"
"github.com/v2fly/v2ray-core/v5/common/cmdarg"
"github.com/v2fly/v2ray-core/v5/infra/conf/merge"
)
type jsonConverter func(v []byte) ([]byte, error)

View File

@@ -1,13 +1,13 @@
package mergers
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
import (
"strings"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/infra/conf/json"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/infra/conf/json"
)
func init() {

View File

@@ -1,6 +1,6 @@
package rule
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -6,13 +6,13 @@ import (
"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"
"github.com/v2fly/v2ray-core/v5/app/router"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
func parseDomainRule(ctx context.Context, domain string) ([]*routercommon.Domain, error) {
cfgEnv := cfgcommon.GetConfigureLoadingEnvironment(ctx)

View File

@@ -8,13 +8,13 @@ import (
"path/filepath"
"testing"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/platform"
"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/geodata"
_ "github.com/v2fly/v2ray-core/v4/infra/conf/geodata/standard"
"github.com/v2fly/v2ray-core/v4/infra/conf/rule"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/platform"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/geodata"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
"github.com/v2fly/v2ray-core/v5/infra/conf/rule"
)
func init() {

View File

@@ -1,6 +1,6 @@
package serial
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,10 +5,10 @@ import (
"encoding/json"
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common/errors"
json_reader "github.com/v2fly/v2ray-core/v5/infra/conf/json"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
)
type offset struct {

View File

@@ -5,7 +5,7 @@ import (
"strings"
"testing"
"github.com/v2fly/v2ray-core/v4/infra/conf/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/serial"
)
func TestLoaderError(t *testing.T) {

View File

@@ -1,3 +1,3 @@
package serial
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen

View File

@@ -1,6 +1,6 @@
package dns
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
import (
"context"
@@ -8,13 +8,13 @@ import (
"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"
"github.com/v2fly/v2ray-core/v4/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
"github.com/v2fly/v2ray-core/v5/app/dns"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/platform"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v5/infra/conf/rule"
)
type NameServerConfig struct {

View File

@@ -10,13 +10,13 @@ import (
"google.golang.org/protobuf/runtime/protoiface"
"github.com/v2fly/v2ray-core/v4/app/dns"
"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"
"github.com/v2fly/v2ray-core/v5/app/dns"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/platform/filesystem"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
dns2 "github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/dns"
)
func init() {

View File

@@ -1,6 +1,6 @@
package dns
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -3,8 +3,8 @@ package log
import (
"strings"
"github.com/v2fly/v2ray-core/v4/app/log"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v5/app/log"
clog "github.com/v2fly/v2ray-core/v5/common/log"
)
func DefaultLogConfig() *log.Config {

View File

@@ -1,6 +1,6 @@
package router
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -1,6 +1,6 @@
package router
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
import (
"context"
@@ -9,12 +9,12 @@ import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common/platform"
"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/geodata"
rule2 "github.com/v2fly/v2ray-core/v4/infra/conf/rule"
"github.com/v2fly/v2ray-core/v5/app/router"
"github.com/v2fly/v2ray-core/v5/common/platform"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/geodata"
rule2 "github.com/v2fly/v2ray-core/v5/infra/conf/rule"
)
type RouterRulesConfig struct { // nolint: revive

View File

@@ -3,10 +3,10 @@ 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/v5/app/observatory/burst"
"github.com/v2fly/v2ray-core/v5/app/router"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/loader"
)
const (

View File

@@ -8,16 +8,16 @@ 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"
"github.com/v2fly/v2ray-core/v5/app/router"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/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"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
router2 "github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/router"
)
func TestRouterConfig(t *testing.T) {

View File

@@ -1,6 +1,6 @@
package v2jsonpb
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,7 +5,7 @@ import (
"google.golang.org/protobuf/reflect/protoreflect"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v5/common/serial"
)
type V2JsonProtobufFollowerFieldDescriptor struct {

View File

@@ -6,14 +6,14 @@ import (
"google.golang.org/protobuf/encoding/protojson"
"google.golang.org/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"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/buf"
"github.com/v2fly/v2ray-core/v5/common/cmdarg"
"github.com/v2fly/v2ray-core/v5/common/serial"
)
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
func loadV2JsonPb(data []byte) (*core.Config, error) {
coreconf := &core.Config{}

View File

@@ -7,13 +7,13 @@ import (
"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"
observatoryservice "github.com/v2fly/v2ray-core/v4/app/observatory/command"
handlerservice "github.com/v2fly/v2ray-core/v4/app/proxyman/command"
routerservice "github.com/v2fly/v2ray-core/v4/app/router/command"
statsservice "github.com/v2fly/v2ray-core/v4/app/stats/command"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v5/app/commander"
loggerservice "github.com/v2fly/v2ray-core/v5/app/log/command"
observatoryservice "github.com/v2fly/v2ray-core/v5/app/observatory/command"
handlerservice "github.com/v2fly/v2ray-core/v5/app/proxyman/command"
routerservice "github.com/v2fly/v2ray-core/v5/app/router/command"
statsservice "github.com/v2fly/v2ray-core/v5/app/stats/command"
"github.com/v2fly/v2ray-core/v5/common/serial"
)
type APIConfig struct {

View File

@@ -5,10 +5,10 @@ import (
"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"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v5/proxy/blackhole"
)
type NoneResponse struct{}

View File

@@ -3,11 +3,11 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/blackhole"
)
func TestHTTPResponseJSON(t *testing.T) {

View File

@@ -5,7 +5,7 @@ import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/browserforwarder"
"github.com/v2fly/v2ray-core/v5/app/browserforwarder"
)
type BrowserForwarderConfig struct {

View File

@@ -1,3 +1,3 @@
package v4
//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen
//go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen

View File

@@ -3,9 +3,9 @@ package v4
import (
"github.com/golang/protobuf/proto"
"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/v5/common/net"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/dns"
)
type DNSOutboundConfig struct {

View File

@@ -3,11 +3,11 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/dns"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/dns"
)
func TestDnsProxyConfig(t *testing.T) {

View File

@@ -3,8 +3,8 @@ package v4
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/dokodemo"
)
type DokodemoConfig struct {

View File

@@ -3,11 +3,11 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/dokodemo"
)
func TestDokodemoConfig(t *testing.T) {

View File

@@ -1,6 +1,6 @@
package v4
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -4,7 +4,7 @@ import (
"encoding/json"
"strings"
"github.com/v2fly/v2ray-core/v4/app/dns/fakedns"
"github.com/v2fly/v2ray-core/v5/app/dns/fakedns"
)
type FakeDNSPoolElementConfig struct {

View File

@@ -6,9 +6,9 @@ import (
"github.com/golang/protobuf/proto"
v2net "github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
v2net "github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/proxy/freedom"
)
type FreedomConfig struct {

View File

@@ -3,12 +3,12 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/freedom"
)
func TestFreedomConfig(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package v4
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/transport/internet/grpc"
"github.com/v2fly/v2ray-core/v5/transport/internet/grpc"
)
type GunConfig struct {

View File

@@ -5,10 +5,10 @@ import (
"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"
"github.com/v2fly/v2ray-core/v4/proxy/http"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/http"
)
type HTTPAccount struct {

View File

@@ -3,10 +3,10 @@ package v4_test
import (
"testing"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v4/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/http"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/http"
)
func TestHTTPServerConfig(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package v4
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/proxy/loopback"
"github.com/v2fly/v2ray-core/v5/proxy/loopback"
)
type LoopbackConfig struct {

View File

@@ -6,13 +6,13 @@ import (
"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/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v4/infra/conf/synthetic/router"
"github.com/v2fly/v2ray-core/v5/app/observatory"
"github.com/v2fly/v2ray-core/v5/app/observatory/burst"
"github.com/v2fly/v2ray-core/v5/app/observatory/multiobservatory"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/common/taggedfeatures"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/duration"
"github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/router"
)
type ObservatoryConfig struct {

View File

@@ -1,7 +1,7 @@
package v4
import (
"github.com/v2fly/v2ray-core/v4/app/policy"
"github.com/v2fly/v2ray-core/v5/app/policy"
)
type Policy struct {

View File

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

View File

@@ -3,7 +3,7 @@ package v4
import (
"github.com/golang/protobuf/proto"
"github.com/v2fly/v2ray-core/v4/app/reverse"
"github.com/v2fly/v2ray-core/v5/app/reverse"
)
type BridgeConfig struct {

View File

@@ -3,10 +3,10 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/app/reverse"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
)
func TestReverseConfig(t *testing.T) {

View File

@@ -8,7 +8,7 @@ import (
"github.com/jhump/protoreflect/dynamic"
"google.golang.org/protobuf/types/known/anypb"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v5/common/serial"
)
func (c *Config) BuildServices(service map[string]*json.RawMessage) ([]*anypb.Any, error) {

View File

@@ -3,10 +3,10 @@ package v4
import (
"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"
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/shadowsocks"
)
type ShadowsocksServerConfig struct {

View File

@@ -3,13 +3,13 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/shadowsocks"
)
func TestShadowsocksServerConfigParsing(t *testing.T) {

View File

@@ -6,10 +6,10 @@ import (
"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"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/socks"
)
type SocksAccount struct {

View File

@@ -3,13 +3,13 @@ package v4_test
import (
"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"
v4 "github.com/v2fly/v2ray-core/v4/infra/conf/v4"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/socks"
)
func TestSocksInboundConfig(t *testing.T) {

View File

@@ -1,9 +1,9 @@
package v4
import (
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/transport"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/transport"
"github.com/v2fly/v2ray-core/v5/transport/internet"
)
type TransportConfig struct {

View File

@@ -5,14 +5,14 @@ import (
"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/noop"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/tls"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/utp"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/wireguard"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/http"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/noop"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/srtp"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/tls"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/utp"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/wechat"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/wireguard"
)
type NoOpAuthenticator struct{}

View File

@@ -6,20 +6,20 @@ import (
"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"
"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"
"github.com/v2fly/v2ray-core/v4/transport/internet/http"
"github.com/v2fly/v2ray-core/v4/transport/internet/kcp"
"github.com/v2fly/v2ray-core/v4/transport/internet/quic"
"github.com/v2fly/v2ray-core/v4/transport/internet/tcp"
"github.com/v2fly/v2ray-core/v4/transport/internet/websocket"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/tlscfg"
"github.com/v2fly/v2ray-core/v5/transport/internet"
"github.com/v2fly/v2ray-core/v5/transport/internet/domainsocket"
httpheader "github.com/v2fly/v2ray-core/v5/transport/internet/headers/http"
"github.com/v2fly/v2ray-core/v5/transport/internet/http"
"github.com/v2fly/v2ray-core/v5/transport/internet/kcp"
"github.com/v2fly/v2ray-core/v5/transport/internet/quic"
"github.com/v2fly/v2ray-core/v5/transport/internet/tcp"
"github.com/v2fly/v2ray-core/v5/transport/internet/websocket"
)
var (

View File

@@ -6,20 +6,20 @@ import (
"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"
v4 "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"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/noop"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/tls"
"github.com/v2fly/v2ray-core/v4/transport/internet/kcp"
"github.com/v2fly/v2ray-core/v4/transport/internet/quic"
"github.com/v2fly/v2ray-core/v4/transport/internet/tcp"
"github.com/v2fly/v2ray-core/v4/transport/internet/websocket"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/socketcfg"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/transport"
"github.com/v2fly/v2ray-core/v5/transport/internet"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/http"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/noop"
"github.com/v2fly/v2ray-core/v5/transport/internet/headers/tls"
"github.com/v2fly/v2ray-core/v5/transport/internet/kcp"
"github.com/v2fly/v2ray-core/v5/transport/internet/quic"
"github.com/v2fly/v2ray-core/v5/transport/internet/tcp"
"github.com/v2fly/v2ray-core/v5/transport/internet/websocket"
)
func TestSocketConfig(t *testing.T) {

View File

@@ -8,11 +8,11 @@ import (
"github.com/golang/protobuf/proto"
"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/proxy/trojan"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/trojan"
)
// TrojanServerTarget is configuration of a single trojan server

View File

@@ -6,19 +6,19 @@ import (
"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"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/app/dispatcher"
"github.com/v2fly/v2ray-core/v5/app/proxyman"
"github.com/v2fly/v2ray-core/v5/app/stats"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/loader"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/proxycfg"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/sniffer"
"github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/dns"
"github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/log"
"github.com/v2fly/v2ray-core/v5/infra/conf/synthetic/router"
)
var (

View File

@@ -8,33 +8,33 @@ import (
"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"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/app/dispatcher"
"github.com/v2fly/v2ray-core/v5/app/log"
"github.com/v2fly/v2ray-core/v5/app/proxyman"
"github.com/v2fly/v2ray-core/v5/app/router"
"github.com/v2fly/v2ray-core/v5/app/router/routercommon"
"github.com/v2fly/v2ray-core/v5/common"
clog "github.com/v2fly/v2ray-core/v5/common/log"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/muxcfg"
"github.com/v2fly/v2ray-core/v5/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"
v4 "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"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"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"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/memconservative"
_ "github.com/v2fly/v2ray-core/v5/infra/conf/geodata/standard"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/blackhole"
dns_proxy "github.com/v2fly/v2ray-core/v5/proxy/dns"
"github.com/v2fly/v2ray-core/v5/proxy/freedom"
"github.com/v2fly/v2ray-core/v5/proxy/vmess"
"github.com/v2fly/v2ray-core/v5/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v5/transport/internet"
"github.com/v2fly/v2ray-core/v5/transport/internet/http"
"github.com/v2fly/v2ray-core/v5/transport/internet/tls"
"github.com/v2fly/v2ray-core/v5/transport/internet/websocket"
)
func TestV2RayConfig(t *testing.T) {

View File

@@ -8,13 +8,13 @@ import (
"github.com/golang/protobuf/proto"
"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/proxy/vless"
"github.com/v2fly/v2ray-core/v4/proxy/vless/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vless/outbound"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/vless"
"github.com/v2fly/v2ray-core/v5/proxy/vless/inbound"
"github.com/v2fly/v2ray-core/v5/proxy/vless/outbound"
)
type VLessInboundFallback struct {

View File

@@ -3,15 +3,15 @@ package v4_test
import (
"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"
v4 "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"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/vless"
"github.com/v2fly/v2ray-core/v5/proxy/vless/inbound"
"github.com/v2fly/v2ray-core/v5/proxy/vless/outbound"
)
func TestVLessOutbound(t *testing.T) {

View File

@@ -6,12 +6,12 @@ import (
"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"
"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"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/proxy/vmess"
"github.com/v2fly/v2ray-core/v5/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v5/proxy/vmess/outbound"
)
type VMessAccount struct {

View File

@@ -3,15 +3,15 @@ package v4_test
import (
"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"
v4 "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"
"github.com/v2fly/v2ray-core/v5/common/net"
"github.com/v2fly/v2ray-core/v5/common/protocol"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon"
"github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon/testassist"
v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4"
"github.com/v2fly/v2ray-core/v5/proxy/vmess"
"github.com/v2fly/v2ray-core/v5/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v5/proxy/vmess/outbound"
)
func TestVMessOutbound(t *testing.T) {

View File

@@ -6,9 +6,9 @@ import (
"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"
"github.com/v2fly/v2ray-core/v5/common/environment/envctx"
"github.com/v2fly/v2ray-core/v5/common/environment/envimpl"
"github.com/v2fly/v2ray-core/v5/common/registry"
)
func loadHeterogeneousConfigFromRawJSON(interfaceType, name string, rawJSON json.RawMessage) (proto.Message, error) {

View File

@@ -1,6 +1,6 @@
package v5cfg
import "github.com/v2fly/v2ray-core/v4/common/errors"
import "github.com/v2fly/v2ray-core/v5/common/errors"
type errPathObjHolder struct{}

View File

@@ -5,11 +5,11 @@ import (
"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"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/transport/internet"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/app/proxyman"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v5/transport/internet"
)
func (c InboundConfig) BuildV5(ctx context.Context) (proto.Message, error) {

View File

@@ -3,10 +3,10 @@ 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"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/common"
"github.com/v2fly/v2ray-core/v5/common/buf"
"github.com/v2fly/v2ray-core/v5/common/cmdarg"
)
const jsonV5 = "jsonv5"

View File

@@ -5,10 +5,10 @@ import (
"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"
"github.com/v2fly/v2ray-core/v4/transport/internet"
core "github.com/v2fly/v2ray-core/v5"
"github.com/v2fly/v2ray-core/v5/app/proxyman"
"github.com/v2fly/v2ray-core/v5/common/serial"
"github.com/v2fly/v2ray-core/v5/transport/internet"
)
func (c OutboundConfig) BuildV5(ctx context.Context) (proto.Message, error) {

Some files were not shown because too many files have changed in this diff Show More