repo
stringlengths
6
47
file_url
stringlengths
77
269
file_path
stringlengths
5
186
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-07 08:35:43
2026-01-07 08:55:24
truncated
bool
2 classes
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/encoding/auth_test.go
proxy/vmess/encoding/auth_test.go
package encoding_test import ( "crypto/rand" "testing" "github.com/google/go-cmp/cmp" "github.com/v2fly/v2ray-core/v5/common" . "github.com/v2fly/v2ray-core/v5/proxy/vmess/encoding" ) func TestFnvAuth(t *testing.T) { fnvAuth := new(FnvAuthenticator) expectedText := make([]byte, 256) _, err := rand.Read(exp...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/outbound/errors.generated.go
proxy/vmess/outbound/errors.generated.go
package outbound import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/outbound/config.go
proxy/vmess/outbound/config.go
package outbound
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/outbound/outbound.go
proxy/vmess/outbound/outbound.go
package outbound //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen import ( "context" "crypto/hmac" "crypto/sha256" "hash/crc64" 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/c...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/outbound/config.pb.go
proxy/vmess/outbound/config.pb.go
package outbound import ( net "github.com/v2fly/v2ray-core/v5/common/net" protocol "github.com/v2fly/v2ray-core/v5/common/protocol" _ "github.com/v2fly/v2ray-core/v5/common/protoext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "r...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/outbound/command.go
proxy/vmess/outbound/command.go
package outbound import ( "time" "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/proxy/vmess" ) func (h *Handler) handleSwitchAccount(cmd *protocol.CommandSwitchAccount) { rawAccount := &vmess.A...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/inbound/inbound.go
proxy/vmess/inbound/inbound.go
package inbound //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen import ( "context" "io" "strings" "sync" "time" 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/errors" ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/inbound/errors.generated.go
proxy/vmess/inbound/errors.generated.go
package inbound import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/inbound/config.go
proxy/vmess/inbound/config.go
package inbound // GetDefaultValue returns default settings of DefaultConfig. func (c *Config) GetDefaultValue() *DefaultConfig { if c.GetDefault() == nil { return &DefaultConfig{} } return c.Default }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/inbound/config.pb.go
proxy/vmess/inbound/config.pb.go
package inbound import ( protocol "github.com/v2fly/v2ray-core/v5/common/protocol" _ "github.com/v2fly/v2ray-core/v5/common/protoext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/encrypt_test.go
proxy/vmess/aead/encrypt_test.go
package aead import ( "bytes" "fmt" "io" "testing" "github.com/stretchr/testify/assert" ) func TestOpenVMessAEADHeader(t *testing.T) { TestHeader := []byte("Test Header") key := KDF16([]byte("Demo Key for Auth ID Test"), "Demo Path for Auth ID Test") var keyw [16]byte copy(keyw[:], key) sealed := SealVMess...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/encrypt.go
proxy/vmess/aead/encrypt.go
package aead import ( "bytes" "crypto/aes" "crypto/cipher" "crypto/rand" "encoding/binary" "io" "time" "github.com/v2fly/v2ray-core/v5/common" ) func SealVMessAEADHeader(key [16]byte, data []byte) []byte { generatedAuthID := CreateAuthID(key[:], time.Now().Unix()) connectionNonce := make([]byte, 8) if _,...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/consts.go
proxy/vmess/aead/consts.go
package aead const ( KDFSaltConstAuthIDEncryptionKey = "AES Auth ID Encryption" KDFSaltConstAEADRespHeaderLenKey = "AEAD Resp Header Len Key" KDFSaltConstAEADRespHeaderLenIV = "AEAD Resp Header Len IV" KDFSaltConstAEADRespHeaderPayloadKey = "AEAD Resp Header Key" KDFSaltC...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/authid_test.go
proxy/vmess/aead/authid_test.go
package aead import ( "fmt" "strconv" "testing" "time" "github.com/stretchr/testify/assert" ) func TestCreateAuthID(t *testing.T) { key := KDF16([]byte("Demo Key for Auth ID Test"), "Demo Path for Auth ID Test") authid := CreateAuthID(key, time.Now().Unix()) fmt.Println(key) fmt.Println(authid) } func Tes...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/authid.go
proxy/vmess/aead/authid.go
package aead import ( "bytes" "crypto/aes" "crypto/cipher" rand3 "crypto/rand" "encoding/binary" "errors" "hash/crc32" "io" "math" "time" "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/antireplay" ) var ( ErrNotFound = errors.New("user do not exist") ErrReplay = errors...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/kdf.go
proxy/vmess/aead/kdf.go
package aead import ( "crypto/hmac" "crypto/sha256" "hash" ) func KDF(key []byte, path ...string) []byte { hmacCreator := &hMacCreator{value: []byte(KDFSaltConstVMessAEADKDF)} for _, v := range path { hmacCreator = &hMacCreator{value: []byte(v), parent: hmacCreator} } hmacf := hmacCreator.Create() hmacf.Wri...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/vmess/aead/kdf_test.go
proxy/vmess/aead/kdf_test.go
package aead import ( "encoding/hex" "fmt" "testing" "github.com/stretchr/testify/assert" ) func TestKDFValue(t *testing.T) { GeneratedKey := KDF([]byte("Demo Key for KDF Value Test"), "Demo Path for KDF Value Test", "Demo Path for KDF Value Test2", "Demo Path for KDF Value Test3") fmt.Println(hex.EncodeToStri...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/errors.generated.go
proxy/http/errors.generated.go
package http import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/client.go
proxy/http/client.go
package http import ( "bufio" "bytes" "context" "encoding/base64" "io" "net/http" "net/url" "sync" "time" "golang.org/x/net/http2" 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/bytespool" ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/config.go
proxy/http/config.go
package http import ( "github.com/v2fly/v2ray-core/v5/common/protocol" ) func (a *Account) Equals(another protocol.Account) bool { if account, ok := another.(*Account); ok { return a.Username == account.Username } return false } func (a *Account) AsAccount() (protocol.Account, error) { return a, nil } func (...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/server.go
proxy/http/server.go
package http import ( "bufio" "bytes" "context" "encoding/base64" "io" "net/http" "strings" "time" 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/errors" "github.com/v2fly/v2ray-core/v5/commo...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/http.go
proxy/http/http.go
package http //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/config.pb.go
proxy/http/config.pb.go
package http import ( protocol "github.com/v2fly/v2ray-core/v5/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Verify that this generated code is sufficiently up-t...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/simplified/config.go
proxy/http/simplified/config.go
package simplified import ( "context" "github.com/v2fly/v2ray-core/v5/common" "github.com/v2fly/v2ray-core/v5/common/protocol" "github.com/v2fly/v2ray-core/v5/proxy/http" ) func init() { common.Must(common.RegisterConfig((*ServerConfig)(nil), func(ctx context.Context, config interface{}) (interface{}, error) { ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/proxy/http/simplified/config.pb.go
proxy/http/simplified/config.pb.go
package simplified import ( net "github.com/v2fly/v2ray-core/v5/common/net" _ "github.com/v2fly/v2ray-core/v5/common/protoext" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" unsafe "unsafe" ) const ( // Veri...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/vformat/main.go
infra/vformat/main.go
package main import ( "fmt" "go/build" "os" "os/exec" "path/filepath" "runtime" "strings" ) // envFile returns the name of the Go environment configuration file. // Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb754938/src/cmd/go/internal/cfg/cfg.go#L150-L166 func envFile() (stri...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/vprotogen/main.go
infra/vprotogen/main.go
package main import ( "bufio" "bytes" "errors" "fmt" "go/build" "io" "net/http" "os" "os/exec" "path/filepath" "regexp" "runtime" "strconv" "strings" ) // envFile returns the name of the Go environment configuration file. // Copy from https://github.com/golang/go/blob/c4f2a9788a7be04daf931ac54382fbe2cb7...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/reverse.go
infra/conf/v4/reverse.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/app/reverse" ) type BridgeConfig struct { Tag string `json:"tag"` Domain string `json:"domain"` } func (c *BridgeConfig) Build() (*reverse.BridgeConfig, error) { return &reverse.BridgeConfig{ Tag: c.Tag, Domain: c....
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/socks.go
infra/conf/v4/socks.go
package v4 import ( "encoding/json" "strings" "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "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...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/policy.go
infra/conf/v4/policy.go
package v4 import ( "github.com/v2fly/v2ray-core/v5/app/policy" ) type Policy struct { Handshake *uint32 `json:"handshake"` ConnectionIdle *uint32 `json:"connIdle"` UplinkOnly *uint32 `json:"uplinkOnly"` DownlinkOnly *uint32 `json:"downlinkOnly"` StatsUserUplink bool `json:"statsUser...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/gun.go
infra/conf/v4/gun.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/transport/internet/grpc" ) type GunConfig struct { ServiceName string `json:"serviceName"` } func (g GunConfig) Build() (proto.Message, error) { return &grpc.Config{ServiceName: g.ServiceName}, nil }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/vmess.go
infra/conf/v4/vmess.go
package v4 import ( "encoding/json" "strings" "github.com/golang/protobuf/proto" "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/p...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/api.go
infra/conf/v4/api.go
package v4 import ( "strings" "github.com/jhump/protoreflect/desc" "github.com/jhump/protoreflect/dynamic" "google.golang.org/protobuf/types/known/anypb" "github.com/v2fly/v2ray-core/v5/app/commander" loggerservice "github.com/v2fly/v2ray-core/v5/app/log/command" observatoryservice "github.com/v2fly/v2ray-cor...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/policy_test.go
infra/conf/v4/policy_test.go
package v4_test import ( "testing" "github.com/v2fly/v2ray-core/v5/common" v4 "github.com/v2fly/v2ray-core/v5/infra/conf/v4" ) func TestBufferSize(t *testing.T) { cases := []struct { Input int32 Output int32 }{ { Input: 0, Output: 0, }, { Input: -1, Output: -1, }, { Input: 1, ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/errors.generated.go
infra/conf/v4/errors.generated.go
package v4 import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/vless_test.go
infra/conf/v4/vless_test.go
package v4_test import ( "testing" "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/v2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/transport_test.go
infra/conf/v4/transport_test.go
package v4_test import ( "encoding/json" "testing" "github.com/golang/protobuf/proto" "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"...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/shadowsocks.go
infra/conf/v4/shadowsocks.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "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" )...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/loopback.go
infra/conf/v4/loopback.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/proxy/loopback" ) type LoopbackConfig struct { InboundTag string `json:"inboundTag"` } func (l LoopbackConfig) Build() (proto.Message, error) { return &loopback.Config{InboundTag: l.InboundTag}, nil }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/browser_forwarder.go
infra/conf/v4/browser_forwarder.go
package v4 import ( "strings" "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/app/browserforwarder" ) type BrowserForwarderConfig struct { ListenAddr string `json:"listenAddr"` ListenPort int32 `json:"listenPort"` } func (b *BrowserForwarderConfig) Build() (proto.Message, error) { b.Liste...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/transport_internet.go
infra/conf/v4/transport_internet.go
package v4 import ( "encoding/json" "strings" "github.com/golang/protobuf/proto" "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...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/dns_proxy_test.go
infra/conf/v4/dns_proxy_test.go
package v4_test import ( "testing" "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 TestDnsProxyC...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/vless.go
infra/conf/v4/vless.go
package v4 import ( "encoding/json" "path/filepath" "runtime" "strconv" "strings" "syscall" "github.com/golang/protobuf/proto" "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/c...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/v2ray.go
infra/conf/v4/v2ray.go
package v4 import ( "context" "encoding/json" "fmt" "path/filepath" "strings" "google.golang.org/protobuf/types/known/anypb" 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" "githu...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/conf.go
infra/conf/v4/conf.go
package v4 //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/observatory.go
infra/conf/v4/observatory.go
package v4 import ( "encoding/json" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" "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/v2ra...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/vmess_test.go
infra/conf/v4/vmess_test.go
package v4_test import ( "testing" "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/v2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/dokodemo_test.go
infra/conf/v4/dokodemo_test.go
package v4_test import ( "testing" "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 TestDoko...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/socks_test.go
infra/conf/v4/socks_test.go
package v4_test import ( "testing" "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "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-cor...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/v2ray_test.go
infra/conf/v4/v2ray_test.go
package v4_test import ( "encoding/json" "reflect" "testing" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" 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/pr...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/blackhole.go
infra/conf/v4/blackhole.go
package v4 import ( "encoding/json" "github.com/golang/protobuf/proto" "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{}...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/lint.go
infra/conf/v4/lint.go
package v4 type ConfigureFilePostProcessingStage interface { Process(conf *Config) error } var configureFilePostProcessingStages map[string]ConfigureFilePostProcessingStage func RegisterConfigureFilePostProcessingStage(name string, stage ConfigureFilePostProcessingStage) { if configureFilePostProcessingStages == n...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/freedom_test.go
infra/conf/v4/freedom_test.go
package v4_test import ( "testing" "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/v2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/http_test.go
infra/conf/v4/http_test.go
package v4_test import ( "testing" "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) { creator := func() c...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/http.go
infra/conf/v4/http.go
package v4 import ( "encoding/json" "github.com/golang/protobuf/proto" "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 { Username string ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/services.go
infra/conf/v4/services.go
package v4 import ( "encoding/json" "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/v5/common/serial" ) func (c *Config) BuildServices(service map[string]*json.RawMessag...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/freedom.go
infra/conf/v4/freedom.go
package v4 import ( "net" "strings" "github.com/golang/protobuf/proto" 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 { DomainStrategy string `json:"domainStrategy"` Timeout ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/trojan.go
infra/conf/v4/trojan.go
package v4 import ( "encoding/json" "path/filepath" "runtime" "strconv" "strings" "syscall" "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/common/net" "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "github.com/v2fly/v2ray-core/v5/common/protocol" "github.com/v2fly/v2ray-core/v5...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/shadowsocks_test.go
infra/conf/v4/shadowsocks_test.go
package v4_test import ( "testing" "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/v2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/blackhole_test.go
infra/conf/v4/blackhole_test.go
package v4_test import ( "testing" "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 Test...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/transport_authenticators.go
infra/conf/v4/transport_authenticators.go
package v4 import ( "sort" "github.com/golang/protobuf/proto" "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" ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/transport.go
infra/conf/v4/transport.go
package v4 import ( "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 { TCPConfig *TCPConfig `json:"tcpSettings"` KCPConfig *KCPConfig `json:"kcpSettings"` WSConfig *We...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/dokodemo.go
infra/conf/v4/dokodemo.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon" "github.com/v2fly/v2ray-core/v5/proxy/dokodemo" ) type DokodemoConfig struct { Host *cfgcommon.Address `json:"address"` PortValue uint16 `json:"port"` NetworkList *cfgcom...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/dns_proxy.go
infra/conf/v4/dns_proxy.go
package v4 import ( "github.com/golang/protobuf/proto" "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 { Network cfgcommon.Network `json:"network"` Address *cfgcommon.Address `json:...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/hysteria2.go
infra/conf/v4/hysteria2.go
package v4 import ( "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/common/net/packetaddr" "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/hysteria2" ) ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v4/reverse_test.go
infra/conf/v4/reverse_test.go
package v4_test import ( "testing" "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) { creator := func() cfg...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/rule/rule_test.go
infra/conf/rule/rule_test.go
package rule_test import ( "context" "errors" "io/fs" "os" "path/filepath" "testing" "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/v...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/rule/errors.generated.go
infra/conf/rule/errors.generated.go
package rule import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/rule/rule.go
infra/conf/rule/rule.go
package rule import ( "context" "encoding/json" "strconv" "strings" "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/v2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/merge.go
infra/conf/mergers/merge.go
package mergers import ( "io" "path/filepath" "strings" 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 func MergeAs(formatName string, input interface{}, m map[string]interface{}) error { f, found := mergersByNam...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/errors.generated.go
infra/conf/mergers/errors.generated.go
package mergers import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/names.go
infra/conf/mergers/names.go
package mergers // GetAllNames get names of all formats func GetAllNames() []string { names := make([]string, 0) for _, f := range mergersByName { names = append(names, f.Name) } return names }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/mergers.go
infra/conf/mergers/mergers.go
package mergers //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen import ( "strings" 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() { common.Must(RegisterMerger(makeMerger( core.FormatJSON, ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/extensions.go
infra/conf/mergers/extensions.go
package mergers import "strings" // GetExtensions get extensions of given format func GetExtensions(formatName string) ([]string, error) { lowerName := strings.ToLower(formatName) if lowerName == "auto" { return GetAllExtensions(), nil } f, found := mergersByName[lowerName] if !found { return nil, newError(f...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/mergers/merger_base.go
infra/conf/mergers/merger_base.go
package mergers import ( "fmt" "io" "github.com/v2fly/v2ray-core/v5/common/cmdarg" "github.com/v2fly/v2ray-core/v5/common/errors" "github.com/v2fly/v2ray-core/v5/infra/conf/merge" ) type jsonConverter func(v []byte) ([]byte, error) // makeMerger makes a merger who merge the format by converting it to JSON func...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/jsonpb/jsonpb.go
infra/conf/jsonpb/jsonpb.go
package jsonpb import ( "bytes" "io" "github.com/golang/protobuf/jsonpb" "github.com/golang/protobuf/proto" 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...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/jsonpb/errors.generated.go
infra/conf/jsonpb/errors.generated.go
package jsonpb import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/json_test.go
infra/conf/json/json_test.go
package json_test import ( "encoding/json" "reflect" "testing" ) func assertResult(t *testing.T, value map[string]interface{}, expected string) { e := make(map[string]interface{}) err := json.Unmarshal([]byte(expected), &e) if err != nil { t.Error(err) } if !reflect.DeepEqual(value, e) { bs, _ := json.Mar...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/toml_test.go
infra/conf/json/toml_test.go
package json_test import ( "encoding/json" "testing" . "github.com/v2fly/v2ray-core/v5/infra/conf/json" ) func TestTOMLToJSON_V2Style(t *testing.T) { input := ` [log] loglevel = 'debug' [[inbounds]] port = 10800 listen = '127.0.0.1' protocol = 'socks' [inbounds.settings] udp = true [[outbounds]] protocol = 'v...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/yaml_test.go
infra/conf/json/yaml_test.go
package json_test import ( "encoding/json" "testing" . "github.com/v2fly/v2ray-core/v5/infra/conf/json" ) func TestYMLToJSON_V2Style(t *testing.T) { input := ` log: loglevel: debug inbounds: - port: 10800 listen: 127.0.0.1 protocol: socks settings: udp: true outbounds: - protocol: vmess settings: ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/reader.go
infra/conf/json/reader.go
package json import ( "io" "github.com/v2fly/v2ray-core/v5/common/buf" ) // State is the internal state of parser. type State byte const ( StateContent State = iota StateEscape StateDoubleQuote StateDoubleQuoteEscape StateSingleQuote StateSingleQuoteEscape StateComment StateSlash StateMultilineComment S...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/yaml.go
infra/conf/json/yaml.go
package json import ( "encoding/json" "fmt" "gopkg.in/yaml.v3" ) // FromYAML convert yaml to json func FromYAML(v []byte) ([]byte, error) { m1 := make(map[interface{}]interface{}) err := yaml.Unmarshal(v, &m1) if err != nil { return nil, err } m2 := convert(m1) j, err := json.Marshal(m2) if err != nil { ...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/reader_test.go
infra/conf/json/reader_test.go
package json_test import ( "bytes" "io" "testing" "github.com/google/go-cmp/cmp" "github.com/v2fly/v2ray-core/v5/common" . "github.com/v2fly/v2ray-core/v5/infra/conf/json" ) func TestReader(t *testing.T) { data := []struct { input string output string }{ { ` content #comment 1 #comment 2 content 2...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/json/toml.go
infra/conf/json/toml.go
package json import ( "bytes" "encoding/json" "io" "github.com/pelletier/go-toml" ) // FromTOML convert toml to json func FromTOML(v []byte) ([]byte, error) { tomlReader := bytes.NewReader(v) jsonStr, err := jsonFromTomlReader(tomlReader) if err != nil { return nil, err } return []byte(jsonStr), nil } fu...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/init.go
infra/conf/v5cfg/init.go
package v5cfg import ( "bytes" "io" 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/infra/conf/json" ) const jsonV5 = "jsonv5" func init() { common.Must(co...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/inbound.go
infra/conf/v5cfg/inbound.go
package v5cfg import ( "context" "path/filepath" "github.com/golang/protobuf/proto" 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/inte...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/root.go
infra/conf/v5cfg/root.go
package v5cfg import ( "bytes" "context" "encoding/json" "fmt" "github.com/golang/protobuf/proto" "google.golang.org/protobuf/types/known/anypb" 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/v...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/errors.generated.go
infra/conf/v5cfg/errors.generated.go
package v5cfg import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/stream.go
infra/conf/v5cfg/stream.go
package v5cfg import ( "context" "github.com/golang/protobuf/proto" "github.com/v2fly/v2ray-core/v5/common/serial" "github.com/v2fly/v2ray-core/v5/transport/internet" ) func (s StreamConfig) BuildV5(ctx context.Context) (proto.Message, error) { config := &internet.StreamConfig{} if s.Transport == "" { s.Tr...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/outbound.go
infra/conf/v5cfg/outbound.go
package v5cfg import ( "context" "github.com/golang/protobuf/proto" 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) (pro...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/v5cfg.go
infra/conf/v5cfg/v5cfg.go
package v5cfg //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/skeleton.go
infra/conf/v5cfg/skeleton.go
package v5cfg import ( "encoding/json" "github.com/v2fly/v2ray-core/v5/infra/conf/cfgcommon" "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/i...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/v5cfg/common.go
infra/conf/v5cfg/common.go
package v5cfg import ( "context" "encoding/json" "github.com/golang/protobuf/proto" "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, n...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/geodata.go
infra/conf/geodata/geodata.go
package geodata import ( "strings" "github.com/v2fly/v2ray-core/v5/app/router/routercommon" ) type loader struct { LoaderImplementation } func (l *loader) LoadGeoSite(list string) ([]*routercommon.Domain, error) { return l.LoadGeoSiteWithAttr("geosite.dat", list) } func (l *loader) LoadGeoSiteWithAttr(file str...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/errors.generated.go
infra/conf/geodata/errors.generated.go
package geodata import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/geodataproto.go
infra/conf/geodata/geodataproto.go
package geodata import ( "github.com/v2fly/v2ray-core/v5/app/router/routercommon" ) //go:generate go run github.com/v2fly/v2ray-core/v5/common/errors/errorgen type LoaderImplementation interface { LoadSite(filename, list string) ([]*routercommon.Domain, error) LoadIP(filename, country string) ([]*routercommon.CID...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/geodata_test.go
infra/conf/geodata/geodata_test.go
package geodata_test import ( "errors" "io/fs" "os" "path/filepath" "runtime" "testing" "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...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/attr.go
infra/conf/geodata/attr.go
package geodata import ( "strings" "github.com/v2fly/v2ray-core/v5/app/router/routercommon" ) type AttributeList struct { matcher []AttributeMatcher } func (al *AttributeList) Match(domain *routercommon.Domain) bool { for _, matcher := range al.matcher { if !matcher.Match(domain) { return false } } ret...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/standard/standard.go
infra/conf/geodata/standard/standard.go
package standard import ( "strings" "google.golang.org/protobuf/proto" "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/v5/common/errors/err...
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false
v2fly/v2ray-core
https://github.com/v2fly/v2ray-core/blob/b2c3b2506695d872162baeed95c9525fbfdbfda0/infra/conf/geodata/standard/errors.generated.go
infra/conf/geodata/standard/errors.generated.go
package standard import "github.com/v2fly/v2ray-core/v5/common/errors" type errPathObjHolder struct{} func newError(values ...interface{}) *errors.Error { return errors.New(values...).WithPathObj(errPathObjHolder{}) }
go
MIT
b2c3b2506695d872162baeed95c9525fbfdbfda0
2026-01-07T08:36:12.135351Z
false