diff --git a/app/commander/commander.go b/app/commander/commander.go index e0196af66..1a3c8ded5 100644 --- a/app/commander/commander.go +++ b/app/commander/commander.go @@ -2,7 +2,7 @@ package commander -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" @@ -11,10 +11,10 @@ import ( "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/features/outbound" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/features/outbound" ) // Commander is a V2Ray feature that provides gRPC methods to external clients. diff --git a/app/commander/config.pb.go b/app/commander/config.pb.go index 2741de5da..af8b603d8 100644 --- a/app/commander/config.pb.go +++ b/app/commander/config.pb.go @@ -8,11 +8,11 @@ package commander import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -139,10 +139,11 @@ var file_app_commander_config_proto_rawDesc = []byte{ 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x22, 0x12, 0x0a, 0x10, 0x52, 0x65, 0x66, 0x6c, 0x65, - 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, 0x0a, 0x1c, 0x63, + 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x69, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, - 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x1c, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x70, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x2c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/commander/config.proto b/app/commander/config.proto index 637202b75..f505004e5 100644 --- a/app/commander/config.proto +++ b/app/commander/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.commander; option csharp_namespace = "V2Ray.Core.App.Commander"; -option go_package = "v2ray.com/core/app/commander"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/commander"; option java_package = "com.v2ray.core.app.commander"; option java_multiple_files = true; diff --git a/app/commander/errors.generated.go b/app/commander/errors.generated.go index 406ec0cae..972bdd518 100644 --- a/app/commander/errors.generated.go +++ b/app/commander/errors.generated.go @@ -1,6 +1,6 @@ package commander -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/commander/outbound.go b/app/commander/outbound.go index 0a849ddd1..b89ae6312 100644 --- a/app/commander/outbound.go +++ b/app/commander/outbound.go @@ -6,10 +6,10 @@ import ( "context" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/transport" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/transport" ) // OutboundListener is a net.Listener for listening gRPC connections. diff --git a/app/commander/service.go b/app/commander/service.go index cf4e6a804..4c0604324 100644 --- a/app/commander/service.go +++ b/app/commander/service.go @@ -7,7 +7,8 @@ import ( "google.golang.org/grpc" "google.golang.org/grpc/reflection" - "v2ray.com/core/common" + + "github.com/v2fly/v2ray-core/v4/common" ) // Service is a Commander service. diff --git a/app/dispatcher/config.pb.go b/app/dispatcher/config.pb.go index a9b0e5143..749f8607d 100644 --- a/app/dispatcher/config.pb.go +++ b/app/dispatcher/config.pb.go @@ -123,10 +123,11 @@ var file_app_dispatcher_config_proto_rawDesc = []byte{ 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x2e, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x73, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x42, - 0x5c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x6c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, - 0x50, 0x01, 0x5a, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, + 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0xaa, 0x02, 0x19, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x69, 0x73, 0x70, 0x61, 0x74, 0x63, 0x68, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/dispatcher/config.proto b/app/dispatcher/config.proto index b461589c1..9e6295abd 100644 --- a/app/dispatcher/config.proto +++ b/app/dispatcher/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.dispatcher; option csharp_namespace = "V2Ray.Core.App.Dispatcher"; -option go_package = "v2ray.com/core/app/dispatcher"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/dispatcher"; option java_package = "com.v2ray.core.app.dispatcher"; option java_multiple_files = true; diff --git a/app/dispatcher/default.go b/app/dispatcher/default.go index c4629cc4f..e6e21f0ba 100644 --- a/app/dispatcher/default.go +++ b/app/dispatcher/default.go @@ -2,7 +2,7 @@ package dispatcher -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" @@ -10,20 +10,20 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - routing_session "v2ray.com/core/features/routing/session" - "v2ray.com/core/features/stats" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + 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/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + routing_session "github.com/v2fly/v2ray-core/v4/features/routing/session" + "github.com/v2fly/v2ray-core/v4/features/stats" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) var ( diff --git a/app/dispatcher/dispatcher.go b/app/dispatcher/dispatcher.go index 70c609321..b24b2422d 100644 --- a/app/dispatcher/dispatcher.go +++ b/app/dispatcher/dispatcher.go @@ -2,4 +2,4 @@ package dispatcher -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/app/dispatcher/errors.generated.go b/app/dispatcher/errors.generated.go index e11616099..b0b0ed878 100644 --- a/app/dispatcher/errors.generated.go +++ b/app/dispatcher/errors.generated.go @@ -1,6 +1,6 @@ package dispatcher -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/dispatcher/fakednssniffer.go b/app/dispatcher/fakednssniffer.go index cab292551..17d7811f1 100644 --- a/app/dispatcher/fakednssniffer.go +++ b/app/dispatcher/fakednssniffer.go @@ -5,11 +5,11 @@ package dispatcher import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/dns" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/dns" ) // newFakeDNSSniffer Create a Fake DNS metadata sniffer diff --git a/app/dispatcher/sniffer.go b/app/dispatcher/sniffer.go index 613dc8eba..92f0d5beb 100644 --- a/app/dispatcher/sniffer.go +++ b/app/dispatcher/sniffer.go @@ -5,10 +5,10 @@ package dispatcher import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/bittorrent" - "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/protocol/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol/bittorrent" + "github.com/v2fly/v2ray-core/v4/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls" ) type SniffResult interface { diff --git a/app/dispatcher/stats.go b/app/dispatcher/stats.go index 9b1c3a063..1bc5a8f04 100644 --- a/app/dispatcher/stats.go +++ b/app/dispatcher/stats.go @@ -3,9 +3,9 @@ package dispatcher import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/features/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/features/stats" ) type SizeStatWriter struct { diff --git a/app/dispatcher/stats_test.go b/app/dispatcher/stats_test.go index cdac8d9aa..841b2d873 100644 --- a/app/dispatcher/stats_test.go +++ b/app/dispatcher/stats_test.go @@ -3,9 +3,9 @@ package dispatcher_test import ( "testing" - . "v2ray.com/core/app/dispatcher" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + . "github.com/v2fly/v2ray-core/v4/app/dispatcher" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" ) type TestCounter int64 diff --git a/app/dns/config.go b/app/dns/config.go index e1e7d2de0..7c3fda4dd 100644 --- a/app/dns/config.go +++ b/app/dns/config.go @@ -3,9 +3,9 @@ package dns import ( - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) var typeMap = map[DomainMatchingType]strmatcher.Type{ diff --git a/app/dns/config.pb.go b/app/dns/config.pb.go index 68dcbe831..fcc1f8a58 100644 --- a/app/dns/config.pb.go +++ b/app/dns/config.pb.go @@ -8,12 +8,12 @@ package dns import ( proto "github.com/golang/protobuf/proto" + router "github.com/v2fly/v2ray-core/v4/app/router" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - router "v2ray.com/core/app/router" - net "v2ray.com/core/common/net" ) const ( @@ -526,10 +526,11 @@ var file_app_dns_config_proto_rawDesc = []byte{ 0x68, 0x69, 0x6e, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x75, 0x6c, 0x6c, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x53, 0x75, 0x62, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x4b, 0x65, 0x79, 0x77, 0x6f, 0x72, 0x64, 0x10, 0x02, 0x12, 0x09, - 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x03, 0x42, 0x47, 0x0a, 0x16, 0x63, 0x6f, 0x6d, + 0x0a, 0x05, 0x52, 0x65, 0x67, 0x65, 0x78, 0x10, 0x03, 0x42, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, - 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x16, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x12, + 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x26, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/app/dns/config.proto b/app/dns/config.proto index cba15eec4..22fb9393b 100644 --- a/app/dns/config.proto +++ b/app/dns/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.dns; option csharp_namespace = "V2Ray.Core.App.Dns"; -option go_package = "v2ray.com/core/app/dns"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/dns"; option java_package = "com.v2ray.core.app.dns"; option java_multiple_files = true; diff --git a/app/dns/dns.go b/app/dns/dns.go index 8c0c5dfe2..4c4713764 100644 --- a/app/dns/dns.go +++ b/app/dns/dns.go @@ -3,21 +3,21 @@ // Package dns is an implementation of core.DNS feature. package dns -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "fmt" "sync" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/features" - "v2ray.com/core/features/dns" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/features" + "github.com/v2fly/v2ray-core/v4/features/dns" ) // DNS is a DNS rely server. diff --git a/app/dns/dns_test.go b/app/dns/dns_test.go index bdccde2e5..996c96c38 100644 --- a/app/dns/dns_test.go +++ b/app/dns/dns_test.go @@ -6,19 +6,20 @@ import ( "github.com/google/go-cmp/cmp" "github.com/miekg/dns" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - . "v2ray.com/core/app/dns" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - feature_dns "v2ray.com/core/features/dns" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/testing/servers/udp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/dispatcher" + . "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + feature_dns "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) type staticHandler struct { diff --git a/app/dns/dnscommon.go b/app/dns/dnscommon.go index 955962bcb..8ddfdffdf 100644 --- a/app/dns/dnscommon.go +++ b/app/dns/dnscommon.go @@ -7,10 +7,11 @@ import ( "time" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - dns_feature "v2ray.com/core/features/dns" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + dns_feature "github.com/v2fly/v2ray-core/v4/features/dns" ) // Fqdn normalize domain make sure it ends with '.' diff --git a/app/dns/dnscommon_test.go b/app/dns/dnscommon_test.go index 24cc69270..689f2934f 100644 --- a/app/dns/dnscommon_test.go +++ b/app/dns/dnscommon_test.go @@ -10,8 +10,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/miekg/dns" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" ) func Test_parseResponse(t *testing.T) { @@ -147,8 +148,8 @@ func TestFqdn(t *testing.T) { args args want string }{ - {"with fqdn", args{"www.v2ray.com."}, "www.v2ray.com."}, - {"without fqdn", args{"www.v2ray.com"}, "www.v2ray.com."}, + {"with fqdn", args{"www.v2fly.org."}, "www.v2fly.org."}, + {"without fqdn", args{"www.v2fly.org"}, "www.v2fly.org."}, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/app/dns/errors.generated.go b/app/dns/errors.generated.go index ba70372f0..438eb646e 100644 --- a/app/dns/errors.generated.go +++ b/app/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/dns/fakedns/errors.generated.go b/app/dns/fakedns/errors.generated.go index c8ad60eda..c03d2a865 100644 --- a/app/dns/fakedns/errors.generated.go +++ b/app/dns/fakedns/errors.generated.go @@ -1,6 +1,6 @@ package fakedns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/dns/fakedns/fake.go b/app/dns/fakedns/fake.go index 22ff3ceb1..0d2d9a617 100644 --- a/app/dns/fakedns/fake.go +++ b/app/dns/fakedns/fake.go @@ -8,10 +8,10 @@ import ( "math/big" gonet "net" - "v2ray.com/core/common" - "v2ray.com/core/common/cache" - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/cache" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/dns" ) type Holder struct { diff --git a/app/dns/fakedns/fakedns.go b/app/dns/fakedns/fakedns.go index 0e55e5bd5..03703e728 100644 --- a/app/dns/fakedns/fakedns.go +++ b/app/dns/fakedns/fakedns.go @@ -2,4 +2,4 @@ package fakedns -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/app/dns/fakedns/fakedns.pb.go b/app/dns/fakedns/fakedns.pb.go index 4ebcf8005..0dabda1b3 100644 --- a/app/dns/fakedns/fakedns.pb.go +++ b/app/dns/fakedns/fakedns.pb.go @@ -90,11 +90,12 @@ var file_app_dns_fakedns_fakedns_proto_rawDesc = []byte{ 0x61, 0x6b, 0x65, 0x44, 0x6e, 0x73, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x17, 0x0a, 0x07, 0x69, 0x70, 0x5f, 0x70, 0x6f, 0x6f, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x69, 0x70, 0x50, 0x6f, 0x6f, 0x6c, 0x12, 0x18, 0x0a, 0x07, 0x6c, 0x72, 0x75, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6c, 0x72, 0x75, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x5f, 0x0a, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6c, 0x72, 0x75, 0x53, 0x69, 0x7a, 0x65, 0x42, 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x64, 0x6e, 0x73, 0x2e, 0x66, 0x61, 0x6b, 0x65, 0x64, 0x6e, 0x73, 0x50, - 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x64, 0x6e, + 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, + 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x64, 0x6e, 0x73, 0x2f, 0x66, 0x61, 0x6b, 0x65, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x44, 0x6e, 0x73, 0x2e, 0x46, 0x61, 0x6b, 0x65, 0x64, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/dns/fakedns/fakedns.proto b/app/dns/fakedns/fakedns.proto index 9f64b3863..a7d90dab9 100644 --- a/app/dns/fakedns/fakedns.proto +++ b/app/dns/fakedns/fakedns.proto @@ -2,11 +2,11 @@ syntax = "proto3"; package v2ray.core.app.dns.fakedns; option csharp_namespace = "V2Ray.Core.App.Dns.Fakedns"; -option go_package = "v2ray.com/core/app/dns/fakedns"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/dns/fakedns"; option java_package = "com.v2ray.core.app.dns.fakedns"; option java_multiple_files = true; message FakeDnsPool{ string ip_pool = 1; //CIDR of IP pool used as fake DNS IP int64 lruSize = 2; //Size of Pool for remembering relationship between domain name and IP address -} \ No newline at end of file +} diff --git a/app/dns/fakedns/fakedns_test.go b/app/dns/fakedns/fakedns_test.go index 8484b0c2b..1ddd587ac 100644 --- a/app/dns/fakedns/fakedns_test.go +++ b/app/dns/fakedns/fakedns_test.go @@ -4,9 +4,10 @@ import ( "testing" "github.com/stretchr/testify/assert" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/uuid" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) func TestNewFakeDnsHolder(_ *testing.T) { diff --git a/app/dns/hosts.go b/app/dns/hosts.go index 051a63bc4..1bae9485e 100644 --- a/app/dns/hosts.go +++ b/app/dns/hosts.go @@ -3,10 +3,10 @@ package dns import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/features" ) // StaticHosts represents static domain-ip mapping in DNS server. diff --git a/app/dns/hosts_test.go b/app/dns/hosts_test.go index 141487516..5846f6213 100644 --- a/app/dns/hosts_test.go +++ b/app/dns/hosts_test.go @@ -4,16 +4,17 @@ import ( "testing" "github.com/google/go-cmp/cmp" - . "v2ray.com/core/app/dns" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + + . "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" ) func TestStaticHosts(t *testing.T) { pb := []*Config_HostMapping{ { Type: DomainMatchingType_Full, - Domain: "v2ray.com", + Domain: "v2fly.org", Ip: [][]byte{ {1, 1, 1, 1}, }, @@ -38,7 +39,7 @@ func TestStaticHosts(t *testing.T) { common.Must(err) { - ips := hosts.Lookup("v2ray.com", IPOption{ + ips := hosts.Lookup("v2fly.org", IPOption{ IPv4Enable: true, IPv6Enable: true, }) diff --git a/app/dns/nameserver.go b/app/dns/nameserver.go index 22aab78e5..3cca0f097 100644 --- a/app/dns/nameserver.go +++ b/app/dns/nameserver.go @@ -7,12 +7,12 @@ import ( "net/url" "time" - "v2ray.com/core" - "v2ray.com/core/app/router" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/features/routing" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/features/routing" ) // IPOption is an object for IP query options. diff --git a/app/dns/nameserver_doh.go b/app/dns/nameserver_doh.go index b458be6f2..9507d247c 100644 --- a/app/dns/nameserver_doh.go +++ b/app/dns/nameserver_doh.go @@ -15,15 +15,16 @@ import ( "time" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/dns" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/pubsub" - "v2ray.com/core/common/task" - dns_feature "v2ray.com/core/features/dns" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/dns" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/pubsub" + "github.com/v2fly/v2ray-core/v4/common/task" + dns_feature "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // DoHNameServer implemented DNS over HTTPS (RFC8484) Wire Format, diff --git a/app/dns/nameserver_fakedns.go b/app/dns/nameserver_fakedns.go index 9fa01b4b1..d67671a1b 100644 --- a/app/dns/nameserver_fakedns.go +++ b/app/dns/nameserver_fakedns.go @@ -5,9 +5,9 @@ package dns import ( "context" - "v2ray.com/core" - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/dns" ) type FakeDNSServer struct { diff --git a/app/dns/nameserver_local.go b/app/dns/nameserver_local.go index 10a4be28c..f8ce9a923 100644 --- a/app/dns/nameserver_local.go +++ b/app/dns/nameserver_local.go @@ -5,8 +5,8 @@ package dns import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns/localdns" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/dns/localdns" ) // LocalNameServer is an wrapper over local DNS feature. diff --git a/app/dns/nameserver_local_test.go b/app/dns/nameserver_local_test.go index c6265e9f8..4a15fdec8 100644 --- a/app/dns/nameserver_local_test.go +++ b/app/dns/nameserver_local_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/dns" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + . "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" ) func TestLocalNameServer(t *testing.T) { diff --git a/app/dns/nameserver_quic.go b/app/dns/nameserver_quic.go index 3001c231f..9664a6728 100644 --- a/app/dns/nameserver_quic.go +++ b/app/dns/nameserver_quic.go @@ -12,15 +12,16 @@ import ( "github.com/lucas-clemente/quic-go" "golang.org/x/net/dns/dnsmessage" "golang.org/x/net/http2" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/dns" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/pubsub" - "v2ray.com/core/common/task" - dns_feature "v2ray.com/core/features/dns" - "v2ray.com/core/transport/internet/tls" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/dns" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/pubsub" + "github.com/v2fly/v2ray-core/v4/common/task" + dns_feature "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) // NextProtoDQ - During connection establishment, DNS/QUIC support is indicated diff --git a/app/dns/nameserver_quic_test.go b/app/dns/nameserver_quic_test.go index 35baeb7f5..58777c2d3 100644 --- a/app/dns/nameserver_quic_test.go +++ b/app/dns/nameserver_quic_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/dns" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + . "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" ) func TestQUICNameServer(t *testing.T) { diff --git a/app/dns/nameserver_udp.go b/app/dns/nameserver_udp.go index 9a507ec79..bffa13902 100644 --- a/app/dns/nameserver_udp.go +++ b/app/dns/nameserver_udp.go @@ -10,16 +10,17 @@ import ( "time" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/dns" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/pubsub" - "v2ray.com/core/common/task" - dns_feature "v2ray.com/core/features/dns" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet/udp" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/dns" + udp_proto "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/pubsub" + "github.com/v2fly/v2ray-core/v4/common/task" + dns_feature "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) // ClassicNameServer implemented traditional UDP DNS. diff --git a/app/log/command/command.go b/app/log/command/command.go index a6b6b5c21..47547e0ba 100644 --- a/app/log/command/command.go +++ b/app/log/command/command.go @@ -2,16 +2,16 @@ package command -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/common" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/common" ) type LoggerServer struct { diff --git a/app/log/command/command_test.go b/app/log/command/command_test.go index be96d7578..d01395f57 100644 --- a/app/log/command/command_test.go +++ b/app/log/command/command_test.go @@ -4,15 +4,15 @@ import ( "context" "testing" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - . "v2ray.com/core/app/log/command" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" + 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/log/command" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/inbound" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/serial" ) func TestLoggerRestart(t *testing.T) { diff --git a/app/log/command/config.pb.go b/app/log/command/config.pb.go index 31518b570..a6cbd1e4f 100644 --- a/app/log/command/config.pb.go +++ b/app/log/command/config.pb.go @@ -158,10 +158,11 @@ var file_app_log_command_config_proto_rawDesc = []byte{ 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x61, 0x72, 0x74, 0x4c, 0x6f, 0x67, 0x67, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, - 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, - 0x64, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, + 0x64, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/log/command/config.proto b/app/log/command/config.proto index 369923c83..a312ae695 100644 --- a/app/log/command/config.proto +++ b/app/log/command/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.log.command; option csharp_namespace = "V2Ray.Core.App.Log.Command"; -option go_package = "v2ray.com/core/app/log/command"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/log/command"; option java_package = "com.v2ray.core.app.log.command"; option java_multiple_files = true; diff --git a/app/log/command/errors.generated.go b/app/log/command/errors.generated.go index 66f780510..3b1f040e5 100644 --- a/app/log/command/errors.generated.go +++ b/app/log/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/log/config.pb.go b/app/log/config.pb.go index c97b3b32b..926e61e7a 100644 --- a/app/log/config.pb.go +++ b/app/log/config.pb.go @@ -8,11 +8,11 @@ package log import ( proto "github.com/golang/protobuf/proto" + log "github.com/v2fly/v2ray-core/v4/common/log" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - log "v2ray.com/core/common/log" ) const ( @@ -186,9 +186,10 @@ var file_app_log_config_proto_rawDesc = []byte{ 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x6f, 0x6e, 0x65, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x43, 0x6f, 0x6e, 0x73, 0x6f, 0x6c, 0x65, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x46, 0x69, 0x6c, 0x65, 0x10, 0x02, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x10, - 0x03, 0x42, 0x47, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x16, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x03, 0x42, 0x57, 0x0a, 0x16, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x6c, 0x6f, 0x67, 0x50, 0x01, 0x5a, 0x26, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x12, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/log/config.proto b/app/log/config.proto index 2931b713f..eeaa1d6e5 100644 --- a/app/log/config.proto +++ b/app/log/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.log; option csharp_namespace = "V2Ray.Core.App.Log"; -option go_package = "v2ray.com/core/app/log"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/log"; option java_package = "com.v2ray.core.app.log"; option java_multiple_files = true; diff --git a/app/log/errors.generated.go b/app/log/errors.generated.go index 3088c8116..e5ffeaa3f 100644 --- a/app/log/errors.generated.go +++ b/app/log/errors.generated.go @@ -1,6 +1,6 @@ package log -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/log/log.go b/app/log/log.go index ae78be3b3..e492ffa0c 100644 --- a/app/log/log.go +++ b/app/log/log.go @@ -2,14 +2,14 @@ package log -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/log" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/log" ) // Instance is a log.Handler that handles logs. diff --git a/app/log/log_creator.go b/app/log/log_creator.go index c7ea5a805..ceb5fd532 100644 --- a/app/log/log_creator.go +++ b/app/log/log_creator.go @@ -3,8 +3,8 @@ package log import ( - "v2ray.com/core/common" - "v2ray.com/core/common/log" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/log" ) type HandlerCreatorOptions struct { diff --git a/app/log/log_test.go b/app/log/log_test.go index 41bb7e832..1d7901e11 100644 --- a/app/log/log_test.go +++ b/app/log/log_test.go @@ -5,10 +5,11 @@ import ( "testing" "github.com/golang/mock/gomock" - "v2ray.com/core/app/log" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/testing/mocks" + + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/common" + clog "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/testing/mocks" ) func TestCustomLogHandler(t *testing.T) { diff --git a/app/policy/config.go b/app/policy/config.go index adf09448a..715c97b06 100644 --- a/app/policy/config.go +++ b/app/policy/config.go @@ -3,7 +3,7 @@ package policy import ( "time" - "v2ray.com/core/features/policy" + "github.com/v2fly/v2ray-core/v4/features/policy" ) // Duration converts Second to time.Duration. diff --git a/app/policy/config.pb.go b/app/policy/config.pb.go index 2454a567d..f68d18328 100644 --- a/app/policy/config.pb.go +++ b/app/policy/config.pb.go @@ -558,10 +558,11 @@ var file_app_policy_config_proto_rawDesc = []byte{ 0x33, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x52, 0x05, 0x76, - 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, - 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, + 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x6f, 0x6c, 0x69, 0x63, 0x79, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/policy/config.proto b/app/policy/config.proto index cc07fa3f8..b6044f3fb 100644 --- a/app/policy/config.proto +++ b/app/policy/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.policy; option csharp_namespace = "V2Ray.Core.App.Policy"; -option go_package = "v2ray.com/core/app/policy"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/policy"; option java_package = "com.v2ray.core.app.policy"; option java_multiple_files = true; diff --git a/app/policy/errors.generated.go b/app/policy/errors.generated.go index 123e84992..f320ff8cd 100644 --- a/app/policy/errors.generated.go +++ b/app/policy/errors.generated.go @@ -1,6 +1,6 @@ package policy -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/policy/manager.go b/app/policy/manager.go index 205fe3d66..84ebda7b6 100644 --- a/app/policy/manager.go +++ b/app/policy/manager.go @@ -3,8 +3,8 @@ package policy import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features/policy" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/policy" ) // Instance is an instance of Policy manager. diff --git a/app/policy/manager_test.go b/app/policy/manager_test.go index 8f2a61759..a091ae2bf 100644 --- a/app/policy/manager_test.go +++ b/app/policy/manager_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/policy" - "v2ray.com/core/common" - "v2ray.com/core/features/policy" + . "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/policy" ) func TestPolicy(t *testing.T) { diff --git a/app/policy/policy.go b/app/policy/policy.go index 4ae0b0285..8082e23fc 100644 --- a/app/policy/policy.go +++ b/app/policy/policy.go @@ -1,4 +1,4 @@ // Package policy is an implementation of policy.Manager feature. package policy -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/app/proxyman/command/command.go b/app/proxyman/command/command.go index 6586bf0c1..c60c431d0 100644 --- a/app/proxyman/command/command.go +++ b/app/proxyman/command/command.go @@ -7,11 +7,11 @@ import ( grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/features/inbound" - "v2ray.com/core/features/outbound" - "v2ray.com/core/proxy" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/inbound" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/proxy" ) // InboundOperation is the interface for operations that applies to inbound handlers. diff --git a/app/proxyman/command/command.pb.go b/app/proxyman/command/command.pb.go index e653cdadf..3c645db23 100644 --- a/app/proxyman/command/command.pb.go +++ b/app/proxyman/command/command.pb.go @@ -8,13 +8,13 @@ package command import ( proto "github.com/golang/protobuf/proto" + v4 "github.com/v2fly/v2ray-core/v4" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - core "v2ray.com/core" - protocol "v2ray.com/core/common/protocol" - serial "v2ray.com/core/common/serial" ) const ( @@ -127,7 +127,7 @@ type AddInboundRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Inbound *core.InboundHandlerConfig `protobuf:"bytes,1,opt,name=inbound,proto3" json:"inbound,omitempty"` + Inbound *v4.InboundHandlerConfig `protobuf:"bytes,1,opt,name=inbound,proto3" json:"inbound,omitempty"` } func (x *AddInboundRequest) Reset() { @@ -162,7 +162,7 @@ func (*AddInboundRequest) Descriptor() ([]byte, []int) { return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{2} } -func (x *AddInboundRequest) GetInbound() *core.InboundHandlerConfig { +func (x *AddInboundRequest) GetInbound() *v4.InboundHandlerConfig { if x != nil { return x.Inbound } @@ -390,7 +390,7 @@ type AddOutboundRequest struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Outbound *core.OutboundHandlerConfig `protobuf:"bytes,1,opt,name=outbound,proto3" json:"outbound,omitempty"` + Outbound *v4.OutboundHandlerConfig `protobuf:"bytes,1,opt,name=outbound,proto3" json:"outbound,omitempty"` } func (x *AddOutboundRequest) Reset() { @@ -425,7 +425,7 @@ func (*AddOutboundRequest) Descriptor() ([]byte, []int) { return file_app_proxyman_command_command_proto_rawDescGZIP(), []int{8} } -func (x *AddOutboundRequest) GetOutbound() *core.OutboundHandlerConfig { +func (x *AddOutboundRequest) GetOutbound() *v4.OutboundHandlerConfig { if x != nil { return x.Outbound } @@ -794,10 +794,11 @@ var file_app_proxyman_command_command_proto_rawDesc = []byte{ 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x41, 0x6c, 0x74, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, - 0x00, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x00, 0x42, 0x7e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, @@ -818,25 +819,25 @@ func file_app_proxyman_command_command_proto_rawDescGZIP() []byte { var file_app_proxyman_command_command_proto_msgTypes = make([]protoimpl.MessageInfo, 15) var file_app_proxyman_command_command_proto_goTypes = []interface{}{ - (*AddUserOperation)(nil), // 0: v2ray.core.app.proxyman.command.AddUserOperation - (*RemoveUserOperation)(nil), // 1: v2ray.core.app.proxyman.command.RemoveUserOperation - (*AddInboundRequest)(nil), // 2: v2ray.core.app.proxyman.command.AddInboundRequest - (*AddInboundResponse)(nil), // 3: v2ray.core.app.proxyman.command.AddInboundResponse - (*RemoveInboundRequest)(nil), // 4: v2ray.core.app.proxyman.command.RemoveInboundRequest - (*RemoveInboundResponse)(nil), // 5: v2ray.core.app.proxyman.command.RemoveInboundResponse - (*AlterInboundRequest)(nil), // 6: v2ray.core.app.proxyman.command.AlterInboundRequest - (*AlterInboundResponse)(nil), // 7: v2ray.core.app.proxyman.command.AlterInboundResponse - (*AddOutboundRequest)(nil), // 8: v2ray.core.app.proxyman.command.AddOutboundRequest - (*AddOutboundResponse)(nil), // 9: v2ray.core.app.proxyman.command.AddOutboundResponse - (*RemoveOutboundRequest)(nil), // 10: v2ray.core.app.proxyman.command.RemoveOutboundRequest - (*RemoveOutboundResponse)(nil), // 11: v2ray.core.app.proxyman.command.RemoveOutboundResponse - (*AlterOutboundRequest)(nil), // 12: v2ray.core.app.proxyman.command.AlterOutboundRequest - (*AlterOutboundResponse)(nil), // 13: v2ray.core.app.proxyman.command.AlterOutboundResponse - (*Config)(nil), // 14: v2ray.core.app.proxyman.command.Config - (*protocol.User)(nil), // 15: v2ray.core.common.protocol.User - (*core.InboundHandlerConfig)(nil), // 16: v2ray.core.InboundHandlerConfig - (*serial.TypedMessage)(nil), // 17: v2ray.core.common.serial.TypedMessage - (*core.OutboundHandlerConfig)(nil), // 18: v2ray.core.OutboundHandlerConfig + (*AddUserOperation)(nil), // 0: v2ray.core.app.proxyman.command.AddUserOperation + (*RemoveUserOperation)(nil), // 1: v2ray.core.app.proxyman.command.RemoveUserOperation + (*AddInboundRequest)(nil), // 2: v2ray.core.app.proxyman.command.AddInboundRequest + (*AddInboundResponse)(nil), // 3: v2ray.core.app.proxyman.command.AddInboundResponse + (*RemoveInboundRequest)(nil), // 4: v2ray.core.app.proxyman.command.RemoveInboundRequest + (*RemoveInboundResponse)(nil), // 5: v2ray.core.app.proxyman.command.RemoveInboundResponse + (*AlterInboundRequest)(nil), // 6: v2ray.core.app.proxyman.command.AlterInboundRequest + (*AlterInboundResponse)(nil), // 7: v2ray.core.app.proxyman.command.AlterInboundResponse + (*AddOutboundRequest)(nil), // 8: v2ray.core.app.proxyman.command.AddOutboundRequest + (*AddOutboundResponse)(nil), // 9: v2ray.core.app.proxyman.command.AddOutboundResponse + (*RemoveOutboundRequest)(nil), // 10: v2ray.core.app.proxyman.command.RemoveOutboundRequest + (*RemoveOutboundResponse)(nil), // 11: v2ray.core.app.proxyman.command.RemoveOutboundResponse + (*AlterOutboundRequest)(nil), // 12: v2ray.core.app.proxyman.command.AlterOutboundRequest + (*AlterOutboundResponse)(nil), // 13: v2ray.core.app.proxyman.command.AlterOutboundResponse + (*Config)(nil), // 14: v2ray.core.app.proxyman.command.Config + (*protocol.User)(nil), // 15: v2ray.core.common.protocol.User + (*v4.InboundHandlerConfig)(nil), // 16: v2ray.core.InboundHandlerConfig + (*serial.TypedMessage)(nil), // 17: v2ray.core.common.serial.TypedMessage + (*v4.OutboundHandlerConfig)(nil), // 18: v2ray.core.OutboundHandlerConfig } var file_app_proxyman_command_command_proto_depIdxs = []int32{ 15, // 0: v2ray.core.app.proxyman.command.AddUserOperation.user:type_name -> v2ray.core.common.protocol.User diff --git a/app/proxyman/command/command.proto b/app/proxyman/command/command.proto index 71004ad5f..77749e41b 100644 --- a/app/proxyman/command/command.proto +++ b/app/proxyman/command/command.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.proxyman.command; option csharp_namespace = "V2Ray.Core.App.Proxyman.Command"; -option go_package = "v2ray.com/core/app/proxyman/command"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/proxyman/command"; option java_package = "com.v2ray.core.app.proxyman.command"; option java_multiple_files = true; diff --git a/app/proxyman/command/doc.go b/app/proxyman/command/doc.go index d09e0a9a3..dabcfaf5e 100644 --- a/app/proxyman/command/doc.go +++ b/app/proxyman/command/doc.go @@ -1,3 +1,3 @@ package command -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/app/proxyman/command/errors.generated.go b/app/proxyman/command/errors.generated.go index 66f780510..3b1f040e5 100644 --- a/app/proxyman/command/errors.generated.go +++ b/app/proxyman/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/config.pb.go b/app/proxyman/config.pb.go index f8ff84015..a6409d760 100644 --- a/app/proxyman/config.pb.go +++ b/app/proxyman/config.pb.go @@ -8,13 +8,13 @@ package proxyman import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" + serial "github.com/v2fly/v2ray-core/v4/common/serial" + internet "github.com/v2fly/v2ray-core/v4/transport/internet" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" - serial "v2ray.com/core/common/serial" - internet "v2ray.com/core/transport/internet" ) const ( @@ -853,10 +853,11 @@ var file_app_proxyman_config_proto_rawDesc = []byte{ 0x65, 0x6e, 0x63, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x63, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x2a, 0x23, 0x0a, 0x0e, 0x4b, 0x6e, 0x6f, 0x77, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x73, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, - 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x10, 0x01, 0x42, 0x56, 0x0a, 0x1b, + 0x50, 0x10, 0x00, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x4c, 0x53, 0x10, 0x01, 0x42, 0x66, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, - 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x1b, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x70, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x2b, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0xaa, 0x02, 0x17, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x6d, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/proxyman/config.proto b/app/proxyman/config.proto index ca9e625c0..9c2b68ab1 100644 --- a/app/proxyman/config.proto +++ b/app/proxyman/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.proxyman; option csharp_namespace = "V2Ray.Core.App.Proxyman"; -option go_package = "v2ray.com/core/app/proxyman"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/proxyman"; option java_package = "com.v2ray.core.app.proxyman"; option java_multiple_files = true; diff --git a/app/proxyman/inbound/always.go b/app/proxyman/inbound/always.go index 33014416c..8be2f3f18 100644 --- a/app/proxyman/inbound/always.go +++ b/app/proxyman/inbound/always.go @@ -3,17 +3,17 @@ package inbound import ( "context" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/stats" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/stats" + "github.com/v2fly/v2ray-core/v4/proxy" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter) { diff --git a/app/proxyman/inbound/dynamic.go b/app/proxyman/inbound/dynamic.go index f20920699..275033724 100644 --- a/app/proxyman/inbound/dynamic.go +++ b/app/proxyman/inbound/dynamic.go @@ -5,14 +5,14 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/proxy" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type DynamicInboundHandler struct { diff --git a/app/proxyman/inbound/errors.generated.go b/app/proxyman/inbound/errors.generated.go index 90d805b1e..91f661e21 100644 --- a/app/proxyman/inbound/errors.generated.go +++ b/app/proxyman/inbound/errors.generated.go @@ -1,6 +1,6 @@ package inbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/inbound/inbound.go b/app/proxyman/inbound/inbound.go index 947205e86..df818cd3c 100644 --- a/app/proxyman/inbound/inbound.go +++ b/app/proxyman/inbound/inbound.go @@ -1,17 +1,17 @@ package inbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "sync" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/features/inbound" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/inbound" ) // Manager is to manage all inbound handlers. diff --git a/app/proxyman/inbound/worker.go b/app/proxyman/inbound/worker.go index 38f86910d..30f82c20d 100644 --- a/app/proxyman/inbound/worker.go +++ b/app/proxyman/inbound/worker.go @@ -6,21 +6,21 @@ import ( "sync/atomic" "time" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" - "v2ray.com/core/proxy" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/udp" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/features/stats" + "github.com/v2fly/v2ray-core/v4/proxy" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tcp" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type worker interface { diff --git a/app/proxyman/outbound/errors.generated.go b/app/proxyman/outbound/errors.generated.go index 37e984d87..1d0f494bd 100644 --- a/app/proxyman/outbound/errors.generated.go +++ b/app/proxyman/outbound/errors.generated.go @@ -1,6 +1,6 @@ package outbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/proxyman/outbound/handler.go b/app/proxyman/outbound/handler.go index f899e6b8d..5e5ba1216 100644 --- a/app/proxyman/outbound/handler.go +++ b/app/proxyman/outbound/handler.go @@ -3,20 +3,20 @@ package outbound import ( "context" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/stats" - "v2ray.com/core/proxy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/pipe" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/stats" + "github.com/v2fly/v2ray-core/v4/proxy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter) { diff --git a/app/proxyman/outbound/handler_test.go b/app/proxyman/outbound/handler_test.go index b3b6e0545..8c8169573 100644 --- a/app/proxyman/outbound/handler_test.go +++ b/app/proxyman/outbound/handler_test.go @@ -4,15 +4,15 @@ import ( "context" "testing" - "v2ray.com/core" - "v2ray.com/core/app/policy" - . "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/app/stats" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/features/outbound" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/transport/internet" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/policy" + . "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" + "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestInterfaces(t *testing.T) { diff --git a/app/proxyman/outbound/outbound.go b/app/proxyman/outbound/outbound.go index e01c7bb08..71b464e3b 100644 --- a/app/proxyman/outbound/outbound.go +++ b/app/proxyman/outbound/outbound.go @@ -1,17 +1,17 @@ package outbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "strings" "sync" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/features/outbound" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/features/outbound" ) // Manager is to manage all outbound handlers. diff --git a/app/reverse/bridge.go b/app/reverse/bridge.go index 502745485..1755ed3d2 100644 --- a/app/reverse/bridge.go +++ b/app/reverse/bridge.go @@ -7,13 +7,14 @@ import ( "time" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) // Bridge is a component in reverse proxy, that relays connections from Portal to local address. diff --git a/app/reverse/config.go b/app/reverse/config.go index 04259baee..623db4af1 100644 --- a/app/reverse/config.go +++ b/app/reverse/config.go @@ -6,7 +6,7 @@ import ( "crypto/rand" "io" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common/dice" ) func (c *Control) FillInRandom() { diff --git a/app/reverse/config.pb.go b/app/reverse/config.pb.go index 18833d8ca..b165f760a 100644 --- a/app/reverse/config.pb.go +++ b/app/reverse/config.pb.go @@ -322,10 +322,11 @@ var file_app_reverse_config_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x61, 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0c, 0x70, 0x6f, 0x72, 0x74, 0x61, - 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x57, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x6c, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x67, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x65, + 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x52, 0x65, 0x76, 0x65, 0x72, 0x73, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/reverse/config.proto b/app/reverse/config.proto index 53c81fbc4..3aabf740c 100644 --- a/app/reverse/config.proto +++ b/app/reverse/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.reverse; option csharp_namespace = "V2Ray.Core.Proxy.Reverse"; -option go_package = "v2ray.com/core/app/reverse"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/reverse"; option java_package = "com.v2ray.core.proxy.reverse"; option java_multiple_files = true; diff --git a/app/reverse/errors.generated.go b/app/reverse/errors.generated.go index e72207995..7300553a2 100644 --- a/app/reverse/errors.generated.go +++ b/app/reverse/errors.generated.go @@ -1,6 +1,6 @@ package reverse -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/reverse/portal.go b/app/reverse/portal.go index ed846fe0c..34066f219 100644 --- a/app/reverse/portal.go +++ b/app/reverse/portal.go @@ -8,15 +8,16 @@ import ( "time" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/outbound" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type Portal struct { diff --git a/app/reverse/portal_test.go b/app/reverse/portal_test.go index aa4660a5b..27bf10832 100644 --- a/app/reverse/portal_test.go +++ b/app/reverse/portal_test.go @@ -3,8 +3,8 @@ package reverse_test import ( "testing" - "v2ray.com/core/app/reverse" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/app/reverse" + "github.com/v2fly/v2ray-core/v4/common" ) func TestStaticPickerEmpty(t *testing.T) { diff --git a/app/reverse/reverse.go b/app/reverse/reverse.go index a1d262863..9609a79c9 100644 --- a/app/reverse/reverse.go +++ b/app/reverse/reverse.go @@ -2,21 +2,21 @@ package reverse -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/routing" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/routing" ) const ( - internalDomain = "reverse.internal.v2ray.com" + internalDomain = "reverse.internal.v2fly.org" ) func isDomain(dest net.Destination, domain string) bool { diff --git a/app/router/balancing.go b/app/router/balancing.go index 0cede3922..53088b6de 100644 --- a/app/router/balancing.go +++ b/app/router/balancing.go @@ -3,8 +3,8 @@ package router import ( - "v2ray.com/core/common/dice" - "v2ray.com/core/features/outbound" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/features/outbound" ) type BalancingStrategy interface { diff --git a/app/router/command/command.go b/app/router/command/command.go index 6d777829d..52a541ed0 100644 --- a/app/router/command/command.go +++ b/app/router/command/command.go @@ -2,17 +2,18 @@ package command -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "time" "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/features/stats" ) // routingServer is an implementation of RoutingService. diff --git a/app/router/command/command.pb.go b/app/router/command/command.pb.go index 1dceee086..a12a8e4b7 100644 --- a/app/router/command/command.pb.go +++ b/app/router/command/command.pb.go @@ -8,11 +8,11 @@ package command import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" ) const ( @@ -412,11 +412,12 @@ var file_app_router_command_command_proto_rawDesc = []byte{ 0x74, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x52, 0x6f, - 0x75, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x00, 0x42, 0x68, + 0x75, 0x74, 0x69, 0x6e, 0x67, 0x43, 0x6f, 0x6e, 0x74, 0x65, 0x78, 0x74, 0x22, 0x00, 0x42, 0x78, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, - 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, + 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1d, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/router/command/command.proto b/app/router/command/command.proto index 65e732542..e7d485459 100644 --- a/app/router/command/command.proto +++ b/app/router/command/command.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.router.command; option csharp_namespace = "V2Ray.Core.App.Router.Command"; -option go_package = "v2ray.com/core/app/router/command"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/router/command"; option java_package = "com.v2ray.core.app.router.command"; option java_multiple_files = true; diff --git a/app/router/command/command_test.go b/app/router/command/command_test.go index 258ff1a09..3b4e584bb 100644 --- a/app/router/command/command_test.go +++ b/app/router/command/command_test.go @@ -10,13 +10,14 @@ import ( "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/grpc" "google.golang.org/grpc/test/bufconn" - "v2ray.com/core/app/router" - . "v2ray.com/core/app/router/command" - "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/features/routing" - "v2ray.com/core/testing/mocks" + + "github.com/v2fly/v2ray-core/v4/app/router" + . "github.com/v2fly/v2ray-core/v4/app/router/command" + "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/testing/mocks" ) func TestServiceSubscribeRoutingStats(t *testing.T) { diff --git a/app/router/command/config.go b/app/router/command/config.go index c6a242e6c..20aa425c5 100644 --- a/app/router/command/config.go +++ b/app/router/command/config.go @@ -3,8 +3,8 @@ package command import ( "strings" - "v2ray.com/core/common/net" - "v2ray.com/core/features/routing" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/routing" ) // routingContext is an wrapper of protobuf RoutingContext as implementation of routing.Context and routing.Route. diff --git a/app/router/command/errors.generated.go b/app/router/command/errors.generated.go index 66f780510..3b1f040e5 100644 --- a/app/router/command/errors.generated.go +++ b/app/router/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/router/condition.go b/app/router/condition.go index 9da16378b..9c87a6a1c 100644 --- a/app/router/condition.go +++ b/app/router/condition.go @@ -7,9 +7,10 @@ import ( "go.starlark.net/starlark" "go.starlark.net/syntax" - "v2ray.com/core/common/net" - "v2ray.com/core/common/strmatcher" - "v2ray.com/core/features/routing" + + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/features/routing" ) type Condition interface { diff --git a/app/router/condition_geoip.go b/app/router/condition_geoip.go index 2688bc38b..f8c8ffc47 100644 --- a/app/router/condition_geoip.go +++ b/app/router/condition_geoip.go @@ -6,7 +6,7 @@ import ( "encoding/binary" "sort" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) type ipv6 struct { diff --git a/app/router/condition_geoip_test.go b/app/router/condition_geoip_test.go index 9c73393ea..c3c6ae006 100644 --- a/app/router/condition_geoip_test.go +++ b/app/router/condition_geoip_test.go @@ -6,11 +6,12 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" + + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/common/platform/filesystem" ) func init() { diff --git a/app/router/condition_test.go b/app/router/condition_test.go index 468970de3..20fb0c6b9 100644 --- a/app/router/condition_test.go +++ b/app/router/condition_test.go @@ -8,17 +8,17 @@ import ( "github.com/golang/protobuf/proto" - . "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" - "v2ray.com/core/features/routing" - routing_session "v2ray.com/core/features/routing/session" + . "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/common/platform/filesystem" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/routing" + routing_session "github.com/v2fly/v2ray-core/v4/features/routing/session" ) func init() { @@ -63,7 +63,7 @@ func TestRoutingRule(t *testing.T) { rule: &RoutingRule{ Domain: []*Domain{ { - Value: "v2ray.com", + Value: "v2fly.org", Type: Domain_Plain, }, { @@ -78,11 +78,11 @@ func TestRoutingRule(t *testing.T) { }, test: []ruleTest{ { - input: withOutbound(&session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)}), + input: withOutbound(&session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2fly.org"), 80)}), output: true, }, { - input: withOutbound(&session.Outbound{Target: net.TCPDestination(net.DomainAddress("www.v2ray.com.www"), 80)}), + input: withOutbound(&session.Outbound{Target: net.TCPDestination(net.DomainAddress("www.v2fly.org.www"), 80)}), output: true, }, { @@ -206,16 +206,16 @@ func TestRoutingRule(t *testing.T) { { rule: &RoutingRule{ UserEmail: []string{ - "admin@v2ray.com", + "admin@v2fly.org", }, }, test: []ruleTest{ { - input: withInbound(&session.Inbound{User: &protocol.MemoryUser{Email: "admin@v2ray.com"}}), + input: withInbound(&session.Inbound{User: &protocol.MemoryUser{Email: "admin@v2fly.org"}}), output: true, }, { - input: withInbound(&session.Inbound{User: &protocol.MemoryUser{Email: "love@v2ray.com"}}), + input: withInbound(&session.Inbound{User: &protocol.MemoryUser{Email: "love@v2fly.org"}}), output: false, }, { diff --git a/app/router/config.go b/app/router/config.go index 62b0ada7c..16b8a9527 100644 --- a/app/router/config.go +++ b/app/router/config.go @@ -3,9 +3,9 @@ package router import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/routing" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/routing" ) // CIDRList is an alias of []*CIDR to provide sort.Interface. diff --git a/app/router/config.pb.go b/app/router/config.pb.go index 5c96632de..f39caabe5 100644 --- a/app/router/config.pb.go +++ b/app/router/config.pb.go @@ -8,11 +8,11 @@ package router import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" ) const ( @@ -1025,10 +1025,11 @@ var file_app_router_config_proto_rawDesc = []byte{ 0x79, 0x12, 0x08, 0x0a, 0x04, 0x41, 0x73, 0x49, 0x73, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x55, 0x73, 0x65, 0x49, 0x70, 0x10, 0x01, 0x12, 0x10, 0x0a, 0x0c, 0x49, 0x70, 0x49, 0x66, 0x4e, 0x6f, 0x6e, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x49, 0x70, 0x4f, 0x6e, - 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, + 0x44, 0x65, 0x6d, 0x61, 0x6e, 0x64, 0x10, 0x03, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x72, - 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, + 0x6f, 0x75, 0x74, 0x65, 0x72, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x72, 0x6f, 0x75, 0x74, 0x65, 0x72, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x52, 0x6f, 0x75, 0x74, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/router/config.proto b/app/router/config.proto index 66f759470..d8efd6f61 100644 --- a/app/router/config.proto +++ b/app/router/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.router; option csharp_namespace = "V2Ray.Core.App.Router"; -option go_package = "v2ray.com/core/app/router"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/router"; option java_package = "com.v2ray.core.app.router"; option java_multiple_files = true; diff --git a/app/router/errors.generated.go b/app/router/errors.generated.go index 0bd943f5d..839616b18 100644 --- a/app/router/errors.generated.go +++ b/app/router/errors.generated.go @@ -1,6 +1,6 @@ package router -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/router/router.go b/app/router/router.go index 2615c2c82..45626585c 100644 --- a/app/router/router.go +++ b/app/router/router.go @@ -2,17 +2,17 @@ package router -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/routing" - routing_dns "v2ray.com/core/features/routing/dns" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/routing" + routing_dns "github.com/v2fly/v2ray-core/v4/features/routing/dns" ) // Router is an implementation of routing.Router. diff --git a/app/router/router_test.go b/app/router/router_test.go index 080534d6d..e78f94b99 100644 --- a/app/router/router_test.go +++ b/app/router/router_test.go @@ -5,13 +5,14 @@ import ( "testing" "github.com/golang/mock/gomock" - . "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/outbound" - routing_session "v2ray.com/core/features/routing/session" - "v2ray.com/core/testing/mocks" + + . "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/outbound" + routing_session "github.com/v2fly/v2ray-core/v4/features/routing/session" + "github.com/v2fly/v2ray-core/v4/testing/mocks" ) type mockOutboundManager struct { @@ -44,7 +45,7 @@ func TestSimpleRouter(t *testing.T) { HandlerSelector: mockHs, })) - ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)}) + ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2fly.org"), 80)}) route, err := r.PickRoute(routing_session.AsRoutingContext(ctx)) common.Must(err) if tag := route.GetOutboundTag(); tag != "test" { @@ -85,7 +86,7 @@ func TestSimpleBalancer(t *testing.T) { HandlerSelector: mockHs, })) - ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)}) + ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2fly.org"), 80)}) route, err := r.PickRoute(routing_session.AsRoutingContext(ctx)) common.Must(err) if tag := route.GetOutboundTag(); tag != "test" { @@ -115,12 +116,12 @@ func TestIPOnDemand(t *testing.T) { defer mockCtl.Finish() mockDNS := mocks.NewDNSClient(mockCtl) - mockDNS.EXPECT().LookupIP(gomock.Eq("v2ray.com")).Return([]net.IP{{192, 168, 0, 1}}, nil).AnyTimes() + mockDNS.EXPECT().LookupIP(gomock.Eq("v2fly.org")).Return([]net.IP{{192, 168, 0, 1}}, nil).AnyTimes() r := new(Router) common.Must(r.Init(config, mockDNS, nil)) - ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)}) + ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2fly.org"), 80)}) route, err := r.PickRoute(routing_session.AsRoutingContext(ctx)) common.Must(err) if tag := route.GetOutboundTag(); tag != "test" { @@ -150,12 +151,12 @@ func TestIPIfNonMatchDomain(t *testing.T) { defer mockCtl.Finish() mockDNS := mocks.NewDNSClient(mockCtl) - mockDNS.EXPECT().LookupIP(gomock.Eq("v2ray.com")).Return([]net.IP{{192, 168, 0, 1}}, nil).AnyTimes() + mockDNS.EXPECT().LookupIP(gomock.Eq("v2fly.org")).Return([]net.IP{{192, 168, 0, 1}}, nil).AnyTimes() r := new(Router) common.Must(r.Init(config, mockDNS, nil)) - ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2ray.com"), 80)}) + ctx := session.ContextWithOutbound(context.Background(), &session.Outbound{Target: net.TCPDestination(net.DomainAddress("v2fly.org"), 80)}) route, err := r.PickRoute(routing_session.AsRoutingContext(ctx)) common.Must(err) if tag := route.GetOutboundTag(); tag != "test" { diff --git a/app/stats/channel.go b/app/stats/channel.go index 2fd54468c..265a33bc0 100644 --- a/app/stats/channel.go +++ b/app/stats/channel.go @@ -6,7 +6,7 @@ import ( "context" "sync" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) // Channel is an implementation of stats.Channel. diff --git a/app/stats/channel_test.go b/app/stats/channel_test.go index 09184bf57..90c69e185 100644 --- a/app/stats/channel_test.go +++ b/app/stats/channel_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/features/stats" + . "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/stats" ) func TestStatsChannel(t *testing.T) { diff --git a/app/stats/command/command.go b/app/stats/command/command.go index 434af86b3..49c9bb43c 100644 --- a/app/stats/command/command.go +++ b/app/stats/command/command.go @@ -2,7 +2,7 @@ package command -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" @@ -11,11 +11,11 @@ import ( grpc "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/common/strmatcher" - feature_stats "v2ray.com/core/features/stats" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/strmatcher" + feature_stats "github.com/v2fly/v2ray-core/v4/features/stats" ) // statsServer is an implementation of StatsService. diff --git a/app/stats/command/command.pb.go b/app/stats/command/command.pb.go index fb0017854..d52b5c54f 100644 --- a/app/stats/command/command.pb.go +++ b/app/stats/command/command.pb.go @@ -551,10 +551,11 @@ var file_app_stats_command_command_proto_rawDesc = []byte{ 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x2e, 0x53, 0x79, 0x73, 0x53, 0x74, 0x61, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, - 0x42, 0x65, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, + 0x42, 0x75, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x63, 0x6f, 0x6d, - 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x20, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, + 0x6d, 0x61, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0xaa, 0x02, 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x61, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/stats/command/command.proto b/app/stats/command/command.proto index 11c4d245e..3ebc518cb 100644 --- a/app/stats/command/command.proto +++ b/app/stats/command/command.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.stats.command; option csharp_namespace = "V2Ray.Core.App.Stats.Command"; -option go_package = "v2ray.com/core/app/stats/command"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/stats/command"; option java_package = "com.v2ray.core.app.stats.command"; option java_multiple_files = true; diff --git a/app/stats/command/command_test.go b/app/stats/command/command_test.go index 5bc4bfc00..387fd6e8b 100644 --- a/app/stats/command/command_test.go +++ b/app/stats/command/command_test.go @@ -7,9 +7,9 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "v2ray.com/core/app/stats" - . "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/app/stats" + . "github.com/v2fly/v2ray-core/v4/app/stats/command" + "github.com/v2fly/v2ray-core/v4/common" ) func TestGetStats(t *testing.T) { diff --git a/app/stats/command/errors.generated.go b/app/stats/command/errors.generated.go index 66f780510..3b1f040e5 100644 --- a/app/stats/command/errors.generated.go +++ b/app/stats/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/stats/config.pb.go b/app/stats/config.pb.go index 8c43010c3..95836a251 100644 --- a/app/stats/config.pb.go +++ b/app/stats/config.pb.go @@ -140,9 +140,10 @@ var file_app_stats_config_proto_rawDesc = []byte{ 0x53, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x72, 0x4c, 0x69, 0x6d, 0x69, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0a, 0x42, 0x75, 0x66, 0x66, 0x65, 0x72, 0x53, 0x69, 0x7a, 0x65, 0x42, - 0x4d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x50, 0x01, 0x5a, 0x18, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x61, 0x70, + 0x5d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x61, 0x70, 0x70, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x73, 0x50, 0x01, 0x5a, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x61, 0x70, 0x70, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x73, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x41, 0x70, 0x70, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/app/stats/config.proto b/app/stats/config.proto index db63e9a36..c876d0b4e 100644 --- a/app/stats/config.proto +++ b/app/stats/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.app.stats; option csharp_namespace = "V2Ray.Core.App.Stats"; -option go_package = "v2ray.com/core/app/stats"; +option go_package = "github.com/v2fly/v2ray-core/v4/app/stats"; option java_package = "com.v2ray.core.app.stats"; option java_multiple_files = true; diff --git a/app/stats/counter_test.go b/app/stats/counter_test.go index f2594e1ee..80d56c206 100644 --- a/app/stats/counter_test.go +++ b/app/stats/counter_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - . "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/features/stats" + . "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/stats" ) func TestStatsCounter(t *testing.T) { diff --git a/app/stats/errors.generated.go b/app/stats/errors.generated.go index c2489bea1..5ded551d1 100644 --- a/app/stats/errors.generated.go +++ b/app/stats/errors.generated.go @@ -1,6 +1,6 @@ package stats -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/app/stats/stats.go b/app/stats/stats.go index 3b881c331..10ece3a7d 100644 --- a/app/stats/stats.go +++ b/app/stats/stats.go @@ -2,15 +2,15 @@ package stats -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/features/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/features/stats" ) // Manager is an implementation of stats.Manager. diff --git a/app/stats/stats_test.go b/app/stats/stats_test.go index 1641021dc..d6f166bb9 100644 --- a/app/stats/stats_test.go +++ b/app/stats/stats_test.go @@ -5,9 +5,9 @@ import ( "testing" "time" - . "v2ray.com/core/app/stats" - "v2ray.com/core/common" - "v2ray.com/core/features/stats" + . "github.com/v2fly/v2ray-core/v4/app/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features/stats" ) func TestInterface(t *testing.T) { diff --git a/common/bitmask/byte_test.go b/common/bitmask/byte_test.go index 7eb532b8b..3bdaf8b01 100644 --- a/common/bitmask/byte_test.go +++ b/common/bitmask/byte_test.go @@ -3,7 +3,7 @@ package bitmask_test import ( "testing" - . "v2ray.com/core/common/bitmask" + . "github.com/v2fly/v2ray-core/v4/common/bitmask" ) func TestBitmaskByte(t *testing.T) { diff --git a/common/buf/buf.go b/common/buf/buf.go index 8579694c3..5d0679723 100644 --- a/common/buf/buf.go +++ b/common/buf/buf.go @@ -1,4 +1,4 @@ // Package buf provides a light-weight memory allocation mechanism. -package buf // import "v2ray.com/core/common/buf" +package buf -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/common/buf/buffer.go b/common/buf/buffer.go index 83db8ea33..fa1de3cfe 100644 --- a/common/buf/buffer.go +++ b/common/buf/buffer.go @@ -3,7 +3,7 @@ package buf import ( "io" - "v2ray.com/core/common/bytespool" + "github.com/v2fly/v2ray-core/v4/common/bytespool" ) const ( diff --git a/common/buf/buffer_test.go b/common/buf/buffer_test.go index 34961c8f6..7c7488652 100644 --- a/common/buf/buffer_test.go +++ b/common/buf/buffer_test.go @@ -6,8 +6,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" + + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/buf" ) func TestBufferClear(t *testing.T) { diff --git a/common/buf/copy.go b/common/buf/copy.go index 87a9518e4..38c33028e 100644 --- a/common/buf/copy.go +++ b/common/buf/copy.go @@ -4,8 +4,8 @@ import ( "io" "time" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/signal" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/signal" ) type dataHandler func(MultiBuffer) diff --git a/common/buf/copy_test.go b/common/buf/copy_test.go index 5142a74d3..3da4008c4 100644 --- a/common/buf/copy_test.go +++ b/common/buf/copy_test.go @@ -7,9 +7,9 @@ import ( "github.com/golang/mock/gomock" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/testing/mocks" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/testing/mocks" ) func TestReadError(t *testing.T) { diff --git a/common/buf/errors.generated.go b/common/buf/errors.generated.go index 5853cd0cf..fd16e0c3b 100644 --- a/common/buf/errors.generated.go +++ b/common/buf/errors.generated.go @@ -1,6 +1,6 @@ package buf -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/buf/io_test.go b/common/buf/io_test.go index 751dd6193..dd0c8f3c9 100644 --- a/common/buf/io_test.go +++ b/common/buf/io_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - . "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" + . "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestWriterCreation(t *testing.T) { diff --git a/common/buf/multi_buffer.go b/common/buf/multi_buffer.go index 71ca773be..b49f3bbe6 100644 --- a/common/buf/multi_buffer.go +++ b/common/buf/multi_buffer.go @@ -3,9 +3,9 @@ package buf import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/serial" ) // ReadAllToBytes reads all content from the reader into a byte array, until EOF. diff --git a/common/buf/multi_buffer_test.go b/common/buf/multi_buffer_test.go index f0d2776b6..cfd355235 100644 --- a/common/buf/multi_buffer_test.go +++ b/common/buf/multi_buffer_test.go @@ -9,8 +9,9 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" + + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/buf" ) func TestMultiBufferRead(t *testing.T) { diff --git a/common/buf/reader.go b/common/buf/reader.go index 4f5d19820..db032ffb7 100644 --- a/common/buf/reader.go +++ b/common/buf/reader.go @@ -3,8 +3,8 @@ package buf import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" ) func readOneUDP(r io.Reader) (*Buffer, error) { diff --git a/common/buf/reader_test.go b/common/buf/reader_test.go index 910851094..d9cea2769 100644 --- a/common/buf/reader_test.go +++ b/common/buf/reader_test.go @@ -6,9 +6,9 @@ import ( "strings" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func TestBytesReaderWriteTo(t *testing.T) { diff --git a/common/buf/readv_reader.go b/common/buf/readv_reader.go index cc9b3eab0..22c1f3851 100644 --- a/common/buf/readv_reader.go +++ b/common/buf/readv_reader.go @@ -7,7 +7,7 @@ import ( "runtime" "syscall" - "v2ray.com/core/common/platform" + "github.com/v2fly/v2ray-core/v4/common/platform" ) type allocStrategy struct { diff --git a/common/buf/readv_test.go b/common/buf/readv_test.go index b2a3627d2..d5dbc4ad0 100644 --- a/common/buf/readv_test.go +++ b/common/buf/readv_test.go @@ -8,11 +8,11 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/testing/servers/tcp" + + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestReadvReader(t *testing.T) { diff --git a/common/buf/writer.go b/common/buf/writer.go index 8e22a16d6..60ef104c0 100644 --- a/common/buf/writer.go +++ b/common/buf/writer.go @@ -5,8 +5,8 @@ import ( "net" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" ) // BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer. diff --git a/common/buf/writer_test.go b/common/buf/writer_test.go index 39df1ef0b..1e11609b1 100644 --- a/common/buf/writer_test.go +++ b/common/buf/writer_test.go @@ -9,9 +9,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/buf" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func TestWriter(t *testing.T) { diff --git a/common/cache/lru_test.go b/common/cache/lru_test.go index e2bb767f6..0e0516f0e 100644 --- a/common/cache/lru_test.go +++ b/common/cache/lru_test.go @@ -3,7 +3,7 @@ package cache_test import ( "testing" - . "v2ray.com/core/common/cache" + . "github.com/v2fly/v2ray-core/v4/common/cache" ) func TestLruReplaceValue(t *testing.T) { diff --git a/common/common.go b/common/common.go index 2d0a929ba..6ef3531bb 100644 --- a/common/common.go +++ b/common/common.go @@ -10,10 +10,10 @@ import ( "path/filepath" "strings" - "v2ray.com/core/common/errors" + "github.com/v2fly/v2ray-core/v4/common/errors" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen var ( // ErrNoClue is for the situation that existing information is not enough to make a decision. For example, Router may return this error when there is no suitable route. diff --git a/common/common_test.go b/common/common_test.go index 7b01f9ad7..f1868bf08 100644 --- a/common/common_test.go +++ b/common/common_test.go @@ -4,7 +4,7 @@ import ( "errors" "testing" - . "v2ray.com/core/common" + . "github.com/v2fly/v2ray-core/v4/common" ) func TestMust(t *testing.T) { diff --git a/common/crypto/aes.go b/common/crypto/aes.go index b2415b3e8..1137c5bdc 100644 --- a/common/crypto/aes.go +++ b/common/crypto/aes.go @@ -4,7 +4,7 @@ import ( "crypto/aes" "crypto/cipher" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) // NewAesDecryptionStream creates a new AES encryption stream based on given key and IV. diff --git a/common/crypto/auth.go b/common/crypto/auth.go index 63cd9d557..69117ae93 100644 --- a/common/crypto/auth.go +++ b/common/crypto/auth.go @@ -5,11 +5,11 @@ import ( "io" "math/rand" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/bytespool" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/bytespool" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) type BytesGenerator func() []byte diff --git a/common/crypto/auth_test.go b/common/crypto/auth_test.go index 17a2f1b60..fbd654848 100644 --- a/common/crypto/auth_test.go +++ b/common/crypto/auth_test.go @@ -10,10 +10,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/crypto" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) func TestAuthenticationReaderWriter(t *testing.T) { diff --git a/common/crypto/benchmark_test.go b/common/crypto/benchmark_test.go index c1c71d96f..6a888eb2b 100644 --- a/common/crypto/benchmark_test.go +++ b/common/crypto/benchmark_test.go @@ -4,7 +4,7 @@ import ( "crypto/cipher" "testing" - . "v2ray.com/core/common/crypto" + . "github.com/v2fly/v2ray-core/v4/common/crypto" ) const benchSize = 1024 * 1024 diff --git a/common/crypto/chacha20.go b/common/crypto/chacha20.go index 85946acf2..2fe0b697f 100644 --- a/common/crypto/chacha20.go +++ b/common/crypto/chacha20.go @@ -3,7 +3,7 @@ package crypto import ( "crypto/cipher" - "v2ray.com/core/common/crypto/internal" + "github.com/v2fly/v2ray-core/v4/common/crypto/internal" ) // NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV. diff --git a/common/crypto/chacha20_test.go b/common/crypto/chacha20_test.go index d7a7c6b7c..1303364c6 100644 --- a/common/crypto/chacha20_test.go +++ b/common/crypto/chacha20_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/crypto" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/crypto" ) func mustDecodeHex(s string) []byte { diff --git a/common/crypto/chunk.go b/common/crypto/chunk.go index 164336d0f..64410d191 100644 --- a/common/crypto/chunk.go +++ b/common/crypto/chunk.go @@ -4,8 +4,8 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" ) // ChunkSizeDecoder is a utility class to decode size value from bytes. diff --git a/common/crypto/chunk_test.go b/common/crypto/chunk_test.go index 7fd71b583..55e4b9cca 100644 --- a/common/crypto/chunk_test.go +++ b/common/crypto/chunk_test.go @@ -5,9 +5,9 @@ import ( "io" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/crypto" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/common/crypto" ) func TestChunkStreamIO(t *testing.T) { diff --git a/common/crypto/crypto.go b/common/crypto/crypto.go index 0adb1a2a9..74b5df88d 100644 --- a/common/crypto/crypto.go +++ b/common/crypto/crypto.go @@ -1,4 +1,4 @@ // Package crypto provides common crypto libraries for V2Ray. -package crypto // import "v2ray.com/core/common/crypto" +package crypto -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/common/crypto/errors.generated.go b/common/crypto/errors.generated.go index 88a2f2ad3..8143bd36c 100644 --- a/common/crypto/errors.generated.go +++ b/common/crypto/errors.generated.go @@ -1,6 +1,6 @@ package crypto -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/crypto/io.go b/common/crypto/io.go index 19a3a25cf..46d8f0912 100644 --- a/common/crypto/io.go +++ b/common/crypto/io.go @@ -4,7 +4,7 @@ import ( "crypto/cipher" "io" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) type CryptionReader struct { diff --git a/common/dice/dice.go b/common/dice/dice.go index 39d771aed..763ab8358 100644 --- a/common/dice/dice.go +++ b/common/dice/dice.go @@ -1,6 +1,6 @@ // Package dice contains common functions to generate random number. // It also initialize math/rand with the time in seconds at launch time. -package dice // import "v2ray.com/core/common/dice" +package dice import ( "math/rand" diff --git a/common/dice/dice_test.go b/common/dice/dice_test.go index a658378f9..b1a128b46 100644 --- a/common/dice/dice_test.go +++ b/common/dice/dice_test.go @@ -4,7 +4,7 @@ import ( "math/rand" "testing" - . "v2ray.com/core/common/dice" + . "github.com/v2fly/v2ray-core/v4/common/dice" ) func BenchmarkRoll1(b *testing.B) { diff --git a/common/errors.generated.go b/common/errors.generated.go index 0c5d71fd2..37cb33a03 100644 --- a/common/errors.generated.go +++ b/common/errors.generated.go @@ -1,6 +1,6 @@ package common -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/errors/errorgen/main.go b/common/errors/errorgen/main.go index f7bbefe47..0d7278d8e 100644 --- a/common/errors/errorgen/main.go +++ b/common/errors/errorgen/main.go @@ -6,7 +6,7 @@ import ( "os" "path/filepath" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) func main() { diff --git a/common/errors/errors.go b/common/errors/errors.go index bea455cc0..15483ea9a 100644 --- a/common/errors/errors.go +++ b/common/errors/errors.go @@ -1,13 +1,13 @@ // Package errors is a drop-in replacement for Golang lib 'errors'. -package errors // import "v2ray.com/core/common/errors" +package errors import ( "os" "reflect" "strings" - "v2ray.com/core/common/log" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type hasInnerError interface { diff --git a/common/errors/errors_test.go b/common/errors/errors_test.go index b8228a1e1..e51e6aa82 100644 --- a/common/errors/errors_test.go +++ b/common/errors/errors_test.go @@ -2,13 +2,15 @@ package errors_test import ( "io" + "os" "strings" "testing" "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/log" ) func TestError(t *testing.T) { @@ -40,17 +42,26 @@ func TestError(t *testing.T) { type e struct{} func TestErrorMessage(t *testing.T) { + pwd, err := os.Getwd() + if err != nil { + t.Error(err) + } + moduleName, gmnErr := common.GetModuleName(pwd) + if gmnErr != nil { + t.Error(gmnErr) + } + data := []struct { err error msg string }{ { err: New("a").Base(New("b")).WithPathObj(e{}), - msg: "v2ray.com/core/common/errors_test: a > b", + msg: moduleName + "/common/errors_test: a > b", }, { err: New("a").Base(New("b").WithPathObj(e{})), - msg: "a > v2ray.com/core/common/errors_test: b", + msg: "a > " + moduleName + "/common/errors_test: b", }, } diff --git a/common/interfaces.go b/common/interfaces.go index 0e569b9fb..cac2ac69c 100644 --- a/common/interfaces.go +++ b/common/interfaces.go @@ -1,6 +1,6 @@ package common -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" // Closable is the interface for objects that can release its resources. // diff --git a/common/log/access.go b/common/log/access.go index 789426d92..aaa0b448a 100644 --- a/common/log/access.go +++ b/common/log/access.go @@ -4,7 +4,7 @@ import ( "context" "strings" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type logKey int diff --git a/common/log/log.go b/common/log/log.go index 423901b73..56e7168b6 100644 --- a/common/log/log.go +++ b/common/log/log.go @@ -1,9 +1,9 @@ -package log // import "v2ray.com/core/common/log" +package log import ( "sync" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common/serial" ) // Message is the interface for all log messages. diff --git a/common/log/log.pb.go b/common/log/log.pb.go index affe5b7a4..45b23599d 100644 --- a/common/log/log.pb.go +++ b/common/log/log.pb.go @@ -90,10 +90,11 @@ var file_common_log_log_proto_rawDesc = []byte{ 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x57, 0x61, 0x72, 0x6e, 0x69, 0x6e, 0x67, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04, 0x49, 0x6e, 0x66, 0x6f, 0x10, 0x03, 0x12, 0x09, 0x0a, 0x05, 0x44, 0x65, 0x62, 0x75, - 0x67, 0x10, 0x04, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x67, 0x10, 0x04, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6c, 0x6f, 0x67, - 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x15, + 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6c, 0x6f, 0x67, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x6f, 0x67, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/common/log/log.proto b/common/log/log.proto index 59c893447..7556f25ae 100644 --- a/common/log/log.proto +++ b/common/log/log.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.log; option csharp_namespace = "V2Ray.Core.Common.Log"; -option go_package = "v2ray.com/core/common/log"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/log"; option java_package = "com.v2ray.core.common.log"; option java_multiple_files = true; diff --git a/common/log/log_test.go b/common/log/log_test.go index 63755e299..d29fe67ed 100644 --- a/common/log/log_test.go +++ b/common/log/log_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/net" ) type testLogger struct { diff --git a/common/log/logger.go b/common/log/logger.go index 7360c6498..72be4f40f 100644 --- a/common/log/logger.go +++ b/common/log/logger.go @@ -6,9 +6,9 @@ import ( "os" "time" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/signal/semaphore" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common/signal/semaphore" ) // Writer is the interface for writing logs. diff --git a/common/log/logger_test.go b/common/log/logger_test.go index 9ce8ca3c6..fcb91ad6c 100644 --- a/common/log/logger_test.go +++ b/common/log/logger_test.go @@ -7,9 +7,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/log" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/common/log" ) func TestFileLogger(t *testing.T) { diff --git a/common/mux/client.go b/common/mux/client.go index 90ea1cfd5..fd8f89195 100644 --- a/common/mux/client.go +++ b/common/mux/client.go @@ -6,18 +6,18 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/proxy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type ClientManager struct { diff --git a/common/mux/client_test.go b/common/mux/client_test.go index b39b2c6cb..967037c2c 100644 --- a/common/mux/client_test.go +++ b/common/mux/client_test.go @@ -6,14 +6,14 @@ import ( "time" "github.com/golang/mock/gomock" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/testing/mocks" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/testing/mocks" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func TestIncrementalPickerFailure(t *testing.T) { @@ -87,7 +87,7 @@ func TestClientWorkerClose(t *testing.T) { tr1, tw1 := pipe.New(pipe.WithoutSizeLimit()) ctx1 := session.ContextWithOutbound(context.Background(), &session.Outbound{ - Target: net.TCPDestination(net.DomainAddress("www.v2ray.com"), 80), + Target: net.TCPDestination(net.DomainAddress("www.v2fly.org"), 80), }) common.Must(manager.Dispatch(ctx1, &transport.Link{ Reader: tr1, @@ -104,7 +104,7 @@ func TestClientWorkerClose(t *testing.T) { tr2, tw2 := pipe.New(pipe.WithoutSizeLimit()) ctx2 := session.ContextWithOutbound(context.Background(), &session.Outbound{ - Target: net.TCPDestination(net.DomainAddress("www.v2ray.com"), 80), + Target: net.TCPDestination(net.DomainAddress("www.v2fly.org"), 80), }) common.Must(manager.Dispatch(ctx2, &transport.Link{ Reader: tr2, diff --git a/common/mux/errors.generated.go b/common/mux/errors.generated.go index 522a6e33b..defb66a58 100644 --- a/common/mux/errors.generated.go +++ b/common/mux/errors.generated.go @@ -1,6 +1,6 @@ package mux -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/mux/frame.go b/common/mux/frame.go index 4d2ac0327..cabf11415 100644 --- a/common/mux/frame.go +++ b/common/mux/frame.go @@ -4,12 +4,12 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/bitmask" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type SessionStatus byte diff --git a/common/mux/frame_test.go b/common/mux/frame_test.go index afbb3a157..c072f48a5 100644 --- a/common/mux/frame_test.go +++ b/common/mux/frame_test.go @@ -3,15 +3,15 @@ package mux_test import ( "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" ) func BenchmarkFrameWrite(b *testing.B) { frame := mux.FrameMetadata{ - Target: net.TCPDestination(net.DomainAddress("www.v2ray.com"), net.Port(80)), + Target: net.TCPDestination(net.DomainAddress("www.v2fly.org"), net.Port(80)), SessionID: 1, SessionStatus: mux.SessionStatusNew, } diff --git a/common/mux/mux.go b/common/mux/mux.go index 35b05a76a..7e204c9ef 100644 --- a/common/mux/mux.go +++ b/common/mux/mux.go @@ -1,3 +1,3 @@ package mux -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/common/mux/mux_test.go b/common/mux/mux_test.go index 3d7f6fb79..045b6fa79 100644 --- a/common/mux/mux_test.go +++ b/common/mux/mux_test.go @@ -6,12 +6,12 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/common/mux" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/common/mux" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func readAll(reader buf.Reader) (buf.MultiBuffer, error) { @@ -32,7 +32,7 @@ func readAll(reader buf.Reader) (buf.MultiBuffer, error) { func TestReaderWriter(t *testing.T) { pReader, pWriter := pipe.New(pipe.WithSizeLimit(1024)) - dest := net.TCPDestination(net.DomainAddress("v2ray.com"), 80) + dest := net.TCPDestination(net.DomainAddress("v2fly.org"), 80) writer := NewWriter(1, dest, pWriter, protocol.TransferTypeStream) dest2 := net.TCPDestination(net.LocalHostIP, 443) diff --git a/common/mux/reader.go b/common/mux/reader.go index 478351620..ac7fb1692 100644 --- a/common/mux/reader.go +++ b/common/mux/reader.go @@ -3,9 +3,9 @@ package mux import ( "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/serial" ) // PacketReader is an io.Reader that reads whole chunk of Mux frames every time. diff --git a/common/mux/server.go b/common/mux/server.go index c4f9ca920..233e15bfe 100644 --- a/common/mux/server.go +++ b/common/mux/server.go @@ -4,17 +4,17 @@ import ( "context" "io" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + 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/errors" + "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/session" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type Server struct { diff --git a/common/mux/session.go b/common/mux/session.go index 84764babe..5565b573d 100644 --- a/common/mux/session.go +++ b/common/mux/session.go @@ -3,9 +3,9 @@ package mux import ( "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) type SessionManager struct { diff --git a/common/mux/session_test.go b/common/mux/session_test.go index 7fb659a5d..26e75a2de 100644 --- a/common/mux/session_test.go +++ b/common/mux/session_test.go @@ -3,7 +3,7 @@ package mux_test import ( "testing" - . "v2ray.com/core/common/mux" + . "github.com/v2fly/v2ray-core/v4/common/mux" ) func TestSessionManagerAdd(t *testing.T) { diff --git a/common/mux/writer.go b/common/mux/writer.go index c28852d9b..d9172c529 100644 --- a/common/mux/writer.go +++ b/common/mux/writer.go @@ -1,12 +1,12 @@ package mux import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type Writer struct { diff --git a/common/net/address.pb.go b/common/net/address.pb.go index 3fadaadd4..eecc24efd 100644 --- a/common/net/address.pb.go +++ b/common/net/address.pb.go @@ -119,10 +119,11 @@ var file_common_net_address_proto_rawDesc = []byte{ 0x10, 0x0a, 0x02, 0x69, 0x70, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x48, 0x00, 0x52, 0x02, 0x69, 0x70, 0x12, 0x18, 0x0a, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x42, 0x09, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, - 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, + 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/common/net/address.proto b/common/net/address.proto index 2149030f7..5f53a42c8 100644 --- a/common/net/address.proto +++ b/common/net/address.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "v2ray.com/core/common/net"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/address_test.go b/common/net/address_test.go index 8a4616307..740d89c67 100644 --- a/common/net/address_test.go +++ b/common/net/address_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/net" + . "github.com/v2fly/v2ray-core/v4/common/net" ) func TestAddressProperty(t *testing.T) { @@ -61,11 +61,11 @@ func TestAddressProperty(t *testing.T) { }, }, { - Input: DomainAddress("v2ray.com"), + Input: DomainAddress("v2fly.org"), Output: addrProprty{ - Domain: "v2ray.com", + Domain: "v2fly.org", Family: AddressFamilyDomain, - String: "v2ray.com", + String: "v2fly.org", }, }, { @@ -101,11 +101,11 @@ func TestAddressProperty(t *testing.T) { }, }, { - Input: NewIPOrDomain(ParseAddress("v2ray.com")).AsAddress(), + Input: NewIPOrDomain(ParseAddress("v2fly.org")).AsAddress(), Output: addrProprty{ - Domain: "v2ray.com", + Domain: "v2fly.org", Family: AddressFamilyDomain, - String: "v2ray.com", + String: "v2fly.org", }, }, { @@ -157,7 +157,7 @@ func TestInvalidAddressConvertion(t *testing.T) { testCases := []func(){ func() { ParseAddress("8.8.8.8").Domain() }, func() { ParseAddress("2001:4860:0:2001::68").Domain() }, - func() { ParseAddress("v2ray.com").IP() }, + func() { ParseAddress("v2fly.org").IP() }, } for idx, testCase := range testCases { if !panics(testCase) { @@ -186,7 +186,7 @@ func BenchmarkParseAddressIPv6(b *testing.B) { func BenchmarkParseAddressDomain(b *testing.B) { for i := 0; i < b.N; i++ { - addr := ParseAddress("v2ray.com") + addr := ParseAddress("v2fly.org") if addr.Family() != AddressFamilyDomain { panic("not domain") } diff --git a/common/net/connection.go b/common/net/connection.go index f271beef9..6bade6af9 100644 --- a/common/net/connection.go +++ b/common/net/connection.go @@ -7,10 +7,10 @@ import ( "net" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/signal/done" ) type ConnectionOption func(*connection) diff --git a/common/net/destination.pb.go b/common/net/destination.pb.go index c4e246327..9ed67e1ba 100644 --- a/common/net/destination.pb.go +++ b/common/net/destination.pb.go @@ -108,9 +108,10 @@ var file_common_net_destination_proto_rawDesc = []byte{ 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x49, 0x50, 0x4f, 0x72, 0x44, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x6f, 0x72, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x04, 0x70, 0x6f, 0x72, - 0x74, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x74, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, - 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, + 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/net/destination.proto b/common/net/destination.proto index 11f66960c..9aab13b2c 100644 --- a/common/net/destination.proto +++ b/common/net/destination.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "v2ray.com/core/common/net"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/destination_test.go b/common/net/destination_test.go index 5ba5d53ad..45ac96dc0 100644 --- a/common/net/destination_test.go +++ b/common/net/destination_test.go @@ -5,7 +5,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/net" + . "github.com/v2fly/v2ray-core/v4/common/net" ) func TestDestinationProperty(t *testing.T) { diff --git a/common/net/errors.generated.go b/common/net/errors.generated.go index e3cf99fb4..5884f2ce2 100644 --- a/common/net/errors.generated.go +++ b/common/net/errors.generated.go @@ -1,6 +1,6 @@ package net -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/net/net.go b/common/net/net.go index 172e516db..b1fc15352 100644 --- a/common/net/net.go +++ b/common/net/net.go @@ -1,4 +1,4 @@ // Package net is a drop-in replacement to Golang's net package, with some more functionalities. -package net // import "v2ray.com/core/common/net" +package net -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/common/net/network.pb.go b/common/net/network.pb.go index 925ac6207..b12355ed7 100644 --- a/common/net/network.pb.go +++ b/common/net/network.pb.go @@ -143,10 +143,11 @@ var file_common_net_network_proto_rawDesc = []byte{ 0x74, 0x77, 0x6f, 0x72, 0x6b, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x6e, 0x10, 0x00, 0x12, 0x0e, 0x0a, 0x06, 0x52, 0x61, 0x77, 0x54, 0x43, 0x50, 0x10, 0x01, 0x1a, 0x02, 0x08, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x54, 0x43, 0x50, 0x10, 0x02, 0x12, 0x07, 0x0a, 0x03, 0x55, - 0x44, 0x50, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x4e, 0x49, 0x58, 0x10, 0x04, 0x42, 0x50, + 0x44, 0x50, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x55, 0x4e, 0x49, 0x58, 0x10, 0x04, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x19, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, + 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x29, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/net/network.proto b/common/net/network.proto index 87dbc05c9..8510ee925 100644 --- a/common/net/network.proto +++ b/common/net/network.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "v2ray.com/core/common/net"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/port.pb.go b/common/net/port.pb.go index 8e8e1b152..fcae35606 100644 --- a/common/net/port.pb.go +++ b/common/net/port.pb.go @@ -144,10 +144,11 @@ var file_common_net_port_proto_rawDesc = []byte{ 0x61, 0x6e, 0x67, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x50, 0x6f, 0x72, 0x74, 0x52, 0x61, 0x6e, 0x67, 0x65, 0x52, 0x05, 0x72, 0x61, - 0x6e, 0x67, 0x65, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x6e, 0x67, 0x65, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, - 0x50, 0x01, 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, + 0x50, 0x01, 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/common/net/port.proto b/common/net/port.proto index bed263eb8..aba741d1d 100644 --- a/common/net/port.proto +++ b/common/net/port.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.net; option csharp_namespace = "V2Ray.Core.Common.Net"; -option go_package = "v2ray.com/core/common/net"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/net"; option java_package = "com.v2ray.core.common.net"; option java_multiple_files = true; diff --git a/common/net/port_test.go b/common/net/port_test.go index f668e0ec8..9acc9a9a7 100644 --- a/common/net/port_test.go +++ b/common/net/port_test.go @@ -3,7 +3,7 @@ package net_test import ( "testing" - . "v2ray.com/core/common/net" + . "github.com/v2fly/v2ray-core/v4/common/net" ) func TestPortRangeContains(t *testing.T) { diff --git a/common/platform/ctlcmd/ctlcmd.go b/common/platform/ctlcmd/ctlcmd.go index 3ee617bde..6922f2a6c 100644 --- a/common/platform/ctlcmd/ctlcmd.go +++ b/common/platform/ctlcmd/ctlcmd.go @@ -6,11 +6,11 @@ import ( "os/exec" "strings" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/platform" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen func Run(args []string, input io.Reader) (buf.MultiBuffer, error) { v2ctl := platform.GetToolLocation("v2ctl") diff --git a/common/platform/ctlcmd/errors.generated.go b/common/platform/ctlcmd/errors.generated.go index 91233667c..e75e7efcb 100644 --- a/common/platform/ctlcmd/errors.generated.go +++ b/common/platform/ctlcmd/errors.generated.go @@ -1,6 +1,6 @@ package ctlcmd -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/platform/filesystem/file.go b/common/platform/filesystem/file.go index b41f69492..5fb690aa5 100644 --- a/common/platform/filesystem/file.go +++ b/common/platform/filesystem/file.go @@ -4,8 +4,8 @@ import ( "io" "os" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/platform" ) type FileReaderFunc func(path string) (io.ReadCloser, error) diff --git a/common/platform/platform.go b/common/platform/platform.go index 6da185cff..845782b00 100644 --- a/common/platform/platform.go +++ b/common/platform/platform.go @@ -1,4 +1,4 @@ -package platform // import "v2ray.com/core/common/platform" +package platform import ( "os" diff --git a/common/platform/platform_test.go b/common/platform/platform_test.go index 8cdb51fea..f02e9b682 100644 --- a/common/platform/platform_test.go +++ b/common/platform/platform_test.go @@ -6,8 +6,8 @@ import ( "runtime" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/platform" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/platform" ) func TestNormalizeEnvName(t *testing.T) { diff --git a/common/protocol/address.go b/common/protocol/address.go index 150f643fb..e98965e4b 100644 --- a/common/protocol/address.go +++ b/common/protocol/address.go @@ -3,10 +3,10 @@ package protocol import ( "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type AddressOption func(*option) diff --git a/common/protocol/address_test.go b/common/protocol/address_test.go index 8e9c19dfa..ae86a224a 100644 --- a/common/protocol/address_test.go +++ b/common/protocol/address_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/common/protocol" ) func TestAddressReading(t *testing.T) { @@ -55,13 +55,13 @@ func TestAddressReading(t *testing.T) { }, { Options: []AddressOption{AddressFamilyByte(0x03, net.AddressFamilyDomain)}, - Input: []byte{3, 9, 118, 50, 114, 97, 121, 46, 99, 111, 109, 0, 80}, - Address: net.DomainAddress("v2ray.com"), + Input: []byte{3, 9, 118, 50, 102, 108, 121, 46, 111, 114, 103, 0, 80}, + Address: net.DomainAddress("v2fly.org"), Port: net.Port(80), }, { Options: []AddressOption{AddressFamilyByte(0x03, net.AddressFamilyDomain)}, - Input: []byte{3, 9, 118, 50, 114, 97, 121, 46, 99, 111, 109, 0}, + Input: []byte{3, 9, 118, 50, 102, 108, 121, 46, 111, 114, 103, 0}, Error: true, }, { @@ -236,7 +236,7 @@ func BenchmarkAddressWritingDomain(b *testing.B) { b.ResetTimer() for i := 0; i < b.N; i++ { - common.Must(parser.WriteAddressPort(writer, net.DomainAddress("www.v2ray.com"), net.Port(80))) + common.Must(parser.WriteAddressPort(writer, net.DomainAddress("www.v2fly.org"), net.Port(80))) writer.Clear() } } diff --git a/common/protocol/bittorrent/bittorrent.go b/common/protocol/bittorrent/bittorrent.go index a0285f23d..c7a2184c7 100644 --- a/common/protocol/bittorrent/bittorrent.go +++ b/common/protocol/bittorrent/bittorrent.go @@ -3,7 +3,7 @@ package bittorrent import ( "errors" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type SniffHeader struct { diff --git a/common/protocol/dns/errors.generated.go b/common/protocol/dns/errors.generated.go index ba70372f0..438eb646e 100644 --- a/common/protocol/dns/errors.generated.go +++ b/common/protocol/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/dns/io.go b/common/protocol/dns/io.go index e1a759326..7a15296a9 100644 --- a/common/protocol/dns/io.go +++ b/common/protocol/dns/io.go @@ -5,9 +5,10 @@ import ( "sync" "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/serial" ) func PackMessage(msg *dnsmessage.Message) (*buf.Buffer, error) { diff --git a/common/protocol/errors.generated.go b/common/protocol/errors.generated.go index 2b52880a3..0c545173e 100644 --- a/common/protocol/errors.generated.go +++ b/common/protocol/errors.generated.go @@ -1,6 +1,6 @@ package protocol -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/headers.go b/common/protocol/headers.go index 83a5fdd6d..11bb641d9 100644 --- a/common/protocol/headers.go +++ b/common/protocol/headers.go @@ -3,9 +3,9 @@ package protocol import ( "runtime" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/net" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/bitmask" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) // RequestCommand is a custom command in a proxy request. diff --git a/common/protocol/headers.pb.go b/common/protocol/headers.pb.go index 1541dc888..a5e3cf248 100644 --- a/common/protocol/headers.pb.go +++ b/common/protocol/headers.pb.go @@ -148,10 +148,11 @@ var file_common_protocol_headers_proto_rawDesc = []byte{ 0x0a, 0x0a, 0x41, 0x45, 0x53, 0x31, 0x32, 0x38, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x03, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x04, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, 0x05, 0x42, - 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x6c, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/protocol/headers.proto b/common/protocol/headers.proto index 907947d3f..943d7d6f7 100644 --- a/common/protocol/headers.proto +++ b/common/protocol/headers.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "v2ray.com/core/common/protocol"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; diff --git a/common/protocol/http/headers.go b/common/protocol/http/headers.go index 1dfe4d027..d87e8dbf6 100644 --- a/common/protocol/http/headers.go +++ b/common/protocol/http/headers.go @@ -5,7 +5,7 @@ import ( "strconv" "strings" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) // ParseXForwardedFor parses X-Forwarded-For header in http headers, and return the IP list in it. diff --git a/common/protocol/http/headers_test.go b/common/protocol/http/headers_test.go index 5716d0752..8c4539097 100644 --- a/common/protocol/http/headers_test.go +++ b/common/protocol/http/headers_test.go @@ -8,9 +8,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/common/protocol/http" ) func TestParseXForwardedFor(t *testing.T) { @@ -87,14 +87,14 @@ func TestParseHost(t *testing.T) { Error bool }{ { - RawHost: "v2ray.com:80", + RawHost: "v2fly.org:80", DefaultPort: 443, - Destination: net.TCPDestination(net.DomainAddress("v2ray.com"), 80), + Destination: net.TCPDestination(net.DomainAddress("v2fly.org"), 80), }, { - RawHost: "tls.v2ray.com", + RawHost: "tls.v2fly.org", DefaultPort: 443, - Destination: net.TCPDestination(net.DomainAddress("tls.v2ray.com"), 443), + Destination: net.TCPDestination(net.DomainAddress("tls.v2fly.org"), 443), }, { RawHost: "[2401:1bc0:51f0:ec08::1]:80", diff --git a/common/protocol/http/sniff.go b/common/protocol/http/sniff.go index 9974dd277..b96c947eb 100644 --- a/common/protocol/http/sniff.go +++ b/common/protocol/http/sniff.go @@ -5,8 +5,8 @@ import ( "errors" "strings" - "v2ray.com/core/common" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" ) type version byte diff --git a/common/protocol/http/sniff_test.go b/common/protocol/http/sniff_test.go index 82f3b1ae9..3e7eb154c 100644 --- a/common/protocol/http/sniff_test.go +++ b/common/protocol/http/sniff_test.go @@ -3,7 +3,7 @@ package http_test import ( "testing" - . "v2ray.com/core/common/protocol/http" + . "github.com/v2fly/v2ray-core/v4/common/protocol/http" ) func TestHTTPHeaders(t *testing.T) { diff --git a/common/protocol/id.go b/common/protocol/id.go index f7a32e06f..6d15970b3 100644 --- a/common/protocol/id.go +++ b/common/protocol/id.go @@ -5,8 +5,8 @@ import ( "crypto/md5" "hash" - "v2ray.com/core/common" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) const ( diff --git a/common/protocol/id_test.go b/common/protocol/id_test.go index bc55336dd..94969adad 100644 --- a/common/protocol/id_test.go +++ b/common/protocol/id_test.go @@ -3,8 +3,8 @@ package protocol_test import ( "testing" - . "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + . "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) func TestIdEquals(t *testing.T) { diff --git a/common/protocol/protocol.go b/common/protocol/protocol.go index 41d99d0a8..90f3b89cb 100644 --- a/common/protocol/protocol.go +++ b/common/protocol/protocol.go @@ -1,3 +1,3 @@ -package protocol // import "v2ray.com/core/common/protocol" +package protocol -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/common/protocol/server_picker_test.go b/common/protocol/server_picker_test.go index 54fbbf43d..7adb294c2 100644 --- a/common/protocol/server_picker_test.go +++ b/common/protocol/server_picker_test.go @@ -4,8 +4,8 @@ import ( "testing" "time" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/common/protocol" ) func TestServerList(t *testing.T) { diff --git a/common/protocol/server_spec.go b/common/protocol/server_spec.go index d462b4406..4cdf1517c 100644 --- a/common/protocol/server_spec.go +++ b/common/protocol/server_spec.go @@ -4,8 +4,8 @@ import ( "sync" "time" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/net" ) type ValidationStrategy interface { diff --git a/common/protocol/server_spec.pb.go b/common/protocol/server_spec.pb.go index 1212693c4..ff719d267 100644 --- a/common/protocol/server_spec.pb.go +++ b/common/protocol/server_spec.pb.go @@ -8,11 +8,11 @@ package protocol import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" ) const ( @@ -109,10 +109,11 @@ var file_common_protocol_server_spec_proto_rawDesc = []byte{ 0x72, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x42, - 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, - 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x6c, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/protocol/server_spec.proto b/common/protocol/server_spec.proto index 7cd6cb783..bf01c19a7 100644 --- a/common/protocol/server_spec.proto +++ b/common/protocol/server_spec.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "v2ray.com/core/common/protocol"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; diff --git a/common/protocol/server_spec_test.go b/common/protocol/server_spec_test.go index 47ecfe0a5..55e9d6bc6 100644 --- a/common/protocol/server_spec_test.go +++ b/common/protocol/server_spec_test.go @@ -5,11 +5,11 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - . "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/vmess" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" ) func TestAlwaysValidStrategy(t *testing.T) { @@ -51,19 +51,19 @@ func TestUserInServerSpec(t *testing.T) { } spec := NewServerSpec(net.Destination{}, AlwaysValid(), &MemoryUser{ - Email: "test1@v2ray.com", + Email: "test1@v2fly.org", Account: toAccount(&vmess.Account{Id: uuid1.String()}), }) if spec.HasUser(&MemoryUser{ - Email: "test1@v2ray.com", + Email: "test1@v2fly.org", Account: toAccount(&vmess.Account{Id: uuid2.String()}), }) { t.Error("has user: ", uuid2) } - spec.AddUser(&MemoryUser{Email: "test2@v2ray.com"}) + spec.AddUser(&MemoryUser{Email: "test2@v2fly.org"}) if !spec.HasUser(&MemoryUser{ - Email: "test1@v2ray.com", + Email: "test1@v2fly.org", Account: toAccount(&vmess.Account{Id: uuid1.String()}), }) { t.Error("not having user: ", uuid1) @@ -71,9 +71,9 @@ func TestUserInServerSpec(t *testing.T) { } func TestPickUser(t *testing.T) { - spec := NewServerSpec(net.Destination{}, AlwaysValid(), &MemoryUser{Email: "test1@v2ray.com"}, &MemoryUser{Email: "test2@v2ray.com"}, &MemoryUser{Email: "test3@v2ray.com"}) + spec := NewServerSpec(net.Destination{}, AlwaysValid(), &MemoryUser{Email: "test1@v2fly.org"}, &MemoryUser{Email: "test2@v2fly.org"}, &MemoryUser{Email: "test3@v2fly.org"}) user := spec.PickUser() - if !strings.HasSuffix(user.Email, "@v2ray.com") { + if !strings.HasSuffix(user.Email, "@v2fly.org") { t.Error("user: ", user.Email) } } diff --git a/common/protocol/time.go b/common/protocol/time.go index 0c0d145d8..19ab60079 100644 --- a/common/protocol/time.go +++ b/common/protocol/time.go @@ -3,7 +3,7 @@ package protocol import ( "time" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common/dice" ) type Timestamp int64 diff --git a/common/protocol/time_test.go b/common/protocol/time_test.go index 6ddeed738..82fac10c9 100644 --- a/common/protocol/time_test.go +++ b/common/protocol/time_test.go @@ -4,7 +4,7 @@ import ( "testing" "time" - . "v2ray.com/core/common/protocol" + . "github.com/v2fly/v2ray-core/v4/common/protocol" ) func TestGenerateRandomInt64InRange(t *testing.T) { diff --git a/common/protocol/tls/cert/cert.go b/common/protocol/tls/cert/cert.go index 8f96db00e..28c0a8cc0 100644 --- a/common/protocol/tls/cert/cert.go +++ b/common/protocol/tls/cert/cert.go @@ -12,10 +12,10 @@ import ( "math/big" "time" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen type Certificate struct { // Cerificate in ASN.1 DER format diff --git a/common/protocol/tls/cert/cert_test.go b/common/protocol/tls/cert/cert_test.go index 830387966..a2ce82883 100644 --- a/common/protocol/tls/cert/cert_test.go +++ b/common/protocol/tls/cert/cert_test.go @@ -9,8 +9,8 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/task" ) func TestGenerate(t *testing.T) { diff --git a/common/protocol/tls/cert/errors.generated.go b/common/protocol/tls/cert/errors.generated.go index 9695be344..a8ba360ef 100644 --- a/common/protocol/tls/cert/errors.generated.go +++ b/common/protocol/tls/cert/errors.generated.go @@ -1,6 +1,6 @@ package cert -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/protocol/tls/sniff.go b/common/protocol/tls/sniff.go index a4df5c796..2e3cd2b70 100644 --- a/common/protocol/tls/sniff.go +++ b/common/protocol/tls/sniff.go @@ -5,7 +5,7 @@ import ( "errors" "strings" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type SniffHeader struct { diff --git a/common/protocol/tls/sniff_test.go b/common/protocol/tls/sniff_test.go index 9f11b490a..b0e50ce1d 100644 --- a/common/protocol/tls/sniff_test.go +++ b/common/protocol/tls/sniff_test.go @@ -3,7 +3,7 @@ package tls_test import ( "testing" - . "v2ray.com/core/common/protocol/tls" + . "github.com/v2fly/v2ray-core/v4/common/protocol/tls" ) func TestTLSHeaders(t *testing.T) { diff --git a/common/protocol/udp/packet.go b/common/protocol/udp/packet.go index 67bcf658b..c5aded72a 100644 --- a/common/protocol/udp/packet.go +++ b/common/protocol/udp/packet.go @@ -1,8 +1,8 @@ package udp import ( - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" ) // Packet is a UDP packet together with its source and destination address. diff --git a/common/protocol/user.pb.go b/common/protocol/user.pb.go index 22442e02a..4badfa004 100644 --- a/common/protocol/user.pb.go +++ b/common/protocol/user.pb.go @@ -8,11 +8,11 @@ package protocol import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -108,10 +108,11 @@ var file_common_protocol_user_proto_rawDesc = []byte{ 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x07, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, - 0x74, 0x42, 0x5f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x74, 0x42, 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x63, 0x6f, 0x6c, 0x50, 0x01, 0x5a, 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, + 0x63, 0x6f, 0x6c, 0x50, 0x01, 0x5a, 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/protocol/user.proto b/common/protocol/user.proto index 41d1b34ec..689272434 100644 --- a/common/protocol/user.proto +++ b/common/protocol/user.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.protocol; option csharp_namespace = "V2Ray.Core.Common.Protocol"; -option go_package = "v2ray.com/core/common/protocol"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/protocol"; option java_package = "com.v2ray.core.common.protocol"; option java_multiple_files = true; diff --git a/common/retry/errors.generated.go b/common/retry/errors.generated.go index db19a63d6..fac5cc43b 100644 --- a/common/retry/errors.generated.go +++ b/common/retry/errors.generated.go @@ -1,6 +1,6 @@ package retry -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/common/retry/retry.go b/common/retry/retry.go index 30aed1f1e..31cf07ec2 100644 --- a/common/retry/retry.go +++ b/common/retry/retry.go @@ -1,6 +1,6 @@ -package retry // import "v2ray.com/core/common/retry" +package retry -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "time" diff --git a/common/retry/retry_test.go b/common/retry/retry_test.go index 9d5ae9042..a684f4309 100644 --- a/common/retry/retry_test.go +++ b/common/retry/retry_test.go @@ -4,9 +4,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - . "v2ray.com/core/common/retry" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + . "github.com/v2fly/v2ray-core/v4/common/retry" ) var ( diff --git a/common/serial/serial_test.go b/common/serial/serial_test.go index f74f96af5..b9c96b242 100644 --- a/common/serial/serial_test.go +++ b/common/serial/serial_test.go @@ -6,9 +6,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/serial" ) func TestUint16Serial(t *testing.T) { diff --git a/common/serial/string_test.go b/common/serial/string_test.go index 6fe8d99db..a7cd620c7 100644 --- a/common/serial/string_test.go +++ b/common/serial/string_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" - . "v2ray.com/core/common/serial" + . "github.com/v2fly/v2ray-core/v4/common/serial" ) func TestToString(t *testing.T) { diff --git a/common/serial/typed_message.pb.go b/common/serial/typed_message.pb.go index 082ea0f23..dbe701ad9 100644 --- a/common/serial/typed_message.pb.go +++ b/common/serial/typed_message.pb.go @@ -93,10 +93,11 @@ var file_common_serial_typed_message_proto_rawDesc = []byte{ 0x0c, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, - 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x59, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42, 0x69, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, - 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x01, 0x5a, 0x1c, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, + 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x50, 0x01, 0x5a, 0x2c, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2f, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x53, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/common/serial/typed_message.proto b/common/serial/typed_message.proto index d32250ed1..b00276e83 100644 --- a/common/serial/typed_message.proto +++ b/common/serial/typed_message.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.common.serial; option csharp_namespace = "V2Ray.Core.Common.Serial"; -option go_package = "v2ray.com/core/common/serial"; +option go_package = "github.com/v2fly/v2ray-core/v4/common/serial"; option java_package = "com.v2ray.core.common.serial"; option java_multiple_files = true; diff --git a/common/serial/typed_message_test.go b/common/serial/typed_message_test.go index e5f3abd1a..397b99031 100644 --- a/common/serial/typed_message_test.go +++ b/common/serial/typed_message_test.go @@ -3,7 +3,7 @@ package serial_test import ( "testing" - . "v2ray.com/core/common/serial" + . "github.com/v2fly/v2ray-core/v4/common/serial" ) func TestGetInstance(t *testing.T) { diff --git a/common/session/session.go b/common/session/session.go index 2b67e2baa..1f41b937b 100644 --- a/common/session/session.go +++ b/common/session/session.go @@ -1,13 +1,13 @@ // Package session provides functions for sessions of incoming requests. -package session // import "v2ray.com/core/common/session" +package session import ( "context" "math/rand" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) // ID of a session. diff --git a/common/signal/notifier_test.go b/common/signal/notifier_test.go index 2b58acbb3..be87270aa 100644 --- a/common/signal/notifier_test.go +++ b/common/signal/notifier_test.go @@ -3,7 +3,7 @@ package signal_test import ( "testing" - . "v2ray.com/core/common/signal" + . "github.com/v2fly/v2ray-core/v4/common/signal" ) func TestNotifierSignal(t *testing.T) { diff --git a/common/signal/pubsub/pubsub.go b/common/signal/pubsub/pubsub.go index e71ed8698..16146200f 100644 --- a/common/signal/pubsub/pubsub.go +++ b/common/signal/pubsub/pubsub.go @@ -5,9 +5,9 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common/task" ) type Subscriber struct { diff --git a/common/signal/pubsub/pubsub_test.go b/common/signal/pubsub/pubsub_test.go index 40fda7ef2..d26848bca 100644 --- a/common/signal/pubsub/pubsub_test.go +++ b/common/signal/pubsub/pubsub_test.go @@ -3,7 +3,7 @@ package pubsub_test import ( "testing" - . "v2ray.com/core/common/signal/pubsub" + . "github.com/v2fly/v2ray-core/v4/common/signal/pubsub" ) func TestPubsub(t *testing.T) { diff --git a/common/signal/timer.go b/common/signal/timer.go index afda17754..47cf432fe 100644 --- a/common/signal/timer.go +++ b/common/signal/timer.go @@ -5,8 +5,8 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/task" ) type ActivityUpdater interface { diff --git a/common/signal/timer_test.go b/common/signal/timer_test.go index d8e0106c7..622ab2483 100644 --- a/common/signal/timer_test.go +++ b/common/signal/timer_test.go @@ -6,7 +6,7 @@ import ( "testing" "time" - . "v2ray.com/core/common/signal" + . "github.com/v2fly/v2ray-core/v4/common/signal" ) func TestActivityTimer(t *testing.T) { diff --git a/common/strmatcher/benchmark_test.go b/common/strmatcher/benchmark_test.go index 5a0673a30..930fa0b9e 100644 --- a/common/strmatcher/benchmark_test.go +++ b/common/strmatcher/benchmark_test.go @@ -4,20 +4,20 @@ import ( "strconv" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/strmatcher" ) func BenchmarkACAutomaton(b *testing.B) { ac := NewACAutomaton() for i := 1; i <= 1024; i++ { - ac.Add(strconv.Itoa(i)+".v2ray.com", Domain) + ac.Add(strconv.Itoa(i)+".v2fly.org", Domain) } ac.Build() b.ResetTimer() for i := 0; i < b.N; i++ { - _ = ac.Match("0.v2ray.com") + _ = ac.Match("0.v2fly.org") } } @@ -25,12 +25,12 @@ func BenchmarkDomainMatcherGroup(b *testing.B) { g := new(DomainMatcherGroup) for i := 1; i <= 1024; i++ { - g.Add(strconv.Itoa(i)+".v2ray.com", uint32(i)) + g.Add(strconv.Itoa(i)+".v2fly.org", uint32(i)) } b.ResetTimer() for i := 0; i < b.N; i++ { - _ = g.Match("0.v2ray.com") + _ = g.Match("0.v2fly.org") } } @@ -38,25 +38,25 @@ func BenchmarkFullMatcherGroup(b *testing.B) { g := new(FullMatcherGroup) for i := 1; i <= 1024; i++ { - g.Add(strconv.Itoa(i)+".v2ray.com", uint32(i)) + g.Add(strconv.Itoa(i)+".v2fly.org", uint32(i)) } b.ResetTimer() for i := 0; i < b.N; i++ { - _ = g.Match("0.v2ray.com") + _ = g.Match("0.v2fly.org") } } func BenchmarkMarchGroup(b *testing.B) { g := new(MatcherGroup) for i := 1; i <= 1024; i++ { - m, err := Domain.New(strconv.Itoa(i) + ".v2ray.com") + m, err := Domain.New(strconv.Itoa(i) + ".v2fly.org") common.Must(err) g.Add(m) } b.ResetTimer() for i := 0; i < b.N; i++ { - _ = g.Match("0.v2ray.com") + _ = g.Match("0.v2fly.org") } } diff --git a/common/strmatcher/domain_matcher_test.go b/common/strmatcher/domain_matcher_test.go index 660594a9f..482902195 100644 --- a/common/strmatcher/domain_matcher_test.go +++ b/common/strmatcher/domain_matcher_test.go @@ -4,12 +4,12 @@ import ( "reflect" "testing" - . "v2ray.com/core/common/strmatcher" + . "github.com/v2fly/v2ray-core/v4/common/strmatcher" ) func TestDomainMatcherGroup(t *testing.T) { g := new(DomainMatcherGroup) - g.Add("v2ray.com", 1) + g.Add("v2fly.org", 1) g.Add("google.com", 2) g.Add("x.a.com", 3) g.Add("a.b.com", 4) @@ -22,7 +22,7 @@ func TestDomainMatcherGroup(t *testing.T) { Result []uint32 }{ { - Domain: "x.v2ray.com", + Domain: "x.v2fly.org", Result: []uint32{1}, }, { @@ -69,7 +69,7 @@ func TestDomainMatcherGroup(t *testing.T) { func TestEmptyDomainMatcherGroup(t *testing.T) { g := new(DomainMatcherGroup) - r := g.Match("v2ray.com") + r := g.Match("v2fly.org") if len(r) != 0 { t.Error("Expect [], but ", r) } diff --git a/common/strmatcher/full_matcher_test.go b/common/strmatcher/full_matcher_test.go index 2fe6ee34e..1d980eee7 100644 --- a/common/strmatcher/full_matcher_test.go +++ b/common/strmatcher/full_matcher_test.go @@ -4,12 +4,12 @@ import ( "reflect" "testing" - . "v2ray.com/core/common/strmatcher" + . "github.com/v2fly/v2ray-core/v4/common/strmatcher" ) func TestFullMatcherGroup(t *testing.T) { g := new(FullMatcherGroup) - g.Add("v2ray.com", 1) + g.Add("v2fly.org", 1) g.Add("google.com", 2) g.Add("x.a.com", 3) g.Add("x.y.com", 4) @@ -20,7 +20,7 @@ func TestFullMatcherGroup(t *testing.T) { Result []uint32 }{ { - Domain: "v2ray.com", + Domain: "v2fly.org", Result: []uint32{1}, }, { @@ -43,7 +43,7 @@ func TestFullMatcherGroup(t *testing.T) { func TestEmptyFullMatcherGroup(t *testing.T) { g := new(FullMatcherGroup) - r := g.Match("v2ray.com") + r := g.Match("v2fly.org") if len(r) != 0 { t.Error("Expect [], but ", r) } diff --git a/common/strmatcher/matchers_test.go b/common/strmatcher/matchers_test.go index 83317fa38..03ae644de 100644 --- a/common/strmatcher/matchers_test.go +++ b/common/strmatcher/matchers_test.go @@ -3,8 +3,8 @@ package strmatcher_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/strmatcher" ) func TestMatcher(t *testing.T) { @@ -15,51 +15,51 @@ func TestMatcher(t *testing.T) { output bool }{ { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "www.v2ray.com", + input: "www.v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "v2ray.com", + input: "v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "www.v3ray.com", + input: "www.v3fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "2ray.com", + input: "2fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "xv2ray.com", + input: "xv2fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Full, - input: "v2ray.com", + input: "v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Full, - input: "xv2ray.com", + input: "xv2fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Regex, - input: "v2rayxcom", + input: "v2flyxorg", output: true, }, } @@ -79,45 +79,45 @@ func TestACAutomaton(t *testing.T) { output bool }{ { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "www.v2ray.com", + input: "www.v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "v2ray.com", + input: "v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "www.v3ray.com", + input: "www.v3fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "2ray.com", + input: "2fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Domain, - input: "xv2ray.com", + input: "xv2fly.org", output: false, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Full, - input: "v2ray.com", + input: "v2fly.org", output: true, }, { - pattern: "v2ray.com", + pattern: "v2fly.org", mType: Full, - input: "xv2ray.com", + input: "xv2fly.org", output: false, }, } diff --git a/common/strmatcher/strmatcher_test.go b/common/strmatcher/strmatcher_test.go index f9cf2e73c..233234584 100644 --- a/common/strmatcher/strmatcher_test.go +++ b/common/strmatcher/strmatcher_test.go @@ -4,8 +4,8 @@ import ( "reflect" "testing" - "v2ray.com/core/common" - . "v2ray.com/core/common/strmatcher" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/strmatcher" ) // See https://github.com/v2fly/v2ray-core/issues/92#issuecomment-673238489 diff --git a/common/task/common.go b/common/task/common.go index 42d3b8abe..a0a7a2cdd 100644 --- a/common/task/common.go +++ b/common/task/common.go @@ -1,6 +1,6 @@ package task -import "v2ray.com/core/common" +import "github.com/v2fly/v2ray-core/v4/common" // Close returns a func() that closes v. func Close(v interface{}) func() error { diff --git a/common/task/periodic_test.go b/common/task/periodic_test.go index cd2b58fad..13ac02724 100644 --- a/common/task/periodic_test.go +++ b/common/task/periodic_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "v2ray.com/core/common" - . "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/task" ) func TestPeriodicTaskStop(t *testing.T) { diff --git a/common/task/task.go b/common/task/task.go index 1fc52be50..5483e5701 100644 --- a/common/task/task.go +++ b/common/task/task.go @@ -3,7 +3,7 @@ package task import ( "context" - "v2ray.com/core/common/signal/semaphore" + "github.com/v2fly/v2ray-core/v4/common/signal/semaphore" ) // OnSuccess executes g() after f() returns nil. diff --git a/common/task/task_test.go b/common/task/task_test.go index 0a9b87bb1..2e5e1ff06 100644 --- a/common/task/task_test.go +++ b/common/task/task_test.go @@ -9,8 +9,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/task" ) func TestExecuteParallel(t *testing.T) { diff --git a/common/type_test.go b/common/type_test.go index cd99155ef..64caba438 100644 --- a/common/type_test.go +++ b/common/type_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - . "v2ray.com/core/common" + . "github.com/v2fly/v2ray-core/v4/common" ) type TConfig struct { diff --git a/common/uuid/uuid.go b/common/uuid/uuid.go index 9679942a0..23413d3da 100644 --- a/common/uuid/uuid.go +++ b/common/uuid/uuid.go @@ -1,12 +1,12 @@ -package uuid // import "v2ray.com/core/common/uuid" +package uuid import ( "bytes" "crypto/rand" "encoding/hex" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" ) var ( diff --git a/common/uuid/uuid_test.go b/common/uuid/uuid_test.go index 695406086..9f8e606db 100644 --- a/common/uuid/uuid_test.go +++ b/common/uuid/uuid_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/common/uuid" ) func TestParseBytes(t *testing.T) { diff --git a/config.go b/config.go index bcadbb18b..ae5b6aee7 100644 --- a/config.go +++ b/config.go @@ -7,10 +7,11 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/cmdarg" - "v2ray.com/core/main/confloader" + + "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/main/confloader" ) // ConfigFormat is a configurable format of V2Ray config file. diff --git a/config.pb.go b/config.pb.go index 96fc87c2a..ac7ad371d 100644 --- a/config.pb.go +++ b/config.pb.go @@ -8,12 +8,12 @@ package core import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" + transport "github.com/v2fly/v2ray-core/v4/transport" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" - transport "v2ray.com/core/transport" ) const ( @@ -333,11 +333,12 @@ var file_config_proto_rawDesc = []byte{ 0x72, 0x6f, 0x78, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x18, - 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x2f, + 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x74, 0x42, 0x44, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, - 0x50, 0x01, 0x5a, 0x0e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0xaa, 0x02, 0x0a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x50, 0x01, 0x5a, 0x23, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x3b, 0x63, 0x6f, 0x72, 0x65, 0xaa, 0x02, 0x0a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/config.proto b/config.proto index 4f97f7359..37476642c 100644 --- a/config.proto +++ b/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core; option csharp_namespace = "V2Ray.Core"; -option go_package = "v2ray.com/core"; +option go_package = "github.com/v2fly/v2ray-core/v4;core"; option java_package = "com.v2ray.core"; option java_multiple_files = true; diff --git a/context_test.go b/context_test.go index f66b30858..f52a48de5 100644 --- a/context_test.go +++ b/context_test.go @@ -4,7 +4,7 @@ import ( "context" "testing" - . "v2ray.com/core" + . "github.com/v2fly/v2ray-core/v4" ) func TestContextPanic(t *testing.T) { diff --git a/core.go b/core.go index 3349895ce..a1b7c84dd 100644 --- a/core.go +++ b/core.go @@ -9,12 +9,12 @@ // connections. package core -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "runtime" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/common/serial" ) var ( diff --git a/errors.generated.go b/errors.generated.go index 2f4c8644f..0b44be169 100644 --- a/errors.generated.go +++ b/errors.generated.go @@ -1,6 +1,6 @@ package core -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/dns/client.go b/features/dns/client.go index 76f635916..0eed4205e 100644 --- a/features/dns/client.go +++ b/features/dns/client.go @@ -1,10 +1,10 @@ package dns import ( - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/features" ) // Client is a V2Ray feature for querying DNS information. diff --git a/features/dns/fakedns.go b/features/dns/fakedns.go index 0206d8307..1d83f57a1 100644 --- a/features/dns/fakedns.go +++ b/features/dns/fakedns.go @@ -1,8 +1,8 @@ package dns import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features" ) type FakeDNSEngine interface { diff --git a/features/dns/localdns/client.go b/features/dns/localdns/client.go index 025719075..36ab66a65 100644 --- a/features/dns/localdns/client.go +++ b/features/dns/localdns/client.go @@ -1,8 +1,8 @@ package localdns import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/dns" ) // Client is an implementation of dns.Client, which queries localhost for DNS. diff --git a/features/dns/localdns/errors.generated.go b/features/dns/localdns/errors.generated.go index c63727c75..121712517 100644 --- a/features/dns/localdns/errors.generated.go +++ b/features/dns/localdns/errors.generated.go @@ -1,6 +1,6 @@ package localdns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/errors.generated.go b/features/errors.generated.go index 7c1082afc..24180612e 100644 --- a/features/errors.generated.go +++ b/features/errors.generated.go @@ -1,6 +1,6 @@ package features -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/feature.go b/features/feature.go index 5cd0adbd1..a609f3b44 100644 --- a/features/feature.go +++ b/features/feature.go @@ -1,8 +1,8 @@ package features -import "v2ray.com/core/common" +import "github.com/v2fly/v2ray-core/v4/common" -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen // Feature is the interface for V2Ray features. All features must implement this interface. // All existing features have an implementation in app directory. These features can be replaced by third-party ones. diff --git a/features/inbound/inbound.go b/features/inbound/inbound.go index 7a31b8947..896af40dc 100644 --- a/features/inbound/inbound.go +++ b/features/inbound/inbound.go @@ -3,9 +3,9 @@ package inbound import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features" ) // Handler is the interface for handlers that process inbound connections. diff --git a/features/outbound/outbound.go b/features/outbound/outbound.go index 05ba07589..2a540b653 100644 --- a/features/outbound/outbound.go +++ b/features/outbound/outbound.go @@ -3,9 +3,9 @@ package outbound import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features" - "v2ray.com/core/transport" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features" + "github.com/v2fly/v2ray-core/v4/transport" ) // Handler is the interface for handlers that process outbound connections. diff --git a/features/policy/policy.go b/features/policy/policy.go index 64f556984..58d93c4f8 100644 --- a/features/policy/policy.go +++ b/features/policy/policy.go @@ -5,8 +5,8 @@ import ( "runtime" "time" - "v2ray.com/core/common/platform" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/features" ) // Timeout contains limits for connection timeout. diff --git a/features/routing/context.go b/features/routing/context.go index 9a7e8b375..0c6ed2596 100644 --- a/features/routing/context.go +++ b/features/routing/context.go @@ -1,7 +1,7 @@ package routing import ( - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) // Context is a feature to store connection information for routing. diff --git a/features/routing/dispatcher.go b/features/routing/dispatcher.go index 8d4df342f..8e615d6d5 100644 --- a/features/routing/dispatcher.go +++ b/features/routing/dispatcher.go @@ -3,9 +3,9 @@ package routing import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/features" - "v2ray.com/core/transport" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features" + "github.com/v2fly/v2ray-core/v4/transport" ) // Dispatcher is a feature that dispatches inbound requests to outbound handlers based on rules. diff --git a/features/routing/dns/context.go b/features/routing/dns/context.go index e36fa1575..88a20eb50 100644 --- a/features/routing/dns/context.go +++ b/features/routing/dns/context.go @@ -1,11 +1,11 @@ package dns -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( - "v2ray.com/core/common/net" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/routing" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/routing" ) // ResolvableContext is an implementation of routing.Context, with domain resolving capability. diff --git a/features/routing/dns/errors.generated.go b/features/routing/dns/errors.generated.go index ba70372f0..438eb646e 100644 --- a/features/routing/dns/errors.generated.go +++ b/features/routing/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/routing/router.go b/features/routing/router.go index 2acc96514..e9a55be7a 100644 --- a/features/routing/router.go +++ b/features/routing/router.go @@ -1,8 +1,8 @@ package routing import ( - "v2ray.com/core/common" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features" ) // Router is a feature to choose an outbound tag for the given request. diff --git a/features/routing/session/context.go b/features/routing/session/context.go index a7a32f18d..a0aa5c6bb 100644 --- a/features/routing/session/context.go +++ b/features/routing/session/context.go @@ -3,9 +3,9 @@ package session import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/features/routing" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/features/routing" ) // Context is an implementation of routing.Context, which is a wrapper of context.context with session info. diff --git a/features/stats/errors.generated.go b/features/stats/errors.generated.go index c2489bea1..5ded551d1 100644 --- a/features/stats/errors.generated.go +++ b/features/stats/errors.generated.go @@ -1,6 +1,6 @@ package stats -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/features/stats/stats.go b/features/stats/stats.go index d0a188adf..42f3e8498 100644 --- a/features/stats/stats.go +++ b/features/stats/stats.go @@ -1,12 +1,12 @@ package stats -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/features" ) // Counter is the interface for stats counters. diff --git a/functions.go b/functions.go index a2fc42f06..d08091d8e 100644 --- a/functions.go +++ b/functions.go @@ -6,10 +6,10 @@ import ( "bytes" "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet/udp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) // CreateObject creates a new object based on the given V2Ray instance and config. The V2Ray instance may be nil. diff --git a/functions_test.go b/functions_test.go index 4fd3112e2..719c4f6a3 100644 --- a/functions_test.go +++ b/functions_test.go @@ -10,15 +10,15 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + 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/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) func xor(b []byte) []byte { diff --git a/go.mod b/go.mod index b004d40db..1b677f10a 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module v2ray.com/core +module github.com/v2fly/v2ray-core/v4 go 1.15 diff --git a/infra/conf/api.go b/infra/conf/api.go index e644fd0b2..58014cc79 100644 --- a/infra/conf/api.go +++ b/infra/conf/api.go @@ -3,11 +3,11 @@ package conf import ( "strings" - "v2ray.com/core/app/commander" - loggerservice "v2ray.com/core/app/log/command" - handlerservice "v2ray.com/core/app/proxyman/command" - statsservice "v2ray.com/core/app/stats/command" - "v2ray.com/core/common/serial" + "github.com/v2fly/v2ray-core/v4/app/commander" + loggerservice "github.com/v2fly/v2ray-core/v4/app/log/command" + handlerservice "github.com/v2fly/v2ray-core/v4/app/proxyman/command" + statsservice "github.com/v2fly/v2ray-core/v4/app/stats/command" + "github.com/v2fly/v2ray-core/v4/common/serial" ) type APIConfig struct { diff --git a/infra/conf/blackhole.go b/infra/conf/blackhole.go index a0eeec430..c1dd314c1 100644 --- a/infra/conf/blackhole.go +++ b/infra/conf/blackhole.go @@ -5,8 +5,8 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" ) type NoneResponse struct{} diff --git a/infra/conf/blackhole_test.go b/infra/conf/blackhole_test.go index cac4dd325..72e3ad395 100644 --- a/infra/conf/blackhole_test.go +++ b/infra/conf/blackhole_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/common/serial" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" ) func TestHTTPResponseJSON(t *testing.T) { diff --git a/infra/conf/command/command.go b/infra/conf/command/command.go index b7d7829cb..585d49b6f 100644 --- a/infra/conf/command/command.go +++ b/infra/conf/command/command.go @@ -1,14 +1,15 @@ package command -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "os" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/infra/conf/serial" - "v2ray.com/core/infra/control" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/infra/conf/serial" + "github.com/v2fly/v2ray-core/v4/infra/control" ) type ConfigCommand struct{} diff --git a/infra/conf/command/errors.generated.go b/infra/conf/command/errors.generated.go index 66f780510..3b1f040e5 100644 --- a/infra/conf/command/errors.generated.go +++ b/infra/conf/command/errors.generated.go @@ -1,6 +1,6 @@ package command -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/common.go b/infra/conf/common.go index cc8f01709..66d6325c4 100644 --- a/infra/conf/common.go +++ b/infra/conf/common.go @@ -5,8 +5,8 @@ import ( "os" "strings" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) type StringList []string diff --git a/infra/conf/common_test.go b/infra/conf/common_test.go index e50c165ca..7dbc0e58f 100644 --- a/infra/conf/common_test.go +++ b/infra/conf/common_test.go @@ -8,10 +8,10 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/infra/conf" + "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" ) func TestStringListUnmarshalError(t *testing.T) { @@ -44,10 +44,10 @@ func TestIPParsing(t *testing.T) { } func TestDomainParsing(t *testing.T) { - rawJSON := "\"v2ray.com\"" + rawJSON := "\"v2fly.org\"" var address Address common.Must(json.Unmarshal([]byte(rawJSON), &address)) - if address.Domain() != "v2ray.com" { + if address.Domain() != "v2fly.org" { t.Error("domain: ", address.Domain()) } } @@ -208,7 +208,7 @@ func TestUserParsing(t *testing.T) { user := new(User) common.Must(json.Unmarshal([]byte(`{ "id": "96edb838-6d68-42ef-a933-25f7ac3a9d09", - "email": "love@v2ray.com", + "email": "love@v2fly.org", "level": 1, "alterId": 100 }`), user)) @@ -216,7 +216,7 @@ func TestUserParsing(t *testing.T) { nUser := user.Build() if r := cmp.Diff(nUser, &protocol.User{ Level: 1, - Email: "love@v2ray.com", + Email: "love@v2fly.org", }, cmpopts.IgnoreUnexported(protocol.User{})); r != "" { t.Error(r) } diff --git a/infra/conf/conf.go b/infra/conf/conf.go index 4a0993847..acbaa5812 100644 --- a/infra/conf/conf.go +++ b/infra/conf/conf.go @@ -1,3 +1,3 @@ package conf -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/infra/conf/dns.go b/infra/conf/dns.go index 506747cf7..38298c9b2 100644 --- a/infra/conf/dns.go +++ b/infra/conf/dns.go @@ -5,9 +5,9 @@ import ( "sort" "strings" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common/net" ) type NameServerConfig struct { diff --git a/infra/conf/dns_proxy.go b/infra/conf/dns_proxy.go index 2333892f3..4e87bdbf9 100644 --- a/infra/conf/dns_proxy.go +++ b/infra/conf/dns_proxy.go @@ -2,8 +2,9 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/net" - "v2ray.com/core/proxy/dns" + + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/proxy/dns" ) type DNSOutboundConfig struct { diff --git a/infra/conf/dns_proxy_test.go b/infra/conf/dns_proxy_test.go index 64351929f..1d4057133 100644 --- a/infra/conf/dns_proxy_test.go +++ b/infra/conf/dns_proxy_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/dns" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/dns" ) func TestDnsProxyConfig(t *testing.T) { diff --git a/infra/conf/dns_test.go b/infra/conf/dns_test.go index 27ff08447..187a79e33 100644 --- a/infra/conf/dns_test.go +++ b/infra/conf/dns_test.go @@ -7,13 +7,14 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/platform/filesystem" - . "v2ray.com/core/infra/conf" + + "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "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" ) func init() { @@ -70,10 +71,10 @@ func TestDNSConfigParsing(t *testing.T) { "address": "8.8.8.8", "clientIp": "10.0.0.1", "port": 5353, - "domains": ["domain:v2ray.com"] + "domains": ["domain:v2fly.org"] }], "hosts": { - "v2ray.com": "127.0.0.1", + "v2fly.org": "127.0.0.1", "domain:example.com": "google.com", "geosite:test": "10.0.0.1", "keyword:google": "8.8.8.8", @@ -98,12 +99,12 @@ func TestDNSConfigParsing(t *testing.T) { PrioritizedDomain: []*dns.NameServer_PriorityDomain{ { Type: dns.DomainMatchingType_Subdomain, - Domain: "v2ray.com", + Domain: "v2fly.org", }, }, OriginalRules: []*dns.NameServer_OriginalRule{ { - Rule: "domain:v2ray.com", + Rule: "domain:v2fly.org", Size: 1, }, }, @@ -132,7 +133,7 @@ func TestDNSConfigParsing(t *testing.T) { }, { Type: dns.DomainMatchingType_Full, - Domain: "v2ray.com", + Domain: "v2fly.org", Ip: [][]byte{{127, 0, 0, 1}}, }, }, diff --git a/infra/conf/dokodemo.go b/infra/conf/dokodemo.go index c3b09b45f..4f262c35f 100644 --- a/infra/conf/dokodemo.go +++ b/infra/conf/dokodemo.go @@ -2,7 +2,8 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/proxy/dokodemo" + + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" ) type DokodemoConfig struct { diff --git a/infra/conf/dokodemo_test.go b/infra/conf/dokodemo_test.go index bc78fd618..c27e6f2a2 100644 --- a/infra/conf/dokodemo_test.go +++ b/infra/conf/dokodemo_test.go @@ -3,9 +3,9 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" ) func TestDokodemoConfig(t *testing.T) { diff --git a/infra/conf/errors.generated.go b/infra/conf/errors.generated.go index 96798e2de..be860e0a7 100644 --- a/infra/conf/errors.generated.go +++ b/infra/conf/errors.generated.go @@ -1,6 +1,6 @@ package conf -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/fakedns.go b/infra/conf/fakedns.go index d731bed56..b7f66d9d2 100644 --- a/infra/conf/fakedns.go +++ b/infra/conf/fakedns.go @@ -2,7 +2,8 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/app/dns/fakedns" + + "github.com/v2fly/v2ray-core/v4/app/dns/fakedns" ) type FakeDNSConfig struct { diff --git a/infra/conf/freedom.go b/infra/conf/freedom.go index f1f8b2ba1..d23254799 100644 --- a/infra/conf/freedom.go +++ b/infra/conf/freedom.go @@ -5,9 +5,10 @@ import ( "strings" "github.com/golang/protobuf/proto" - v2net "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/proxy/freedom" + + 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" ) type FreedomConfig struct { diff --git a/infra/conf/freedom_test.go b/infra/conf/freedom_test.go index 9f4f66425..d2ae5d09f 100644 --- a/infra/conf/freedom_test.go +++ b/infra/conf/freedom_test.go @@ -3,10 +3,10 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" ) func TestFreedomConfig(t *testing.T) { diff --git a/infra/conf/general_test.go b/infra/conf/general_test.go index 846b80234..a6fbb372b 100644 --- a/infra/conf/general_test.go +++ b/infra/conf/general_test.go @@ -5,8 +5,9 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf" + + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/infra/conf" ) func loadJSON(creator func() Buildable) func(string) (proto.Message, error) { diff --git a/infra/conf/http.go b/infra/conf/http.go index e3e2b8f8d..b659e2a52 100644 --- a/infra/conf/http.go +++ b/infra/conf/http.go @@ -4,9 +4,10 @@ import ( "encoding/json" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/http" + + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/http" ) type HTTPAccount struct { diff --git a/infra/conf/http_test.go b/infra/conf/http_test.go index 2780f92d1..d2fd081c3 100644 --- a/infra/conf/http_test.go +++ b/infra/conf/http_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/http" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/http" ) func TestHTTPServerConfig(t *testing.T) { diff --git a/infra/conf/json/reader.go b/infra/conf/json/reader.go index 6a654e51a..f143d1591 100644 --- a/infra/conf/json/reader.go +++ b/infra/conf/json/reader.go @@ -3,7 +3,7 @@ package json import ( "io" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) // State is the internal state of parser. diff --git a/infra/conf/json/reader_test.go b/infra/conf/json/reader_test.go index 44d8623e2..cda56cfa6 100644 --- a/infra/conf/json/reader_test.go +++ b/infra/conf/json/reader_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf/json" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/infra/conf/json" ) func TestReader(t *testing.T) { diff --git a/infra/conf/log.go b/infra/conf/log.go index 016eb2261..6a72a29eb 100644 --- a/infra/conf/log.go +++ b/infra/conf/log.go @@ -3,8 +3,8 @@ package conf import ( "strings" - "v2ray.com/core/app/log" - clog "v2ray.com/core/common/log" + "github.com/v2fly/v2ray-core/v4/app/log" + clog "github.com/v2fly/v2ray-core/v4/common/log" ) func DefaultLogConfig() *log.Config { diff --git a/infra/conf/mtproto.go b/infra/conf/mtproto.go index 684e06a59..ab16800ff 100644 --- a/infra/conf/mtproto.go +++ b/infra/conf/mtproto.go @@ -6,9 +6,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/mtproto" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/mtproto" ) type MTProtoAccount struct { diff --git a/infra/conf/mtproto_test.go b/infra/conf/mtproto_test.go index 7c7d49111..8b1a09077 100644 --- a/infra/conf/mtproto_test.go +++ b/infra/conf/mtproto_test.go @@ -3,10 +3,10 @@ package conf_test import ( "testing" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/mtproto" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/proxy/mtproto" ) func TestMTProtoServerConfig(t *testing.T) { @@ -18,7 +18,7 @@ func TestMTProtoServerConfig(t *testing.T) { { Input: `{ "users": [{ - "email": "love@v2ray.com", + "email": "love@v2fly.org", "level": 1, "secret": "b0cbcef5a486d9636472ac27f8e11a9d" }] @@ -27,7 +27,7 @@ func TestMTProtoServerConfig(t *testing.T) { Output: &mtproto.ServerConfig{ User: []*protocol.User{ { - Email: "love@v2ray.com", + Email: "love@v2fly.org", Level: 1, Account: serial.ToTypedMessage(&mtproto.Account{ Secret: []byte{176, 203, 206, 245, 164, 134, 217, 99, 100, 114, 172, 39, 248, 225, 26, 157}, diff --git a/infra/conf/policy.go b/infra/conf/policy.go index 73a8a3fc3..c5b2aea88 100644 --- a/infra/conf/policy.go +++ b/infra/conf/policy.go @@ -1,7 +1,7 @@ package conf import ( - "v2ray.com/core/app/policy" + "github.com/v2fly/v2ray-core/v4/app/policy" ) type Policy struct { diff --git a/infra/conf/policy_test.go b/infra/conf/policy_test.go index 097181052..a7408623c 100644 --- a/infra/conf/policy_test.go +++ b/infra/conf/policy_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/infra/conf" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/infra/conf" ) func TestBufferSize(t *testing.T) { diff --git a/infra/conf/reverse.go b/infra/conf/reverse.go index d9144255b..7a1d732c1 100644 --- a/infra/conf/reverse.go +++ b/infra/conf/reverse.go @@ -2,7 +2,8 @@ package conf import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/app/reverse" + + "github.com/v2fly/v2ray-core/v4/app/reverse" ) type BridgeConfig struct { diff --git a/infra/conf/reverse_test.go b/infra/conf/reverse_test.go index c6c9e1da4..3006ef7ff 100644 --- a/infra/conf/reverse_test.go +++ b/infra/conf/reverse_test.go @@ -3,8 +3,8 @@ package conf_test import ( "testing" - "v2ray.com/core/app/reverse" - "v2ray.com/core/infra/conf" + "github.com/v2fly/v2ray-core/v4/app/reverse" + "github.com/v2fly/v2ray-core/v4/infra/conf" ) func TestReverseConfig(t *testing.T) { @@ -17,13 +17,13 @@ func TestReverseConfig(t *testing.T) { Input: `{ "bridges": [{ "tag": "test", - "domain": "test.v2ray.com" + "domain": "test.v2fly.org" }] }`, Parser: loadJSON(creator), Output: &reverse.Config{ BridgeConfig: []*reverse.BridgeConfig{ - {Tag: "test", Domain: "test.v2ray.com"}, + {Tag: "test", Domain: "test.v2fly.org"}, }, }, }, @@ -31,13 +31,13 @@ func TestReverseConfig(t *testing.T) { Input: `{ "portals": [{ "tag": "test", - "domain": "test.v2ray.com" + "domain": "test.v2fly.org" }] }`, Parser: loadJSON(creator), Output: &reverse.Config{ PortalConfig: []*reverse.PortalConfig{ - {Tag: "test", Domain: "test.v2ray.com"}, + {Tag: "test", Domain: "test.v2fly.org"}, }, }, }, diff --git a/infra/conf/router.go b/infra/conf/router.go index 0d52d0e4f..ae23ece6e 100644 --- a/infra/conf/router.go +++ b/infra/conf/router.go @@ -6,9 +6,10 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform/filesystem" + + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/platform/filesystem" ) type RouterRulesConfig struct { diff --git a/infra/conf/router_test.go b/infra/conf/router_test.go index 5f2cb24b6..0a1dd0aeb 100644 --- a/infra/conf/router_test.go +++ b/infra/conf/router_test.go @@ -6,9 +6,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/app/router" - "v2ray.com/core/common/net" - . "v2ray.com/core/infra/conf" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/infra/conf" ) func TestRouterConfig(t *testing.T) { diff --git a/infra/conf/serial/errors.generated.go b/infra/conf/serial/errors.generated.go index aeb5e222b..6e9546f3b 100644 --- a/infra/conf/serial/errors.generated.go +++ b/infra/conf/serial/errors.generated.go @@ -1,6 +1,6 @@ package serial -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/conf/serial/loader.go b/infra/conf/serial/loader.go index f7ecf2db1..f3dbf2ad7 100644 --- a/infra/conf/serial/loader.go +++ b/infra/conf/serial/loader.go @@ -5,10 +5,10 @@ import ( "encoding/json" "io" - "v2ray.com/core" - "v2ray.com/core/common/errors" - "v2ray.com/core/infra/conf" - json_reader "v2ray.com/core/infra/conf/json" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/infra/conf" + json_reader "github.com/v2fly/v2ray-core/v4/infra/conf/json" ) type offset struct { diff --git a/infra/conf/serial/loader_test.go b/infra/conf/serial/loader_test.go index 2bdda7bde..ebe52b79c 100644 --- a/infra/conf/serial/loader_test.go +++ b/infra/conf/serial/loader_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "v2ray.com/core/infra/conf/serial" + "github.com/v2fly/v2ray-core/v4/infra/conf/serial" ) func TestLoaderError(t *testing.T) { diff --git a/infra/conf/serial/serial.go b/infra/conf/serial/serial.go index 8c0604ac4..27d6c5349 100644 --- a/infra/conf/serial/serial.go +++ b/infra/conf/serial/serial.go @@ -1,3 +1,3 @@ package serial -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/infra/conf/shadowsocks.go b/infra/conf/shadowsocks.go index 7f326bdac..a95200b68 100644 --- a/infra/conf/shadowsocks.go +++ b/infra/conf/shadowsocks.go @@ -5,9 +5,9 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/shadowsocks" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" ) func cipherFromString(c string) shadowsocks.CipherType { diff --git a/infra/conf/shadowsocks_test.go b/infra/conf/shadowsocks_test.go index 27bd31445..743ef82e3 100644 --- a/infra/conf/shadowsocks_test.go +++ b/infra/conf/shadowsocks_test.go @@ -3,11 +3,11 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/shadowsocks" + "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" + "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" ) func TestShadowsocksServerConfigParsing(t *testing.T) { diff --git a/infra/conf/socks.go b/infra/conf/socks.go index 1d382788b..73cf370bd 100644 --- a/infra/conf/socks.go +++ b/infra/conf/socks.go @@ -4,9 +4,10 @@ import ( "encoding/json" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/socks" + + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/socks" ) type SocksAccount struct { diff --git a/infra/conf/socks_test.go b/infra/conf/socks_test.go index 3889a171d..c8a1858b0 100644 --- a/infra/conf/socks_test.go +++ b/infra/conf/socks_test.go @@ -3,11 +3,11 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/socks" + "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" + "github.com/v2fly/v2ray-core/v4/proxy/socks" ) func TestSocksInboundConfig(t *testing.T) { diff --git a/infra/conf/transport.go b/infra/conf/transport.go index d9d09bd35..151c1e176 100644 --- a/infra/conf/transport.go +++ b/infra/conf/transport.go @@ -1,9 +1,9 @@ package conf import ( - "v2ray.com/core/common/serial" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type TransportConfig struct { diff --git a/infra/conf/transport_authenticators.go b/infra/conf/transport_authenticators.go index 989060fdb..c7fa7da3a 100644 --- a/infra/conf/transport_authenticators.go +++ b/infra/conf/transport_authenticators.go @@ -5,13 +5,13 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/srtp" - "v2ray.com/core/transport/internet/headers/tls" - "v2ray.com/core/transport/internet/headers/utp" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/headers/wireguard" + "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" ) type NoOpAuthenticator struct{} diff --git a/infra/conf/transport_internet.go b/infra/conf/transport_internet.go index 96a1fc44e..9a1a04d06 100644 --- a/infra/conf/transport_internet.go +++ b/infra/conf/transport_internet.go @@ -5,17 +5,18 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/platform/filesystem" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/domainsocket" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/kcp" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + + "github.com/v2fly/v2ray-core/v4/common/platform/filesystem" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket" + "github.com/v2fly/v2ray-core/v4/transport/internet/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/tls" + "github.com/v2fly/v2ray-core/v4/transport/internet/websocket" ) var ( diff --git a/infra/conf/transport_test.go b/infra/conf/transport_test.go index d547482f8..7cb3cdb3d 100644 --- a/infra/conf/transport_test.go +++ b/infra/conf/transport_test.go @@ -5,18 +5,19 @@ import ( "testing" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/tls" - "v2ray.com/core/transport/internet/kcp" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tcp" - "v2ray.com/core/transport/internet/websocket" + + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + . "github.com/v2fly/v2ray-core/v4/infra/conf" + "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" ) func TestSocketConfig(t *testing.T) { diff --git a/infra/conf/trojan.go b/infra/conf/trojan.go index e9e23c61e..d2b7217f8 100644 --- a/infra/conf/trojan.go +++ b/infra/conf/trojan.go @@ -8,10 +8,10 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/trojan" + "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/proxy/trojan" ) // TrojanServerTarget is configuration of a single trojan server diff --git a/infra/conf/v2ray.go b/infra/conf/v2ray.go index 390058992..e77cfea7b 100644 --- a/infra/conf/v2ray.go +++ b/infra/conf/v2ray.go @@ -6,11 +6,11 @@ import ( "os" "strings" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/stats" - "v2ray.com/core/common/serial" + 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" ) var ( diff --git a/infra/conf/v2ray_test.go b/infra/conf/v2ray_test.go index a26af25ee..161d39c7e 100644 --- a/infra/conf/v2ray_test.go +++ b/infra/conf/v2ray_test.go @@ -7,26 +7,27 @@ import ( "github.com/golang/protobuf/proto" "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/blackhole" - dns_proxy "v2ray.com/core/proxy/dns" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + + 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/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" + "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" ) func TestV2RayConfig(t *testing.T) { diff --git a/infra/conf/vless.go b/infra/conf/vless.go index df589394f..d4c6a9b48 100644 --- a/infra/conf/vless.go +++ b/infra/conf/vless.go @@ -8,12 +8,12 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/vless" - "v2ray.com/core/proxy/vless/inbound" - "v2ray.com/core/proxy/vless/outbound" + "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/proxy/vless" + "github.com/v2fly/v2ray-core/v4/proxy/vless/inbound" + "github.com/v2fly/v2ray-core/v4/proxy/vless/outbound" ) type VLessInboundFallback struct { diff --git a/infra/conf/vless_test.go b/infra/conf/vless_test.go index 12035095b..0ef1dd73e 100644 --- a/infra/conf/vless_test.go +++ b/infra/conf/vless_test.go @@ -3,13 +3,13 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/vless" - "v2ray.com/core/proxy/vless/inbound" - "v2ray.com/core/proxy/vless/outbound" + "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" + "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" ) func TestVLessOutbound(t *testing.T) { diff --git a/infra/conf/vmess.go b/infra/conf/vmess.go index 0bede83c6..8e6a88662 100644 --- a/infra/conf/vmess.go +++ b/infra/conf/vmess.go @@ -6,11 +6,11 @@ import ( "github.com/golang/protobuf/proto" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "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" ) type VMessAccount struct { diff --git a/infra/conf/vmess_test.go b/infra/conf/vmess_test.go index ad3a2e1fa..726d40df8 100644 --- a/infra/conf/vmess_test.go +++ b/infra/conf/vmess_test.go @@ -3,13 +3,13 @@ package conf_test import ( "testing" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - . "v2ray.com/core/infra/conf" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" + "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" + "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" ) func TestVMessOutbound(t *testing.T) { @@ -26,7 +26,7 @@ func TestVMessOutbound(t *testing.T) { "users": [ { "id": "e641f5ad-9397-41e3-bf1a-e8740dfed019", - "email": "love@v2ray.com", + "email": "love@v2fly.org", "level": 255 } ] @@ -44,7 +44,7 @@ func TestVMessOutbound(t *testing.T) { Port: 80, User: []*protocol.User{ { - Email: "love@v2ray.com", + Email: "love@v2fly.org", Level: 255, Account: serial.ToTypedMessage(&vmess.Account{ Id: "e641f5ad-9397-41e3-bf1a-e8740dfed019", @@ -75,7 +75,7 @@ func TestVMessInbound(t *testing.T) { "id": "27848739-7e62-4138-9fd3-098a63964b6b", "level": 0, "alterId": 16, - "email": "love@v2ray.com", + "email": "love@v2fly.org", "security": "aes-128-gcm" } ], @@ -93,7 +93,7 @@ func TestVMessInbound(t *testing.T) { User: []*protocol.User{ { Level: 0, - Email: "love@v2ray.com", + Email: "love@v2fly.org", Account: serial.ToTypedMessage(&vmess.Account{ Id: "27848739-7e62-4138-9fd3-098a63964b6b", AlterId: 16, diff --git a/infra/control/api.go b/infra/control/api.go index 8954eb6f9..5d435b006 100644 --- a/infra/control/api.go +++ b/infra/control/api.go @@ -11,9 +11,9 @@ import ( "github.com/golang/protobuf/proto" "google.golang.org/grpc" - logService "v2ray.com/core/app/log/command" - statsService "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" + logService "github.com/v2fly/v2ray-core/v4/app/log/command" + statsService "github.com/v2fly/v2ray-core/v4/app/stats/command" + "github.com/v2fly/v2ray-core/v4/common" ) type APICommand struct{} diff --git a/infra/control/cert.go b/infra/control/cert.go index e39f28696..0690af850 100644 --- a/infra/control/cert.go +++ b/infra/control/cert.go @@ -9,9 +9,9 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/task" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/common/task" ) type stringList []string @@ -44,7 +44,7 @@ func (c *CertificateCommand) Description() Description { return Description{ Short: "Generate TLS certificates.", Usage: []string{ - "v2ctl cert [--ca] [--domain=v2ray.com] [--expire=240h]", + "v2ctl cert [--ca] [--domain=v2fly.org] [--expire=240h]", "Generate new TLS certificate", "--ca The new certificate is a CA certificate", "--domain Common name for the certificate", diff --git a/infra/control/config.go b/infra/control/config.go index 5738cc9dd..6a1f9b50d 100644 --- a/infra/control/config.go +++ b/infra/control/config.go @@ -8,9 +8,10 @@ import ( "strings" "github.com/golang/protobuf/proto" - "v2ray.com/core/common" - "v2ray.com/core/infra/conf" - "v2ray.com/core/infra/conf/serial" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/infra/conf/serial" ) // ConfigCommand is the json to pb convert struct diff --git a/infra/control/control.go b/infra/control/control.go index 7c05ea278..fb604991b 100644 --- a/infra/control/control.go +++ b/infra/control/control.go @@ -1,3 +1,3 @@ package control -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/infra/control/errors.generated.go b/infra/control/errors.generated.go index 143c6a0df..5d8e82f22 100644 --- a/infra/control/errors.generated.go +++ b/infra/control/errors.generated.go @@ -1,6 +1,6 @@ package control -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/infra/control/fetch.go b/infra/control/fetch.go index 30830ae2f..aee054bc5 100644 --- a/infra/control/fetch.go +++ b/infra/control/fetch.go @@ -7,8 +7,8 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" ) type FetchCommand struct{} diff --git a/infra/control/love.go b/infra/control/love.go index a911ed422..6dfff967f 100644 --- a/infra/control/love.go +++ b/infra/control/love.go @@ -7,8 +7,8 @@ import ( "encoding/base64" "fmt" - "v2ray.com/core/common" - "v2ray.com/core/common/platform" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/platform" ) const content = "H4sIAAAAAAAC/4SVMaskNwzH+/kUW6izcSthMGrcqLhVk0rdQS5cSMg7Xu4S0vizB8meZd57M3ta2GHX/ukvyZZmY2ZKDMzCzJyY5yOlxKII1omsf+qkBiiC6WhbYsbkjDAfySQsJqD3jtrD0EBM3sBHzG3kUsrglIQREXonpd47kYIi4AHmgI9Wcq2jlJITC6JZJ+v3ECYzBMAHyYm392yuY4zWsjACmHZSh6l3A0JETzGlWZqDsnArpTg62mhJONhOdO90p97V1BAnteoaOcuummtrrtuERQwUiJwP8a4KGKcyxdOCw1spOY+WHueFqmakAIgUSSuhwKNgobxKXSLbtg6r5cFmBiAeF6yCkYycmv+BiCIiW8ScHa3DgxAuZQbRhFNrLTFo96RBmx9jKWWG5nBsjyJzuIkftUblonppZU5t5LzwIks5L1a4lijagQxLokbIYwxfytNDC+XQqrWW9fzAunhqh5/Tg8PuaMw0d/Tcw3iDO81bHfWM/AnutMh2xqSUntMzd3wHDy9iHMQz8bmUZYvqedTJ5GgOnrNt7FIbSlwXE3wDI19n/KA38MsLaP4l89b5F8AV3ESOMIEhIBgezHBc0H6xV9KbaXwMvPcNvIHcC0C7UPZQx4JVTb35/AneSQq+bAYXsBmY7TCRupF2NTdVm/+ch22xa0pvRERKqt1oxj9DUbXzU84Gvj5hc5a81SlAUwMwgEs4T9+7sg9lb9h+908MWiKV8xtWciVTmnB3tivRjNerfXdxpfEBbq2NUvLMM5R9NLuyQg8nXT0PIh1xPd/wrcV49oJ6zbZaPlj2V87IY9T3F2XCOcW2MbZyZd49H+9m81E1N9SxlU+ff/1y+/f3719vf7788+Ugv/ffbMIH7ZNj0dsT4WMHHwLPu/Rp2O75uh99AK+N2xn7ZHq1OK6gczkN+9ngdOl1Qvki5xwSR8vFX6D+9vXA97B/+fr5rz9u/738uP328urP19vfP759e3n9Xs6jamvqlfJ/AAAA//+YAMZjDgkAAA==" diff --git a/infra/control/main/main.go b/infra/control/main/main.go index e78fa5d12..4d35be5f8 100644 --- a/infra/control/main/main.go +++ b/infra/control/main/main.go @@ -5,9 +5,9 @@ import ( "fmt" "os" - commlog "v2ray.com/core/common/log" - // _ "v2ray.com/core/infra/conf/command" - "v2ray.com/core/infra/control" + commlog "github.com/v2fly/v2ray-core/v4/common/log" + // _ "github.com/v2fly/v2ray-core/v4/infra/conf/command" + "github.com/v2fly/v2ray-core/v4/infra/control" ) func getCommandName() string { diff --git a/infra/control/tlsping.go b/infra/control/tlsping.go index de57a5d28..25cbeab5b 100644 --- a/infra/control/tlsping.go +++ b/infra/control/tlsping.go @@ -7,7 +7,7 @@ import ( "fmt" "net" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type TLSPingCommand struct{} diff --git a/infra/control/uuid.go b/infra/control/uuid.go index d3ab47f38..015111de1 100644 --- a/infra/control/uuid.go +++ b/infra/control/uuid.go @@ -3,8 +3,8 @@ package control import ( "fmt" - "v2ray.com/core/common" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) type UUIDCommand struct{} diff --git a/infra/control/verify.go b/infra/control/verify.go index 84a1ae14f..48bed7f32 100644 --- a/infra/control/verify.go +++ b/infra/control/verify.go @@ -5,7 +5,8 @@ import ( "os" "github.com/v2fly/VSign/signerVerify" - "v2ray.com/core/common" + + "github.com/v2fly/v2ray-core/v4/common" ) type VerifyCommand struct{} diff --git a/infra/vprotogen/main.go b/infra/vprotogen/main.go index f99c6865d..0d8f1cabd 100644 --- a/infra/vprotogen/main.go +++ b/infra/vprotogen/main.go @@ -8,8 +8,8 @@ import ( "runtime" "strings" - "v2ray.com/core" - "v2ray.com/core/common" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" ) func main() { diff --git a/main/confloader/errors.generated.go b/main/confloader/errors.generated.go index deda6e515..faf13cf65 100644 --- a/main/confloader/errors.generated.go +++ b/main/confloader/errors.generated.go @@ -1,6 +1,6 @@ package confloader -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/confloader/external/errors.generated.go b/main/confloader/external/errors.generated.go index 919f10d00..04cde6576 100644 --- a/main/confloader/external/errors.generated.go +++ b/main/confloader/external/errors.generated.go @@ -1,6 +1,6 @@ package external -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/confloader/external/external.go b/main/confloader/external/external.go index 1c4145e1a..7e543b1e2 100644 --- a/main/confloader/external/external.go +++ b/main/confloader/external/external.go @@ -1,6 +1,6 @@ package external -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "bytes" @@ -12,9 +12,9 @@ import ( "strings" "time" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/platform/ctlcmd" - "v2ray.com/core/main/confloader" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/platform/ctlcmd" + "github.com/v2fly/v2ray-core/v4/main/confloader" ) func ConfigLoader(arg string) (out io.Reader, err error) { diff --git a/main/distro/all/all.go b/main/distro/all/all.go index afacd2a94..9c6e1b0fb 100644 --- a/main/distro/all/all.go +++ b/main/distro/all/all.go @@ -4,65 +4,65 @@ import ( // The following are necessary as they register handlers in their init functions. // Required features. Can't remove unless there is replacements. - _ "v2ray.com/core/app/dispatcher" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" + _ "github.com/v2fly/v2ray-core/v4/app/dispatcher" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/inbound" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" // Default commander and all its services. This is an optional feature. - _ "v2ray.com/core/app/commander" - _ "v2ray.com/core/app/log/command" - _ "v2ray.com/core/app/proxyman/command" - _ "v2ray.com/core/app/stats/command" + _ "github.com/v2fly/v2ray-core/v4/app/commander" + _ "github.com/v2fly/v2ray-core/v4/app/log/command" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/command" + _ "github.com/v2fly/v2ray-core/v4/app/stats/command" // Other optional features. - _ "v2ray.com/core/app/dns" - _ "v2ray.com/core/app/dns/fakedns" - _ "v2ray.com/core/app/log" - _ "v2ray.com/core/app/policy" - _ "v2ray.com/core/app/reverse" - _ "v2ray.com/core/app/router" - _ "v2ray.com/core/app/stats" + _ "github.com/v2fly/v2ray-core/v4/app/dns" + _ "github.com/v2fly/v2ray-core/v4/app/dns/fakedns" + _ "github.com/v2fly/v2ray-core/v4/app/log" + _ "github.com/v2fly/v2ray-core/v4/app/policy" + _ "github.com/v2fly/v2ray-core/v4/app/reverse" + _ "github.com/v2fly/v2ray-core/v4/app/router" + _ "github.com/v2fly/v2ray-core/v4/app/stats" // Inbound and outbound proxies. - _ "v2ray.com/core/proxy/blackhole" - _ "v2ray.com/core/proxy/dns" - _ "v2ray.com/core/proxy/dokodemo" - _ "v2ray.com/core/proxy/freedom" - _ "v2ray.com/core/proxy/http" - _ "v2ray.com/core/proxy/mtproto" - _ "v2ray.com/core/proxy/shadowsocks" - _ "v2ray.com/core/proxy/socks" - _ "v2ray.com/core/proxy/trojan" - _ "v2ray.com/core/proxy/vless/inbound" - _ "v2ray.com/core/proxy/vless/outbound" - _ "v2ray.com/core/proxy/vmess/inbound" - _ "v2ray.com/core/proxy/vmess/outbound" + _ "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + _ "github.com/v2fly/v2ray-core/v4/proxy/dns" + _ "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + _ "github.com/v2fly/v2ray-core/v4/proxy/freedom" + _ "github.com/v2fly/v2ray-core/v4/proxy/http" + _ "github.com/v2fly/v2ray-core/v4/proxy/mtproto" + _ "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" + _ "github.com/v2fly/v2ray-core/v4/proxy/socks" + _ "github.com/v2fly/v2ray-core/v4/proxy/trojan" + _ "github.com/v2fly/v2ray-core/v4/proxy/vless/inbound" + _ "github.com/v2fly/v2ray-core/v4/proxy/vless/outbound" + _ "github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound" + _ "github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound" // Transports - _ "v2ray.com/core/transport/internet/domainsocket" - _ "v2ray.com/core/transport/internet/http" - _ "v2ray.com/core/transport/internet/kcp" - _ "v2ray.com/core/transport/internet/quic" - _ "v2ray.com/core/transport/internet/tcp" - _ "v2ray.com/core/transport/internet/tls" - _ "v2ray.com/core/transport/internet/udp" - _ "v2ray.com/core/transport/internet/websocket" + _ "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket" + _ "github.com/v2fly/v2ray-core/v4/transport/internet/http" + _ "github.com/v2fly/v2ray-core/v4/transport/internet/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/tls" + _ "github.com/v2fly/v2ray-core/v4/transport/internet/udp" + _ "github.com/v2fly/v2ray-core/v4/transport/internet/websocket" // Transport headers - _ "v2ray.com/core/transport/internet/headers/http" - _ "v2ray.com/core/transport/internet/headers/noop" - _ "v2ray.com/core/transport/internet/headers/srtp" - _ "v2ray.com/core/transport/internet/headers/tls" - _ "v2ray.com/core/transport/internet/headers/utp" - _ "v2ray.com/core/transport/internet/headers/wechat" - _ "v2ray.com/core/transport/internet/headers/wireguard" + _ "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" // JSON config support. Choose only one from the two below. // The following line loads JSON from v2ctl - // _ "v2ray.com/core/main/json" + // _ "github.com/v2fly/v2ray-core/v4/main/json" // The following line loads JSON internally - _ "v2ray.com/core/main/jsonem" + _ "github.com/v2fly/v2ray-core/v4/main/jsonem" // Load config from file or http(s) - _ "v2ray.com/core/main/confloader/external" + _ "github.com/v2fly/v2ray-core/v4/main/confloader/external" ) diff --git a/main/errors.generated.go b/main/errors.generated.go index ed27b93a2..4f2041bd2 100644 --- a/main/errors.generated.go +++ b/main/errors.generated.go @@ -1,6 +1,6 @@ package main -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/json/config_json.go b/main/json/config_json.go index fb89358a1..9dfb66906 100644 --- a/main/json/config_json.go +++ b/main/json/config_json.go @@ -1,15 +1,15 @@ package json -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "io" "os" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/cmdarg" - "v2ray.com/core/main/confloader" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/cmdarg" + "github.com/v2fly/v2ray-core/v4/main/confloader" ) func init() { diff --git a/main/json/errors.generated.go b/main/json/errors.generated.go index 654bc88ec..eb6c6c5c1 100644 --- a/main/json/errors.generated.go +++ b/main/json/errors.generated.go @@ -1,6 +1,6 @@ package json -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/jsonem/errors.generated.go b/main/jsonem/errors.generated.go index 48961bcea..aaafcde6b 100644 --- a/main/jsonem/errors.generated.go +++ b/main/jsonem/errors.generated.go @@ -1,6 +1,6 @@ package jsonem -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/main/jsonem/jsonem.go b/main/jsonem/jsonem.go index a289b2ae6..94bae0646 100644 --- a/main/jsonem/jsonem.go +++ b/main/jsonem/jsonem.go @@ -3,12 +3,12 @@ package jsonem import ( "io" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/cmdarg" - "v2ray.com/core/infra/conf" - "v2ray.com/core/infra/conf/serial" - "v2ray.com/core/main/confloader" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/cmdarg" + "github.com/v2fly/v2ray-core/v4/infra/conf" + "github.com/v2fly/v2ray-core/v4/infra/conf/serial" + "github.com/v2fly/v2ray-core/v4/main/confloader" ) func init() { diff --git a/main/main.go b/main/main.go index d25ae6647..c2ff3d3fc 100644 --- a/main/main.go +++ b/main/main.go @@ -1,6 +1,6 @@ package main -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "flag" @@ -15,10 +15,10 @@ import ( "strings" "syscall" - "v2ray.com/core" - "v2ray.com/core/common/cmdarg" - "v2ray.com/core/common/platform" - _ "v2ray.com/core/main/distro/all" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/common/cmdarg" + "github.com/v2fly/v2ray-core/v4/common/platform" + _ "github.com/v2fly/v2ray-core/v4/main/distro/all" ) var ( diff --git a/mocks.go b/mocks.go index 3b1cc8942..967a6837c 100644 --- a/mocks.go +++ b/mocks.go @@ -1,8 +1,8 @@ package core //go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/io.go -mock_names Reader=Reader,Writer=Writer io Reader,Writer -//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/log.go -mock_names Handler=LogHandler v2ray.com/core/common/log Handler -//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/mux.go -mock_names ClientWorkerFactory=MuxClientWorkerFactory v2ray.com/core/common/mux ClientWorkerFactory -//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/dns.go -mock_names Client=DNSClient v2ray.com/core/features/dns Client -//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/outbound.go -mock_names Manager=OutboundManager,HandlerSelector=OutboundHandlerSelector v2ray.com/core/features/outbound Manager,HandlerSelector -//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/proxy.go -mock_names Inbound=ProxyInbound,Outbound=ProxyOutbound v2ray.com/core/proxy Inbound,Outbound +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/log.go -mock_names Handler=LogHandler github.com/v2fly/v2ray-core/v4/common/log Handler +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/mux.go -mock_names ClientWorkerFactory=MuxClientWorkerFactory github.com/v2fly/v2ray-core/v4/common/mux ClientWorkerFactory +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/dns.go -mock_names Client=DNSClient github.com/v2fly/v2ray-core/v4/features/dns Client +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/outbound.go -mock_names Manager=OutboundManager,HandlerSelector=OutboundHandlerSelector github.com/v2fly/v2ray-core/v4/features/outbound Manager,HandlerSelector +//go:generate go run github.com/golang/mock/mockgen -package mocks -destination testing/mocks/proxy.go -mock_names Inbound=ProxyInbound,Outbound=ProxyOutbound github.com/v2fly/v2ray-core/v4/proxy Inbound,Outbound diff --git a/proxy/blackhole/blackhole.go b/proxy/blackhole/blackhole.go index 00b12a222..732c46dee 100644 --- a/proxy/blackhole/blackhole.go +++ b/proxy/blackhole/blackhole.go @@ -3,15 +3,15 @@ // Package blackhole is an outbound handler that blocks all connections. package blackhole -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "time" - "v2ray.com/core/common" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Handler is an outbound connection that silently swallow the entire payload. diff --git a/proxy/blackhole/blackhole_test.go b/proxy/blackhole/blackhole_test.go index a9c168e94..0f48b3b36 100644 --- a/proxy/blackhole/blackhole_test.go +++ b/proxy/blackhole/blackhole_test.go @@ -4,12 +4,12 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/transport" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func TestBlackHoleHTTPResponse(t *testing.T) { diff --git a/proxy/blackhole/config.go b/proxy/blackhole/config.go index 6c1e864fa..b33734283 100644 --- a/proxy/blackhole/config.go +++ b/proxy/blackhole/config.go @@ -1,8 +1,8 @@ package blackhole import ( - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" ) const ( diff --git a/proxy/blackhole/config.pb.go b/proxy/blackhole/config.pb.go index d90d8da12..b4298b4ed 100644 --- a/proxy/blackhole/config.pb.go +++ b/proxy/blackhole/config.pb.go @@ -8,11 +8,11 @@ package blackhole import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -164,10 +164,11 @@ var file_proxy_blackhole_config_proto_rawDesc = []byte{ 0x6e, 0x73, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, - 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x5f, 0x0a, 0x1e, 0x63, + 0x65, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x6f, 0x0a, 0x1e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x50, 0x01, 0x5a, - 0x1e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x2e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, + 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x62, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0xaa, 0x02, 0x1a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x42, 0x6c, 0x61, 0x63, 0x6b, 0x68, 0x6f, 0x6c, 0x65, 0x62, 0x06, 0x70, 0x72, diff --git a/proxy/blackhole/config.proto b/proxy/blackhole/config.proto index aae9869c9..b7957e056 100644 --- a/proxy/blackhole/config.proto +++ b/proxy/blackhole/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.blackhole; option csharp_namespace = "V2Ray.Core.Proxy.Blackhole"; -option go_package = "v2ray.com/core/proxy/blackhole"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/blackhole"; option java_package = "com.v2ray.core.proxy.blackhole"; option java_multiple_files = true; diff --git a/proxy/blackhole/config_test.go b/proxy/blackhole/config_test.go index 42bf0f0dc..603162cb9 100644 --- a/proxy/blackhole/config_test.go +++ b/proxy/blackhole/config_test.go @@ -5,9 +5,9 @@ import ( "net/http" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/proxy/blackhole" ) func TestHTTPResponse(t *testing.T) { diff --git a/proxy/blackhole/errors.generated.go b/proxy/blackhole/errors.generated.go index e985de40f..237b8fcef 100644 --- a/proxy/blackhole/errors.generated.go +++ b/proxy/blackhole/errors.generated.go @@ -1,6 +1,6 @@ package blackhole -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/dns/config.pb.go b/proxy/dns/config.pb.go index 97cb97e92..7a4c8aa69 100644 --- a/proxy/dns/config.pb.go +++ b/proxy/dns/config.pb.go @@ -8,11 +8,11 @@ package dns import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" ) const ( @@ -87,9 +87,10 @@ var file_proxy_dns_config_proto_rawDesc = []byte{ 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x6e, 0x65, 0x74, 0x2e, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x42, - 0x4d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, - 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x18, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x5d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, + 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6e, 0x73, 0x50, 0x01, 0x5a, 0x28, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6e, 0x73, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/dns/config.proto b/proxy/dns/config.proto index e56054082..3dc361d73 100644 --- a/proxy/dns/config.proto +++ b/proxy/dns/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.dns; option csharp_namespace = "V2Ray.Core.Proxy.Dns"; -option go_package = "v2ray.com/core/proxy/dns"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/dns"; option java_package = "com.v2ray.core.proxy.dns"; option java_multiple_files = true; diff --git a/proxy/dns/dns.go b/proxy/dns/dns.go index cb3376870..d510fd5d4 100644 --- a/proxy/dns/dns.go +++ b/proxy/dns/dns.go @@ -9,16 +9,16 @@ import ( "golang.org/x/net/dns/dnsmessage" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - dns_proto "v2ray.com/core/common/protocol/dns" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/features/dns" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + dns_proto "github.com/v2fly/v2ray-core/v4/common/protocol/dns" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/proxy/dns/dns_test.go b/proxy/dns/dns_test.go index aebfb01c5..67f8c1e35 100644 --- a/proxy/dns/dns_test.go +++ b/proxy/dns/dns_test.go @@ -7,20 +7,21 @@ import ( "github.com/google/go-cmp/cmp" "github.com/miekg/dns" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - dnsapp "v2ray.com/core/app/dns" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - dns_proxy "v2ray.com/core/proxy/dns" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/dispatcher" + dnsapp "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/inbound" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + dns_proxy "github.com/v2fly/v2ray-core/v4/proxy/dns" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) type staticHandler struct { diff --git a/proxy/dns/errors.generated.go b/proxy/dns/errors.generated.go index ba70372f0..438eb646e 100644 --- a/proxy/dns/errors.generated.go +++ b/proxy/dns/errors.generated.go @@ -1,6 +1,6 @@ package dns -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/dokodemo/config.go b/proxy/dokodemo/config.go index 84278afe4..866c186fb 100644 --- a/proxy/dokodemo/config.go +++ b/proxy/dokodemo/config.go @@ -1,7 +1,7 @@ package dokodemo import ( - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) // GetPredefinedAddress returns the defined address from proto config. Null if address is not valid. diff --git a/proxy/dokodemo/config.pb.go b/proxy/dokodemo/config.pb.go index 541a6711f..655f9a17b 100644 --- a/proxy/dokodemo/config.pb.go +++ b/proxy/dokodemo/config.pb.go @@ -8,11 +8,11 @@ package dokodemo import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" ) const ( @@ -159,10 +159,11 @@ var file_proxy_dokodemo_config_proto_rawDesc = []byte{ 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0e, 0x66, 0x6f, 0x6c, 0x6c, 0x6f, 0x77, 0x52, 0x65, 0x64, 0x69, 0x72, 0x65, 0x63, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x75, 0x73, 0x65, 0x72, 0x5f, 0x6c, 0x65, 0x76, 0x65, 0x6c, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x09, 0x75, 0x73, 0x65, 0x72, - 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x5c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x4c, 0x65, 0x76, 0x65, 0x6c, 0x42, 0x6c, 0x0a, 0x1d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x64, 0x6f, - 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x50, 0x01, 0x5a, 0x1d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, + 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x50, 0x01, 0x5a, 0x2d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x64, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0xaa, 0x02, 0x19, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x44, 0x6f, 0x6b, 0x6f, 0x64, 0x65, 0x6d, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/dokodemo/config.proto b/proxy/dokodemo/config.proto index 43d6992db..7b99e7674 100644 --- a/proxy/dokodemo/config.proto +++ b/proxy/dokodemo/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.dokodemo; option csharp_namespace = "V2Ray.Core.Proxy.Dokodemo"; -option go_package = "v2ray.com/core/proxy/dokodemo"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/dokodemo"; option java_package = "com.v2ray.core.proxy.dokodemo"; option java_multiple_files = true; diff --git a/proxy/dokodemo/dokodemo.go b/proxy/dokodemo/dokodemo.go index a124924e4..40766c145 100644 --- a/proxy/dokodemo/dokodemo.go +++ b/proxy/dokodemo/dokodemo.go @@ -2,25 +2,25 @@ package dokodemo -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "sync/atomic" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + 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/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/proxy/dokodemo/errors.generated.go b/proxy/dokodemo/errors.generated.go index 23562ab49..587d4194a 100644 --- a/proxy/dokodemo/errors.generated.go +++ b/proxy/dokodemo/errors.generated.go @@ -1,6 +1,6 @@ package dokodemo -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/freedom/config.pb.go b/proxy/freedom/config.pb.go index 26a811683..32b751671 100644 --- a/proxy/freedom/config.pb.go +++ b/proxy/freedom/config.pb.go @@ -8,11 +8,11 @@ package freedom import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -232,10 +232,11 @@ var file_proxy_freedom_config_proto_rawDesc = []byte{ 0x69, 0x6e, 0x53, 0x74, 0x72, 0x61, 0x74, 0x65, 0x67, 0x79, 0x12, 0x09, 0x0a, 0x05, 0x41, 0x53, 0x5f, 0x49, 0x53, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x34, 0x10, 0x02, 0x12, 0x0b, - 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x03, 0x42, 0x59, 0x0a, 0x1c, 0x63, + 0x0a, 0x07, 0x55, 0x53, 0x45, 0x5f, 0x49, 0x50, 0x36, 0x10, 0x03, 0x42, 0x69, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x1c, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x50, 0x01, 0x5a, 0x2c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x66, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x46, 0x72, 0x65, 0x65, 0x64, 0x6f, 0x6d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/freedom/config.proto b/proxy/freedom/config.proto index 1fcc80c4e..df167bbd8 100644 --- a/proxy/freedom/config.proto +++ b/proxy/freedom/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.freedom; option csharp_namespace = "V2Ray.Core.Proxy.Freedom"; -option go_package = "v2ray.com/core/proxy/freedom"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/freedom"; option java_package = "com.v2ray.core.proxy.freedom"; option java_multiple_files = true; diff --git a/proxy/freedom/errors.generated.go b/proxy/freedom/errors.generated.go index b4ca934ce..359d2ce3a 100644 --- a/proxy/freedom/errors.generated.go +++ b/proxy/freedom/errors.generated.go @@ -1,6 +1,6 @@ package freedom -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/freedom/freedom.go b/proxy/freedom/freedom.go index 9a55a71b2..ee0adfeca 100644 --- a/proxy/freedom/freedom.go +++ b/proxy/freedom/freedom.go @@ -2,25 +2,25 @@ package freedom -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/dice" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/proxy/http/client.go b/proxy/http/client.go index c3481633a..ae0085f37 100644 --- a/proxy/http/client.go +++ b/proxy/http/client.go @@ -12,20 +12,21 @@ import ( "sync" "golang.org/x/net/http2" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/bytespool" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + + 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/bytespool" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) type Client struct { diff --git a/proxy/http/config.go b/proxy/http/config.go index 7e8da149d..0a25993dc 100644 --- a/proxy/http/config.go +++ b/proxy/http/config.go @@ -1,7 +1,7 @@ package http import ( - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) func (a *Account) Equals(another protocol.Account) bool { diff --git a/proxy/http/config.pb.go b/proxy/http/config.pb.go index 81d57f3f1..82c049282 100644 --- a/proxy/http/config.pb.go +++ b/proxy/http/config.pb.go @@ -8,11 +8,11 @@ package http import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -238,9 +238,10 @@ var file_proxy_http_config_proto_rawDesc = []byte{ 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, - 0x72, 0x42, 0x50, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x72, 0x42, 0x60, 0x0a, 0x19, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, - 0x5a, 0x19, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x5a, 0x29, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, + 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x15, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/http/config.proto b/proxy/http/config.proto index 4ad274f51..0456e8eb4 100644 --- a/proxy/http/config.proto +++ b/proxy/http/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.http; option csharp_namespace = "V2Ray.Core.Proxy.Http"; -option go_package = "v2ray.com/core/proxy/http"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/http"; option java_package = "com.v2ray.core.proxy.http"; option java_multiple_files = true; diff --git a/proxy/http/errors.generated.go b/proxy/http/errors.generated.go index 9c6e8e4cb..bbaec46a4 100644 --- a/proxy/http/errors.generated.go +++ b/proxy/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/http/http.go b/proxy/http/http.go index f2305b871..0ef5118f0 100644 --- a/proxy/http/http.go +++ b/proxy/http/http.go @@ -1,3 +1,3 @@ package http -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/proxy/http/server.go b/proxy/http/server.go index 7bc9de6b3..dc4b9ece4 100644 --- a/proxy/http/server.go +++ b/proxy/http/server.go @@ -11,20 +11,20 @@ import ( "strings" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - http_proto "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + 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/errors" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + http_proto "github.com/v2fly/v2ray-core/v4/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Server is an HTTP proxy server. diff --git a/proxy/mtproto/auth.go b/proxy/mtproto/auth.go index 2c025ea7e..707f7f606 100644 --- a/proxy/mtproto/auth.go +++ b/proxy/mtproto/auth.go @@ -7,7 +7,7 @@ import ( "io" "sync" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) const ( diff --git a/proxy/mtproto/auth_test.go b/proxy/mtproto/auth_test.go index b11100824..b37de874c 100644 --- a/proxy/mtproto/auth_test.go +++ b/proxy/mtproto/auth_test.go @@ -7,8 +7,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/proxy/mtproto" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/proxy/mtproto" ) func TestInverse(t *testing.T) { diff --git a/proxy/mtproto/client.go b/proxy/mtproto/client.go index 115b668b2..bbd28451a 100644 --- a/proxy/mtproto/client.go +++ b/proxy/mtproto/client.go @@ -3,14 +3,14 @@ package mtproto import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/common/task" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type Client struct { diff --git a/proxy/mtproto/config.go b/proxy/mtproto/config.go index 52d214c0f..d536cc43b 100644 --- a/proxy/mtproto/config.go +++ b/proxy/mtproto/config.go @@ -1,7 +1,7 @@ package mtproto import ( - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) func (a *Account) Equals(another protocol.Account) bool { diff --git a/proxy/mtproto/config.pb.go b/proxy/mtproto/config.pb.go index 6d2c9ca61..dc281dcef 100644 --- a/proxy/mtproto/config.pb.go +++ b/proxy/mtproto/config.pb.go @@ -8,11 +8,11 @@ package mtproto import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -176,10 +176,11 @@ var file_proxy_mtproto_config_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x20, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x04, 0x75, 0x73, 0x65, 0x72, 0x22, 0x0e, 0x0a, 0x0c, 0x43, - 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x59, 0x0a, 0x1c, 0x63, + 0x6c, 0x69, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x69, 0x0a, 0x1c, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, - 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x1c, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, + 0x6f, 0x78, 0x79, 0x2e, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x2c, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x6d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0xaa, 0x02, 0x18, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x4d, 0x74, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/mtproto/config.proto b/proxy/mtproto/config.proto index 1eba68708..44129c391 100644 --- a/proxy/mtproto/config.proto +++ b/proxy/mtproto/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.mtproto; option csharp_namespace = "V2Ray.Core.Proxy.Mtproto"; -option go_package = "v2ray.com/core/proxy/mtproto"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/mtproto"; option java_package = "com.v2ray.core.proxy.mtproto"; option java_multiple_files = true; diff --git a/proxy/mtproto/errors.generated.go b/proxy/mtproto/errors.generated.go index 52352d709..fa5d45524 100644 --- a/proxy/mtproto/errors.generated.go +++ b/proxy/mtproto/errors.generated.go @@ -1,6 +1,6 @@ package mtproto -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/mtproto/mtproto.go b/proxy/mtproto/mtproto.go index c89a224a3..f581358a7 100644 --- a/proxy/mtproto/mtproto.go +++ b/proxy/mtproto/mtproto.go @@ -1,3 +1,3 @@ package mtproto -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/proxy/mtproto/server.go b/proxy/mtproto/server.go index 079e453b5..8a3b7161b 100644 --- a/proxy/mtproto/server.go +++ b/proxy/mtproto/server.go @@ -7,18 +7,18 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" + 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/crypto" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) var ( diff --git a/proxy/proxy.go b/proxy/proxy.go index f4bd6b514..a22c637f8 100644 --- a/proxy/proxy.go +++ b/proxy/proxy.go @@ -8,11 +8,11 @@ package proxy import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // An Inbound processes inbound connections. diff --git a/proxy/shadowsocks/client.go b/proxy/shadowsocks/client.go index 04b7c723d..04f51b0d4 100644 --- a/proxy/shadowsocks/client.go +++ b/proxy/shadowsocks/client.go @@ -5,18 +5,18 @@ package shadowsocks import ( "context" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Client is a inbound handler for Shadowsocks protocol diff --git a/proxy/shadowsocks/config.go b/proxy/shadowsocks/config.go index cc60cb1fb..dad16d952 100644 --- a/proxy/shadowsocks/config.go +++ b/proxy/shadowsocks/config.go @@ -11,10 +11,10 @@ import ( "golang.org/x/crypto/chacha20poly1305" "golang.org/x/crypto/hkdf" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) // MemoryAccount is an account type converted from Account. diff --git a/proxy/shadowsocks/config.pb.go b/proxy/shadowsocks/config.pb.go index 83f494c42..08ed7953a 100644 --- a/proxy/shadowsocks/config.pb.go +++ b/proxy/shadowsocks/config.pb.go @@ -8,12 +8,12 @@ package shadowsocks import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -293,10 +293,11 @@ var file_proxy_shadowsocks_config_proto_rawDesc = []byte{ 0x0f, 0x0a, 0x0b, 0x41, 0x45, 0x53, 0x5f, 0x32, 0x35, 0x36, 0x5f, 0x47, 0x43, 0x4d, 0x10, 0x02, 0x12, 0x15, 0x0a, 0x11, 0x43, 0x48, 0x41, 0x43, 0x48, 0x41, 0x32, 0x30, 0x5f, 0x50, 0x4f, 0x4c, 0x59, 0x31, 0x33, 0x30, 0x35, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x4e, 0x4f, 0x4e, 0x45, 0x10, - 0x04, 0x42, 0x65, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, + 0x04, 0x42, 0x75, 0x0a, 0x20, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, - 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x20, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, + 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x30, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, 0x1c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x68, 0x61, 0x64, 0x6f, 0x77, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/shadowsocks/config.proto b/proxy/shadowsocks/config.proto index 2a11bdfb9..fcee27018 100644 --- a/proxy/shadowsocks/config.proto +++ b/proxy/shadowsocks/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.shadowsocks; option csharp_namespace = "V2Ray.Core.Proxy.Shadowsocks"; -option go_package = "v2ray.com/core/proxy/shadowsocks"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"; option java_package = "com.v2ray.core.proxy.shadowsocks"; option java_multiple_files = true; diff --git a/proxy/shadowsocks/config_test.go b/proxy/shadowsocks/config_test.go index 57131ad5a..8befa6684 100644 --- a/proxy/shadowsocks/config_test.go +++ b/proxy/shadowsocks/config_test.go @@ -6,9 +6,9 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/proxy/shadowsocks" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" ) func TestAEADCipherUDP(t *testing.T) { diff --git a/proxy/shadowsocks/errors.generated.go b/proxy/shadowsocks/errors.generated.go index 42d6d3fe8..e7456a1c0 100644 --- a/proxy/shadowsocks/errors.generated.go +++ b/proxy/shadowsocks/errors.generated.go @@ -1,6 +1,6 @@ package shadowsocks -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/shadowsocks/protocol.go b/proxy/shadowsocks/protocol.go index 63f807605..325c0b0ef 100644 --- a/proxy/shadowsocks/protocol.go +++ b/proxy/shadowsocks/protocol.go @@ -10,11 +10,11 @@ import ( "io" "io/ioutil" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) const ( diff --git a/proxy/shadowsocks/protocol_test.go b/proxy/shadowsocks/protocol_test.go index de9f604f6..3db64e88c 100644 --- a/proxy/shadowsocks/protocol_test.go +++ b/proxy/shadowsocks/protocol_test.go @@ -5,11 +5,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/proxy/shadowsocks" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + . "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" ) func toAccount(a *Account) protocol.Account { diff --git a/proxy/shadowsocks/server.go b/proxy/shadowsocks/server.go index fdfa1d9fa..86905c1cd 100644 --- a/proxy/shadowsocks/server.go +++ b/proxy/shadowsocks/server.go @@ -6,20 +6,20 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/udp" + 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/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + udp_proto "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) type Server struct { diff --git a/proxy/shadowsocks/shadowsocks.go b/proxy/shadowsocks/shadowsocks.go index a401063bd..ef3d71767 100644 --- a/proxy/shadowsocks/shadowsocks.go +++ b/proxy/shadowsocks/shadowsocks.go @@ -5,4 +5,4 @@ // R.I.P Shadowsocks package shadowsocks -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/proxy/socks/client.go b/proxy/socks/client.go index feb6e4ae7..69b568f35 100644 --- a/proxy/socks/client.go +++ b/proxy/socks/client.go @@ -6,18 +6,18 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Client is a Socks5 client. diff --git a/proxy/socks/config.go b/proxy/socks/config.go index f9c617de8..6eadbc176 100644 --- a/proxy/socks/config.go +++ b/proxy/socks/config.go @@ -2,7 +2,7 @@ package socks -import "v2ray.com/core/common/protocol" +import "github.com/v2fly/v2ray-core/v4/common/protocol" func (a *Account) Equals(another protocol.Account) bool { if account, ok := another.(*Account); ok { diff --git a/proxy/socks/config.pb.go b/proxy/socks/config.pb.go index be333a396..5bec82e72 100644 --- a/proxy/socks/config.pb.go +++ b/proxy/socks/config.pb.go @@ -8,12 +8,12 @@ package socks import ( proto "github.com/golang/protobuf/proto" + net "github.com/v2fly/v2ray-core/v4/common/net" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - net "v2ray.com/core/common/net" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -316,10 +316,11 @@ var file_proxy_socks_config_proto_rawDesc = []byte{ 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x06, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2a, 0x25, 0x0a, 0x08, 0x41, 0x75, 0x74, 0x68, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x4e, 0x4f, 0x5f, 0x41, 0x55, 0x54, 0x48, 0x10, 0x00, 0x12, 0x0c, 0x0a, 0x08, 0x50, 0x41, 0x53, 0x53, 0x57, - 0x4f, 0x52, 0x44, 0x10, 0x01, 0x42, 0x53, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x4f, 0x52, 0x44, 0x10, 0x01, 0x42, 0x63, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x73, 0x6f, - 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, + 0x63, 0x6b, 0x73, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x73, 0x6f, 0x63, 0x6b, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x53, 0x6f, 0x63, 0x6b, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/socks/config.proto b/proxy/socks/config.proto index 873dd2b55..d9f1d5b1c 100644 --- a/proxy/socks/config.proto +++ b/proxy/socks/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.socks; option csharp_namespace = "V2Ray.Core.Proxy.Socks"; -option go_package = "v2ray.com/core/proxy/socks"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/socks"; option java_package = "com.v2ray.core.proxy.socks"; option java_multiple_files = true; diff --git a/proxy/socks/errors.generated.go b/proxy/socks/errors.generated.go index a4886798c..d7fb17c0d 100644 --- a/proxy/socks/errors.generated.go +++ b/proxy/socks/errors.generated.go @@ -1,6 +1,6 @@ package socks -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/socks/protocol.go b/proxy/socks/protocol.go index 39d21bc45..66d10d16b 100644 --- a/proxy/socks/protocol.go +++ b/proxy/socks/protocol.go @@ -6,10 +6,10 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) const ( diff --git a/proxy/socks/protocol_test.go b/proxy/socks/protocol_test.go index 40aca93fb..7a9d9f280 100644 --- a/proxy/socks/protocol_test.go +++ b/proxy/socks/protocol_test.go @@ -6,11 +6,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/proxy/socks" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + . "github.com/v2fly/v2ray-core/v4/proxy/socks" ) func TestUDPEncoding(t *testing.T) { diff --git a/proxy/socks/server.go b/proxy/socks/server.go index b398c8457..9c45219c5 100644 --- a/proxy/socks/server.go +++ b/proxy/socks/server.go @@ -7,21 +7,21 @@ import ( "io" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/udp" + 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/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + udp_proto "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) // Server is a SOCKS 5 proxy server diff --git a/proxy/socks/socks.go b/proxy/socks/socks.go index d3be1059f..ec2a3de5f 100644 --- a/proxy/socks/socks.go +++ b/proxy/socks/socks.go @@ -1,4 +1,4 @@ // Package socks provides implements of Socks protocol 4, 4a and 5. package socks -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/proxy/trojan/client.go b/proxy/trojan/client.go index b97461761..8be3b93f2 100644 --- a/proxy/trojan/client.go +++ b/proxy/trojan/client.go @@ -6,18 +6,18 @@ import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Client is a inbound handler for trojan protocol diff --git a/proxy/trojan/config.go b/proxy/trojan/config.go index 03a666c88..e0859c16e 100644 --- a/proxy/trojan/config.go +++ b/proxy/trojan/config.go @@ -5,8 +5,8 @@ import ( "encoding/hex" "fmt" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) // MemoryAccount is an account type converted from Account. diff --git a/proxy/trojan/config.pb.go b/proxy/trojan/config.pb.go index b80cf3b83..ca51b2122 100644 --- a/proxy/trojan/config.pb.go +++ b/proxy/trojan/config.pb.go @@ -8,11 +8,11 @@ package trojan import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -287,10 +287,11 @@ var file_proxy_trojan_config_proto_rawDesc = []byte{ 0x61, 0x63, 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x09, 0x66, - 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x56, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, + 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x66, 0x0a, 0x1b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, - 0x2e, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x1b, 0x76, 0x32, 0x72, 0x61, 0x79, - 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, + 0x2e, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x50, 0x01, 0x5a, 0x2b, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x74, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0xaa, 0x02, 0x17, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x54, 0x72, 0x6f, 0x6a, 0x61, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/trojan/config.proto b/proxy/trojan/config.proto index cfac0b0e8..2fdd3d1ac 100644 --- a/proxy/trojan/config.proto +++ b/proxy/trojan/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.trojan; option csharp_namespace = "V2Ray.Core.Proxy.Trojan"; -option go_package = "v2ray.com/core/proxy/trojan"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/trojan"; option java_package = "com.v2ray.core.proxy.trojan"; option java_multiple_files = true; diff --git a/proxy/trojan/errors.generated.go b/proxy/trojan/errors.generated.go index d15be699e..e033f3c73 100644 --- a/proxy/trojan/errors.generated.go +++ b/proxy/trojan/errors.generated.go @@ -1,6 +1,6 @@ package trojan -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/trojan/protocol.go b/proxy/trojan/protocol.go index 3b21975d5..b5bdb0882 100644 --- a/proxy/trojan/protocol.go +++ b/proxy/trojan/protocol.go @@ -4,9 +4,9 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) var ( diff --git a/proxy/trojan/protocol_test.go b/proxy/trojan/protocol_test.go index c30eabef6..dbc2861d2 100644 --- a/proxy/trojan/protocol_test.go +++ b/proxy/trojan/protocol_test.go @@ -4,11 +4,12 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - . "v2ray.com/core/proxy/trojan" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + . "github.com/v2fly/v2ray-core/v4/proxy/trojan" ) func toAccount(a *Account) protocol.Account { @@ -19,7 +20,7 @@ func toAccount(a *Account) protocol.Account { func TestTCPRequest(t *testing.T) { user := &protocol.MemoryUser{ - Email: "love@v2ray.com", + Email: "love@v2fly.org", Account: toAccount(&Account{ Password: "password", }), @@ -51,7 +52,7 @@ func TestTCPRequest(t *testing.T) { func TestUDPRequest(t *testing.T) { user := &protocol.MemoryUser{ - Email: "love@v2ray.com", + Email: "love@v2fly.org", Account: toAccount(&Account{ Password: "password", }), diff --git a/proxy/trojan/server.go b/proxy/trojan/server.go index 2e3fff740..eae605c19 100644 --- a/proxy/trojan/server.go +++ b/proxy/trojan/server.go @@ -9,22 +9,22 @@ import ( "strconv" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - udp_proto "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/udp" + 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/errors" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + udp_proto "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) func init() { diff --git a/proxy/trojan/validator.go b/proxy/trojan/validator.go index f26f081e9..668d2d7af 100644 --- a/proxy/trojan/validator.go +++ b/proxy/trojan/validator.go @@ -6,7 +6,7 @@ import ( "strings" "sync" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) // Validator stores valid trojan users. diff --git a/proxy/vless/account.go b/proxy/vless/account.go index 54e7622e1..a593fdcaa 100644 --- a/proxy/vless/account.go +++ b/proxy/vless/account.go @@ -3,8 +3,8 @@ package vless import ( - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) // AsAccount implements protocol.Account.AsAccount(). diff --git a/proxy/vless/account.pb.go b/proxy/vless/account.pb.go index 03159cd67..b5b4fd012 100644 --- a/proxy/vless/account.pb.go +++ b/proxy/vless/account.pb.go @@ -102,10 +102,11 @@ var file_proxy_vless_account_proto_rawDesc = []byte{ 0x0a, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x66, 0x6c, 0x6f, 0x77, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x42, 0x53, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x6f, 0x6e, 0x42, 0x63, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, - 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0xaa, 0x02, + 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } diff --git a/proxy/vless/account.proto b/proxy/vless/account.proto index 64bbdf057..bbe743a0d 100644 --- a/proxy/vless/account.proto +++ b/proxy/vless/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless; option csharp_namespace = "V2Ray.Core.Proxy.Vless"; -option go_package = "v2ray.com/core/proxy/vless"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vless"; option java_package = "com.v2ray.core.proxy.vless"; option java_multiple_files = true; diff --git a/proxy/vless/encoding/addons.go b/proxy/vless/encoding/addons.go index 6eb9cbbaa..59bbd36ab 100644 --- a/proxy/vless/encoding/addons.go +++ b/proxy/vless/encoding/addons.go @@ -6,9 +6,10 @@ import ( "io" "github.com/golang/protobuf/proto" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/protocol" + + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) // EncodeHeaderAddons Add addons byte to the header diff --git a/proxy/vless/encoding/addons.pb.go b/proxy/vless/encoding/addons.pb.go index 81b4997da..4c43b8836 100644 --- a/proxy/vless/encoding/addons.pb.go +++ b/proxy/vless/encoding/addons.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-gogo. DO NOT EDIT. // source: proxy/vless/encoding/addons.proto -package encoding // import "v2ray.com/core/proxy/vless/encoding" +package encoding // import "github.com/v2fly/v2ray-core/v4/proxy/vless/encoding" import proto "github.com/golang/protobuf/proto" import fmt "fmt" @@ -32,7 +32,7 @@ func (m *Addons) Reset() { *m = Addons{} } func (m *Addons) String() string { return proto.CompactTextString(m) } func (*Addons) ProtoMessage() {} func (*Addons) Descriptor() ([]byte, []int) { - return fileDescriptor_addons_715144385dbf650f, []int{0} + return fileDescriptor_addons_1ad3567c97081da7, []int{0} } func (m *Addons) XXX_Unmarshal(b []byte) error { return m.Unmarshal(b) @@ -367,21 +367,22 @@ var ( ) func init() { - proto.RegisterFile("proxy/vless/encoding/addons.proto", fileDescriptor_addons_715144385dbf650f) + proto.RegisterFile("proxy/vless/encoding/addons.proto", fileDescriptor_addons_1ad3567c97081da7) } -var fileDescriptor_addons_715144385dbf650f = []byte{ - // 186 bytes of a gzipped FileDescriptorProto +var fileDescriptor_addons_1ad3567c97081da7 = []byte{ + // 206 bytes of a gzipped FileDescriptorProto 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x52, 0x2c, 0x28, 0xca, 0xaf, 0xa8, 0xd4, 0x2f, 0xcb, 0x49, 0x2d, 0x2e, 0xd6, 0x4f, 0xcd, 0x4b, 0xce, 0x4f, 0xc9, 0xcc, 0x4b, 0xd7, 0x4f, 0x4c, 0x49, 0xc9, 0xcf, 0x2b, 0xd6, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0x92, 0x2f, 0x33, 0x2a, 0x4a, 0xac, 0xd4, 0x4b, 0xce, 0x2f, 0x4a, 0xd5, 0x03, 0xab, 0xd6, 0x03, 0xab, 0xd6, 0x83, 0xa9, 0x56, 0x32, 0xe0, 0x62, 0x73, 0x04, 0x6b, 0x10, 0x12, 0xe2, 0x62, 0x71, 0xcb, 0xc9, 0x2f, 0x97, 0x60, 0x54, 0x60, 0xd4, 0xe0, 0x0c, 0x02, 0xb3, 0x41, 0x62, 0xc1, 0xa9, 0xa9, 0x29, - 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x60, 0xb6, 0x53, 0xdd, 0x89, 0x47, 0x72, 0x8c, 0x17, - 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x72, 0x72, 0x7e, - 0xae, 0x1e, 0x01, 0x8b, 0x02, 0x18, 0xa3, 0x94, 0x61, 0x4a, 0x72, 0xf5, 0x41, 0xca, 0xf4, 0xb1, - 0xb9, 0x7e, 0x15, 0x93, 0x7c, 0x98, 0x51, 0x50, 0x62, 0xa5, 0x9e, 0x33, 0xc8, 0xa0, 0x00, 0xb0, - 0x41, 0x61, 0x60, 0x83, 0x5c, 0xa1, 0x2a, 0x92, 0xd8, 0xc0, 0x3e, 0x33, 0x06, 0x04, 0x00, 0x00, - 0xff, 0xff, 0x36, 0x32, 0x14, 0x7c, 0xfe, 0x00, 0x00, 0x00, + 0x12, 0x4c, 0x0a, 0x8c, 0x1a, 0x3c, 0x41, 0x60, 0xb6, 0x53, 0x1f, 0xe3, 0x89, 0x47, 0x72, 0x8c, + 0x17, 0x1e, 0xc9, 0x31, 0x3e, 0x78, 0x24, 0xc7, 0x38, 0xe3, 0xb1, 0x1c, 0x03, 0x97, 0x72, 0x72, + 0x7e, 0xae, 0x1e, 0x01, 0x9b, 0x02, 0x18, 0xa3, 0x8c, 0xd3, 0x33, 0x4b, 0x32, 0x4a, 0x93, 0xf4, + 0x92, 0xf3, 0x73, 0xf5, 0xcb, 0x8c, 0xd2, 0x72, 0x2a, 0xf5, 0xc1, 0x7a, 0x74, 0x41, 0x7a, 0xf4, + 0xcb, 0x4c, 0xf4, 0xb1, 0x79, 0x67, 0x15, 0x93, 0x7c, 0x98, 0x51, 0x50, 0x62, 0xa5, 0x9e, 0x33, + 0xc8, 0xe0, 0x00, 0xb0, 0xc1, 0x61, 0x60, 0x83, 0x5d, 0xa1, 0x2a, 0x92, 0xd8, 0xc0, 0x5e, 0x35, + 0x06, 0x04, 0x00, 0x00, 0xff, 0xff, 0xb8, 0x1d, 0xb4, 0x93, 0x0f, 0x01, 0x00, 0x00, } diff --git a/proxy/vless/encoding/addons.proto b/proxy/vless/encoding/addons.proto index cacd00d66..2db7d5def 100644 --- a/proxy/vless/encoding/addons.proto +++ b/proxy/vless/encoding/addons.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless.encoding; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Encoding"; -option go_package = "v2ray.com/core/proxy/vless/encoding"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vless/encoding"; option java_package = "com.v2ray.core.proxy.vless.encoding"; option java_multiple_files = true; diff --git a/proxy/vless/encoding/encoding.go b/proxy/vless/encoding/encoding.go index 81a8d512a..492eb8235 100644 --- a/proxy/vless/encoding/encoding.go +++ b/proxy/vless/encoding/encoding.go @@ -2,15 +2,15 @@ package encoding -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/proxy/vless" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/proxy/vless" ) const ( diff --git a/proxy/vless/encoding/encoding_test.go b/proxy/vless/encoding/encoding_test.go index 496112af5..8b93afa4c 100644 --- a/proxy/vless/encoding/encoding_test.go +++ b/proxy/vless/encoding/encoding_test.go @@ -4,13 +4,14 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/vless" - . "v2ray.com/core/proxy/vless/encoding" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/vless" + . "github.com/v2fly/v2ray-core/v4/proxy/vless/encoding" ) func toAccount(a *vless.Account) protocol.Account { diff --git a/proxy/vless/encoding/errors.generated.go b/proxy/vless/encoding/errors.generated.go index 6fb682106..00ebc85f0 100644 --- a/proxy/vless/encoding/errors.generated.go +++ b/proxy/vless/encoding/errors.generated.go @@ -1,6 +1,6 @@ package encoding -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vless/errors.generated.go b/proxy/vless/errors.generated.go index 79734c109..dc7869716 100644 --- a/proxy/vless/errors.generated.go +++ b/proxy/vless/errors.generated.go @@ -1,6 +1,6 @@ package vless -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vless/inbound/config.pb.go b/proxy/vless/inbound/config.pb.go index f0dc2dee6..90114b361 100644 --- a/proxy/vless/inbound/config.pb.go +++ b/proxy/vless/inbound/config.pb.go @@ -8,11 +8,11 @@ package inbound import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -196,11 +196,12 @@ var file_proxy_vless_inbound_config_proto_rawDesc = []byte{ 0x6b, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x28, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x2e, 0x46, 0x61, 0x6c, 0x6c, 0x62, 0x61, - 0x63, 0x6b, 0x52, 0x09, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x6b, 0x0a, + 0x63, 0x6b, 0x52, 0x09, 0x66, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x73, 0x42, 0x7b, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, - 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x22, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, + 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x32, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, + 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, + 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1e, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x49, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, diff --git a/proxy/vless/inbound/config.proto b/proxy/vless/inbound/config.proto index 21afccc96..790ce0b54 100644 --- a/proxy/vless/inbound/config.proto +++ b/proxy/vless/inbound/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless.inbound; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Inbound"; -option go_package = "v2ray.com/core/proxy/vless/inbound"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vless/inbound"; option java_package = "com.v2ray.core.proxy.vless.inbound"; option java_multiple_files = true; diff --git a/proxy/vless/inbound/errors.generated.go b/proxy/vless/inbound/errors.generated.go index 90d805b1e..91f661e21 100644 --- a/proxy/vless/inbound/errors.generated.go +++ b/proxy/vless/inbound/errors.generated.go @@ -1,6 +1,6 @@ package inbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vless/inbound/inbound.go b/proxy/vless/inbound/inbound.go index d293c5ce3..e89453671 100644 --- a/proxy/vless/inbound/inbound.go +++ b/proxy/vless/inbound/inbound.go @@ -2,7 +2,7 @@ package inbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" @@ -10,25 +10,25 @@ import ( "strconv" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/dns" - feature_inbound "v2ray.com/core/features/inbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/proxy/vless" - "v2ray.com/core/proxy/vless/encoding" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + 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/errors" + "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/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/dns" + feature_inbound "github.com/v2fly/v2ray-core/v4/features/inbound" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/proxy/vless" + "github.com/v2fly/v2ray-core/v4/proxy/vless/encoding" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) func init() { diff --git a/proxy/vless/outbound/config.pb.go b/proxy/vless/outbound/config.pb.go index 469989e93..0ac30103a 100644 --- a/proxy/vless/outbound/config.pb.go +++ b/proxy/vless/outbound/config.pb.go @@ -8,11 +8,11 @@ package outbound import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -87,10 +87,11 @@ var file_proxy_vless_outbound_config_proto_rawDesc = []byte{ 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, 0x05, 0x76, 0x6e, - 0x65, 0x78, 0x74, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x65, 0x78, 0x74, 0x42, 0x7e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6c, 0x65, 0x73, - 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, + 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6c, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6c, 0x65, 0x73, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, diff --git a/proxy/vless/outbound/config.proto b/proxy/vless/outbound/config.proto index 3604b72d5..ba53a2d9e 100644 --- a/proxy/vless/outbound/config.proto +++ b/proxy/vless/outbound/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vless.outbound; option csharp_namespace = "V2Ray.Core.Proxy.Vless.Outbound"; -option go_package = "v2ray.com/core/proxy/vless/outbound"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vless/outbound"; option java_package = "com.v2ray.core.proxy.vless.outbound"; option java_multiple_files = true; diff --git a/proxy/vless/outbound/errors.generated.go b/proxy/vless/outbound/errors.generated.go index 37e984d87..1d0f494bd 100644 --- a/proxy/vless/outbound/errors.generated.go +++ b/proxy/vless/outbound/errors.generated.go @@ -1,6 +1,6 @@ package outbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vless/outbound/outbound.go b/proxy/vless/outbound/outbound.go index aee8f1c28..7531a558e 100644 --- a/proxy/vless/outbound/outbound.go +++ b/proxy/vless/outbound/outbound.go @@ -2,26 +2,26 @@ package outbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/proxy/vless" - "v2ray.com/core/proxy/vless/encoding" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/proxy/vless" + "github.com/v2fly/v2ray-core/v4/proxy/vless/encoding" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/proxy/vless/validator.go b/proxy/vless/validator.go index ac3dc4f15..3fcf6df96 100644 --- a/proxy/vless/validator.go +++ b/proxy/vless/validator.go @@ -6,8 +6,8 @@ import ( "strings" "sync" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) // Validator stores valid VLESS users. diff --git a/proxy/vless/vless.go b/proxy/vless/vless.go index b122b5754..5decff436 100644 --- a/proxy/vless/vless.go +++ b/proxy/vless/vless.go @@ -5,4 +5,4 @@ // clients with 'socks' for proxying. package vless -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/proxy/vmess/account.go b/proxy/vmess/account.go index eff55debb..6da196737 100644 --- a/proxy/vmess/account.go +++ b/proxy/vmess/account.go @@ -3,9 +3,9 @@ package vmess import ( - "v2ray.com/core/common/dice" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) // MemoryAccount is an in-memory form of VMess account. diff --git a/proxy/vmess/account.pb.go b/proxy/vmess/account.pb.go index 26420a8bb..e0fc50462 100644 --- a/proxy/vmess/account.pb.go +++ b/proxy/vmess/account.pb.go @@ -8,11 +8,11 @@ package vmess import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -121,10 +121,11 @@ var file_proxy_vmess_account_proto_rawDesc = []byte{ 0x52, 0x10, 0x73, 0x65, 0x63, 0x75, 0x72, 0x69, 0x74, 0x79, 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x12, 0x23, 0x0a, 0x0d, 0x74, 0x65, 0x73, 0x74, 0x73, 0x5f, 0x65, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x74, 0x65, 0x73, 0x74, 0x73, - 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x53, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, + 0x45, 0x6e, 0x61, 0x62, 0x6c, 0x65, 0x64, 0x42, 0x63, 0x0a, 0x1a, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, - 0x76, 0x6d, 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x1a, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, + 0x76, 0x6d, 0x65, 0x73, 0x73, 0x50, 0x01, 0x5a, 0x2a, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0xaa, 0x02, 0x16, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/proxy/vmess/account.proto b/proxy/vmess/account.proto index 37f7562a2..335c61b59 100644 --- a/proxy/vmess/account.proto +++ b/proxy/vmess/account.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vmess; option csharp_namespace = "V2Ray.Core.Proxy.Vmess"; -option go_package = "v2ray.com/core/proxy/vmess"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vmess"; option java_package = "com.v2ray.core.proxy.vmess"; option java_multiple_files = true; diff --git a/proxy/vmess/aead/authid.go b/proxy/vmess/aead/authid.go index 88e9b1bd3..60aa09959 100644 --- a/proxy/vmess/aead/authid.go +++ b/proxy/vmess/aead/authid.go @@ -12,8 +12,8 @@ import ( "math" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/antireplay" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/antireplay" ) var ( diff --git a/proxy/vmess/aead/encrypt.go b/proxy/vmess/aead/encrypt.go index 073a4ac2e..e31e52f9c 100644 --- a/proxy/vmess/aead/encrypt.go +++ b/proxy/vmess/aead/encrypt.go @@ -9,7 +9,7 @@ import ( "io" "time" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) func SealVMessAEADHeader(key [16]byte, data []byte) []byte { diff --git a/proxy/vmess/encoding/auth.go b/proxy/vmess/encoding/auth.go index 9a9231575..d57a31be7 100644 --- a/proxy/vmess/encoding/auth.go +++ b/proxy/vmess/encoding/auth.go @@ -5,9 +5,9 @@ import ( "encoding/binary" "hash/fnv" - "v2ray.com/core/common" - "golang.org/x/crypto/sha3" + + "github.com/v2fly/v2ray-core/v4/common" ) // Authenticate authenticates a byte array using Fnv hash. diff --git a/proxy/vmess/encoding/auth_test.go b/proxy/vmess/encoding/auth_test.go index ed85ebf97..f5657093f 100644 --- a/proxy/vmess/encoding/auth_test.go +++ b/proxy/vmess/encoding/auth_test.go @@ -6,8 +6,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/proxy/vmess/encoding" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/proxy/vmess/encoding" ) func TestFnvAuth(t *testing.T) { diff --git a/proxy/vmess/encoding/client.go b/proxy/vmess/encoding/client.go index 133ea2d17..97daac6e4 100644 --- a/proxy/vmess/encoding/client.go +++ b/proxy/vmess/encoding/client.go @@ -15,15 +15,15 @@ import ( "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/vmess" - vmessaead "v2ray.com/core/proxy/vmess/aead" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/bitmask" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + vmessaead "github.com/v2fly/v2ray-core/v4/proxy/vmess/aead" ) func hashTimestamp(h hash.Hash, t protocol.Timestamp) []byte { diff --git a/proxy/vmess/encoding/commands.go b/proxy/vmess/encoding/commands.go index 4b0bc4479..ea59401ef 100644 --- a/proxy/vmess/encoding/commands.go +++ b/proxy/vmess/encoding/commands.go @@ -4,12 +4,12 @@ import ( "encoding/binary" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "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/common/uuid" ) var ( diff --git a/proxy/vmess/encoding/commands_test.go b/proxy/vmess/encoding/commands_test.go index a28335218..f22a24777 100644 --- a/proxy/vmess/encoding/commands_test.go +++ b/proxy/vmess/encoding/commands_test.go @@ -5,11 +5,11 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - . "v2ray.com/core/proxy/vmess/encoding" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" + . "github.com/v2fly/v2ray-core/v4/proxy/vmess/encoding" ) func TestSwitchAccount(t *testing.T) { diff --git a/proxy/vmess/encoding/encoding.go b/proxy/vmess/encoding/encoding.go index bd601e3ae..2d2b475bf 100644 --- a/proxy/vmess/encoding/encoding.go +++ b/proxy/vmess/encoding/encoding.go @@ -1,11 +1,11 @@ package encoding import ( - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen const ( Version = byte(1) diff --git a/proxy/vmess/encoding/encoding_test.go b/proxy/vmess/encoding/encoding_test.go index 5abcee9dc..71579b0d0 100644 --- a/proxy/vmess/encoding/encoding_test.go +++ b/proxy/vmess/encoding/encoding_test.go @@ -6,13 +6,13 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/vmess" - . "v2ray.com/core/proxy/vmess/encoding" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + . "github.com/v2fly/v2ray-core/v4/proxy/vmess/encoding" ) func toAccount(a *vmess.Account) protocol.Account { @@ -24,7 +24,7 @@ func toAccount(a *vmess.Account) protocol.Account { func TestRequestSerialization(t *testing.T) { user := &protocol.MemoryUser{ Level: 0, - Email: "test@v2ray.com", + Email: "test@v2fly.org", } id := uuid.New() account := &vmess.Account{ @@ -37,7 +37,7 @@ func TestRequestSerialization(t *testing.T) { Version: 1, User: user, Command: protocol.RequestCommandTCP, - Address: net.DomainAddress("www.v2ray.com"), + Address: net.DomainAddress("www.v2fly.org"), Port: net.Port(443), Security: protocol.SecurityType_AES128_GCM, } @@ -74,7 +74,7 @@ func TestRequestSerialization(t *testing.T) { func TestInvalidRequest(t *testing.T) { user := &protocol.MemoryUser{ Level: 0, - Email: "test@v2ray.com", + Email: "test@v2fly.org", } id := uuid.New() account := &vmess.Account{ @@ -87,7 +87,7 @@ func TestInvalidRequest(t *testing.T) { Version: 1, User: user, Command: protocol.RequestCommand(100), - Address: net.DomainAddress("www.v2ray.com"), + Address: net.DomainAddress("www.v2fly.org"), Port: net.Port(443), Security: protocol.SecurityType_AES128_GCM, } @@ -116,7 +116,7 @@ func TestInvalidRequest(t *testing.T) { func TestMuxRequest(t *testing.T) { user := &protocol.MemoryUser{ Level: 0, - Email: "test@v2ray.com", + Email: "test@v2fly.org", } id := uuid.New() account := &vmess.Account{ diff --git a/proxy/vmess/encoding/errors.generated.go b/proxy/vmess/encoding/errors.generated.go index 6fb682106..00ebc85f0 100644 --- a/proxy/vmess/encoding/errors.generated.go +++ b/proxy/vmess/encoding/errors.generated.go @@ -1,6 +1,6 @@ package encoding -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/encoding/server.go b/proxy/vmess/encoding/server.go index 264dcf12b..b38d650cf 100644 --- a/proxy/vmess/encoding/server.go +++ b/proxy/vmess/encoding/server.go @@ -14,16 +14,17 @@ import ( "time" "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/bitmask" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/crypto" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy/vmess" - vmessaead "v2ray.com/core/proxy/vmess/aead" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/bitmask" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/crypto" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + vmessaead "github.com/v2fly/v2ray-core/v4/proxy/vmess/aead" ) type sessionID struct { diff --git a/proxy/vmess/errors.generated.go b/proxy/vmess/errors.generated.go index cc044be3d..6572e81c3 100644 --- a/proxy/vmess/errors.generated.go +++ b/proxy/vmess/errors.generated.go @@ -1,6 +1,6 @@ package vmess -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/inbound/config.pb.go b/proxy/vmess/inbound/config.pb.go index 05ae118db..186e3bafd 100644 --- a/proxy/vmess/inbound/config.pb.go +++ b/proxy/vmess/inbound/config.pb.go @@ -8,11 +8,11 @@ package inbound import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -230,10 +230,11 @@ var file_proxy_vmess_inbound_config_proto_rawDesc = []byte{ 0x12, 0x34, 0x0a, 0x16, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x65, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x6e, 0x6c, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x14, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, - 0x6f, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x6b, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, + 0x6f, 0x6e, 0x4f, 0x6e, 0x6c, 0x79, 0x42, 0x7b, 0x0a, 0x22, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, - 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x22, - 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x70, + 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x50, 0x01, 0x5a, 0x32, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, + 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x69, 0x6e, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1e, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x49, 0x6e, 0x62, 0x6f, diff --git a/proxy/vmess/inbound/config.proto b/proxy/vmess/inbound/config.proto index f4edd7a4c..9e73d7d77 100644 --- a/proxy/vmess/inbound/config.proto +++ b/proxy/vmess/inbound/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vmess.inbound; option csharp_namespace = "V2Ray.Core.Proxy.Vmess.Inbound"; -option go_package = "v2ray.com/core/proxy/vmess/inbound"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"; option java_package = "com.v2ray.core.proxy.vmess.inbound"; option java_multiple_files = true; diff --git a/proxy/vmess/inbound/errors.generated.go b/proxy/vmess/inbound/errors.generated.go index 90d805b1e..91f661e21 100644 --- a/proxy/vmess/inbound/errors.generated.go +++ b/proxy/vmess/inbound/errors.generated.go @@ -1,6 +1,6 @@ package inbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/inbound/inbound.go b/proxy/vmess/inbound/inbound.go index c5b32784c..d2084b25c 100644 --- a/proxy/vmess/inbound/inbound.go +++ b/proxy/vmess/inbound/inbound.go @@ -2,7 +2,7 @@ package inbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" @@ -11,24 +11,24 @@ import ( "sync" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/common/uuid" - feature_inbound "v2ray.com/core/features/inbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/encoding" - "v2ray.com/core/transport/internet" + 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/errors" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/common/uuid" + feature_inbound "github.com/v2fly/v2ray-core/v4/features/inbound" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + "github.com/v2fly/v2ray-core/v4/proxy/vmess/encoding" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type userByEmail struct { diff --git a/proxy/vmess/outbound/command.go b/proxy/vmess/outbound/command.go index f46983a41..638321f83 100644 --- a/proxy/vmess/outbound/command.go +++ b/proxy/vmess/outbound/command.go @@ -5,10 +5,10 @@ package outbound import ( "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/proxy/vmess" + "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/proxy/vmess" ) func (h *Handler) handleSwitchAccount(cmd *protocol.CommandSwitchAccount) { diff --git a/proxy/vmess/outbound/config.pb.go b/proxy/vmess/outbound/config.pb.go index 8d9d39330..b8f77484f 100644 --- a/proxy/vmess/outbound/config.pb.go +++ b/proxy/vmess/outbound/config.pb.go @@ -8,11 +8,11 @@ package outbound import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" ) const ( @@ -87,11 +87,12 @@ var file_proxy_vmess_outbound_config_proto_rawDesc = []byte{ 0x03, 0x28, 0x0b, 0x32, 0x2a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x2e, 0x53, 0x65, 0x72, 0x76, 0x65, 0x72, 0x45, 0x6e, 0x64, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x52, - 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x42, 0x6e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, + 0x08, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x72, 0x42, 0x7e, 0x0a, 0x23, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, - 0x50, 0x01, 0x5a, 0x23, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x6f, + 0x50, 0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, + 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, + 0x76, 0x34, 0x2f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x2f, 0x76, 0x6d, 0x65, 0x73, 0x73, 0x2f, 0x6f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0xaa, 0x02, 0x1f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x2e, 0x56, 0x6d, 0x65, 0x73, 0x73, 0x2e, 0x4f, 0x75, 0x74, 0x62, 0x6f, 0x75, 0x6e, 0x64, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, diff --git a/proxy/vmess/outbound/config.proto b/proxy/vmess/outbound/config.proto index 7cbe31a4f..788f11b5b 100644 --- a/proxy/vmess/outbound/config.proto +++ b/proxy/vmess/outbound/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.proxy.vmess.outbound; option csharp_namespace = "V2Ray.Core.Proxy.Vmess.Outbound"; -option go_package = "v2ray.com/core/proxy/vmess/outbound"; +option go_package = "github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"; option java_package = "com.v2ray.core.proxy.vmess.outbound"; option java_multiple_files = true; diff --git a/proxy/vmess/outbound/errors.generated.go b/proxy/vmess/outbound/errors.generated.go index 37e984d87..1d0f494bd 100644 --- a/proxy/vmess/outbound/errors.generated.go +++ b/proxy/vmess/outbound/errors.generated.go @@ -1,6 +1,6 @@ package outbound -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/proxy/vmess/outbound/outbound.go b/proxy/vmess/outbound/outbound.go index bb31ad758..7b48df637 100644 --- a/proxy/vmess/outbound/outbound.go +++ b/proxy/vmess/outbound/outbound.go @@ -2,27 +2,27 @@ package outbound -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "context" "time" - "v2ray.com/core" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/platform" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/task" - "v2ray.com/core/features/policy" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/encoding" - "v2ray.com/core/transport" - "v2ray.com/core/transport/internet" + 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/net" + "github.com/v2fly/v2ray-core/v4/common/platform" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + "github.com/v2fly/v2ray-core/v4/proxy/vmess/encoding" + "github.com/v2fly/v2ray-core/v4/transport" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Handler is an outbound connection handler for VMess protocol. diff --git a/proxy/vmess/validator.go b/proxy/vmess/validator.go index 9f21f5974..65eaf3f25 100644 --- a/proxy/vmess/validator.go +++ b/proxy/vmess/validator.go @@ -11,12 +11,12 @@ import ( "sync/atomic" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/task" - "v2ray.com/core/proxy/vmess/aead" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/proxy/vmess/aead" ) const ( diff --git a/proxy/vmess/validator_test.go b/proxy/vmess/validator_test.go index 25c1cf6ab..4a9d0cc15 100644 --- a/proxy/vmess/validator_test.go +++ b/proxy/vmess/validator_test.go @@ -4,11 +4,11 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - . "v2ray.com/core/proxy/vmess" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/uuid" + . "github.com/v2fly/v2ray-core/v4/proxy/vmess" ) func toAccount(a *Account) protocol.Account { diff --git a/proxy/vmess/vmess.go b/proxy/vmess/vmess.go index 6ffb6d46d..d7cf8ae39 100644 --- a/proxy/vmess/vmess.go +++ b/proxy/vmess/vmess.go @@ -5,4 +5,4 @@ // clients with 'socks' for proxying. package vmess -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/release/config/config.json b/release/config/config.json index 721727722..d6dd70ab4 100644 --- a/release/config/config.json +++ b/release/config/config.json @@ -1,6 +1,6 @@ // Config file of V2Ray. This file follows standard JSON format, with comments support. // Uncomment entries below to satisfy your needs. Also read our manual for more detail at -// https://www.v2ray.com/ +// https://www.v2fly.org/ { "log": { // By default, V2Ray writes access log to stdout. @@ -83,8 +83,8 @@ "dns": { // Static hosts, similar to hosts file. "hosts": { - // Match v2ray.com to another domain on CloudFlare. This domain will be used when querying IPs for v2ray.com. - "domain:v2ray.com": "www.vicemc.net", + // Match v2fly.org to another domain on CloudFlare. This domain will be used when querying IPs for v2fly.org. + "domain:v2fly.org": "www.vicemc.net", // The following settings help to eliminate DNS poisoning in mainland China. // It is safe to comment these out if this is not the case for you. diff --git a/release/debian/control b/release/debian/control index 89a1dd063..709e088be 100644 --- a/release/debian/control +++ b/release/debian/control @@ -10,7 +10,7 @@ Homepage: https://github.com/v2fly/v2ray-core #Vcs-Browser: https://salsa.debian.org/debian/v2ray-core #Vcs-Git: https://salsa.debian.org/debian/v2ray-core.git Rules-Requires-Root: no -XS-Go-Import-Path: v2ray.com/core +XS-Go-Import-Path: github.com/v2fly/v2ray-core/v4 Package: v2ray Architecture: any diff --git a/release/debian/rules b/release/debian/rules index 489f3a53f..c6ea577af 100755 --- a/release/debian/rules +++ b/release/debian/rules @@ -16,9 +16,9 @@ override_dh_auto_clean: rm -rf vendor override_dh_auto_build: - DH_GOPKG="v2ray.com/core/main" dh_auto_build -- -ldflags "-s -w" + DH_GOPKG="github.com/v2fly/v2ray-core/v4/main" dh_auto_build -- -ldflags "-s -w" cd $(BUILDDIR); mv bin/main bin/v2ray - DH_GOPKG="v2ray.com/core/infra/control/main" dh_auto_build -- -ldflags "-s -w" -tags confonly + DH_GOPKG="github.com/v2fly/v2ray-core/v4/infra/control/main" dh_auto_build -- -ldflags "-s -w" -tags confonly cd $(BUILDDIR); mv bin/main bin/v2ctl override_dh_auto_install: diff --git a/release/user-package.sh b/release/user-package.sh index a21f1419d..7d544f507 100755 --- a/release/user-package.sh +++ b/release/user-package.sh @@ -33,7 +33,7 @@ build_v2() { local VERSIONTAG=$(git describe --abbrev=0 --tags) fi - LDFLAGS="-s -w -buildid= -X v2ray.com/core.codename=${CODENAME} -X v2ray.com/core.build=${BUILDNAME} -X v2ray.com/core.version=${VERSIONTAG}" + LDFLAGS="-s -w -buildid= -X github.com/v2fly/v2ray-core/v4.codename=${CODENAME} -X github.com/v2fly/v2ray-core/v4.build=${BUILDNAME} -X github.com/v2fly/v2ray-core/v4.version=${VERSIONTAG}" echo ">>> Compile v2ray ..." env CGO_ENABLED=0 go build -o "$TMP"/v2ray"${EXESUFFIX}" -ldflags "$LDFLAGS" ./main diff --git a/testing/mocks/dns.go b/testing/mocks/dns.go index a1e44a24d..d488c1b65 100644 --- a/testing/mocks/dns.go +++ b/testing/mocks/dns.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: v2ray.com/core/features/dns (interfaces: Client) +// Source: github.com/v2fly/v2ray-core/v4/features/dns (interfaces: Client) // Package mocks is a generated GoMock package. package mocks diff --git a/testing/mocks/log.go b/testing/mocks/log.go index 7852389f9..3f297eb4d 100644 --- a/testing/mocks/log.go +++ b/testing/mocks/log.go @@ -1,13 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: v2ray.com/core/common/log (interfaces: Handler) +// Source: github.com/v2fly/v2ray-core/v4/common/log (interfaces: Handler) // Package mocks is a generated GoMock package. package mocks import ( gomock "github.com/golang/mock/gomock" + log "github.com/v2fly/v2ray-core/v4/common/log" reflect "reflect" - log "v2ray.com/core/common/log" ) // LogHandler is a mock of Handler interface diff --git a/testing/mocks/mux.go b/testing/mocks/mux.go index c9acace12..8d7e0032e 100644 --- a/testing/mocks/mux.go +++ b/testing/mocks/mux.go @@ -1,13 +1,13 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: v2ray.com/core/common/mux (interfaces: ClientWorkerFactory) +// Source: github.com/v2fly/v2ray-core/v4/common/mux (interfaces: ClientWorkerFactory) // Package mocks is a generated GoMock package. package mocks import ( gomock "github.com/golang/mock/gomock" + mux "github.com/v2fly/v2ray-core/v4/common/mux" reflect "reflect" - mux "v2ray.com/core/common/mux" ) // MuxClientWorkerFactory is a mock of ClientWorkerFactory interface diff --git a/testing/mocks/outbound.go b/testing/mocks/outbound.go index bcb908e4e..d892bfa0a 100644 --- a/testing/mocks/outbound.go +++ b/testing/mocks/outbound.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: v2ray.com/core/features/outbound (interfaces: Manager,HandlerSelector) +// Source: github.com/v2fly/v2ray-core/v4/features/outbound (interfaces: Manager,HandlerSelector) // Package mocks is a generated GoMock package. package mocks @@ -7,8 +7,8 @@ package mocks import ( context "context" gomock "github.com/golang/mock/gomock" + outbound "github.com/v2fly/v2ray-core/v4/features/outbound" reflect "reflect" - outbound "v2ray.com/core/features/outbound" ) // OutboundManager is a mock of Manager interface diff --git a/testing/mocks/proxy.go b/testing/mocks/proxy.go index 50672fd71..225da3599 100644 --- a/testing/mocks/proxy.go +++ b/testing/mocks/proxy.go @@ -1,5 +1,5 @@ // Code generated by MockGen. DO NOT EDIT. -// Source: v2ray.com/core/proxy (interfaces: Inbound,Outbound) +// Source: github.com/v2fly/v2ray-core/v4/proxy (interfaces: Inbound,Outbound) // Package mocks is a generated GoMock package. package mocks @@ -7,11 +7,11 @@ package mocks import ( context "context" gomock "github.com/golang/mock/gomock" + net "github.com/v2fly/v2ray-core/v4/common/net" + routing "github.com/v2fly/v2ray-core/v4/features/routing" + transport "github.com/v2fly/v2ray-core/v4/transport" + internet "github.com/v2fly/v2ray-core/v4/transport/internet" reflect "reflect" - net "v2ray.com/core/common/net" - routing "v2ray.com/core/features/routing" - transport "v2ray.com/core/transport" - internet "v2ray.com/core/transport/internet" ) // ProxyInbound is a mock of Inbound interface diff --git a/testing/scenarios/command_test.go b/testing/scenarios/command_test.go index ed67295fc..41628802f 100644 --- a/testing/scenarios/command_test.go +++ b/testing/scenarios/command_test.go @@ -11,25 +11,26 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" "google.golang.org/grpc" - "v2ray.com/core" - "v2ray.com/core/app/commander" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/proxyman/command" - "v2ray.com/core/app/router" - "v2ray.com/core/app/stats" - statscmd "v2ray.com/core/app/stats/command" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/commander" + "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/app/proxyman/command" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/app/stats" + statscmd "github.com/v2fly/v2ray-core/v4/app/stats/command" + "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/common/serial" + "github.com/v2fly/v2ray-core/v4/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestCommanderRemoveHandler(t *testing.T) { @@ -282,7 +283,7 @@ func TestCommanderAddRemoveUser(t *testing.T) { Operation: serial.ToTypedMessage( &command.AddUserOperation{ User: &protocol.User{ - Email: "test@v2ray.com", + Email: "test@v2fly.org", Account: serial.ToTypedMessage(&vmess.Account{ Id: u2.String(), AlterId: 64, @@ -301,7 +302,7 @@ func TestCommanderAddRemoveUser(t *testing.T) { resp, err = hsClient.AlterInbound(context.Background(), &command.AlterInboundRequest{ Tag: "v", - Operation: serial.ToTypedMessage(&command.RemoveUserOperation{Email: "test@v2ray.com"}), + Operation: serial.ToTypedMessage(&command.RemoveUserOperation{Email: "test@v2fly.org"}), }) common.Must(err) if resp == nil { diff --git a/testing/scenarios/common.go b/testing/scenarios/common.go index 9ae6a788b..66bf9e37f 100644 --- a/testing/scenarios/common.go +++ b/testing/scenarios/common.go @@ -14,15 +14,16 @@ import ( "time" "github.com/golang/protobuf/proto" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/retry" - "v2ray.com/core/common/serial" + + 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/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/log" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/retry" + "github.com/v2fly/v2ray-core/v4/common/serial" ) func xor(b []byte) []byte { @@ -118,7 +119,7 @@ func genTestBinaryPath() { } func GetSourcePath() string { - return filepath.Join("v2ray.com", "core", "main") + return filepath.Join("github.com", "v2fly", "v2ray-core", "v4", "main") } func CloseAllServers(servers []*exec.Cmd) { diff --git a/testing/scenarios/common_coverage.go b/testing/scenarios/common_coverage.go index ed6c7b5a3..fd60db6c2 100644 --- a/testing/scenarios/common_coverage.go +++ b/testing/scenarios/common_coverage.go @@ -7,7 +7,7 @@ import ( "os" "os/exec" - "v2ray.com/core/common/uuid" + "github.com/v2fly/v2ray-core/v4/common/uuid" ) func BuildV2Ray() error { @@ -16,7 +16,7 @@ func BuildV2Ray() error { return nil } - cmd := exec.Command("go", "test", "-tags", "coverage coveragemain", "-coverpkg", "v2ray.com/core/...", "-c", "-o", testBinaryPath, GetSourcePath()) + cmd := exec.Command("go", "test", "-tags", "coverage coveragemain", "-coverpkg", "github.com/v2fly/v2ray-core/v4/...", "-c", "-o", testBinaryPath, GetSourcePath()) return cmd.Run() } diff --git a/testing/scenarios/dns_test.go b/testing/scenarios/dns_test.go index e0ccb5548..9e79f0266 100644 --- a/testing/scenarios/dns_test.go +++ b/testing/scenarios/dns_test.go @@ -6,17 +6,18 @@ import ( "time" xproxy "golang.org/x/net/proxy" - "v2ray.com/core" - "v2ray.com/core/app/dns" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/testing/servers/tcp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/dns" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/app/router" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/proxy/socks" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestResolveIP(t *testing.T) { diff --git a/testing/scenarios/dokodemo_test.go b/testing/scenarios/dokodemo_test.go index 5031b49c4..0fcc21a06 100644 --- a/testing/scenarios/dokodemo_test.go +++ b/testing/scenarios/dokodemo_test.go @@ -5,22 +5,23 @@ import ( "time" "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) func TestDokodemoTCP(t *testing.T) { diff --git a/testing/scenarios/feature_test.go b/testing/scenarios/feature_test.go index a03593f42..2e49df3eb 100644 --- a/testing/scenarios/feature_test.go +++ b/testing/scenarios/feature_test.go @@ -9,30 +9,31 @@ import ( "time" xproxy "golang.org/x/net/proxy" - "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - _ "v2ray.com/core/app/proxyman/inbound" - _ "v2ray.com/core/app/proxyman/outbound" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - v2http "v2ray.com/core/proxy/http" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" + + 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/proxyman/inbound" + _ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound" + "github.com/v2fly/v2ray-core/v4/app/router" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + v2http "github.com/v2fly/v2ray-core/v4/proxy/http" + "github.com/v2fly/v2ray-core/v4/proxy/socks" + "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/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestPassiveConnection(t *testing.T) { diff --git a/testing/scenarios/http_test.go b/testing/scenarios/http_test.go index 06b9495a0..99af84210 100644 --- a/testing/scenarios/http_test.go +++ b/testing/scenarios/http_test.go @@ -12,16 +12,17 @@ import ( "time" "github.com/google/go-cmp/cmp" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/freedom" - v2http "v2ray.com/core/proxy/http" - v2httptest "v2ray.com/core/testing/servers/http" - "v2ray.com/core/testing/servers/tcp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + v2http "github.com/v2fly/v2ray-core/v4/proxy/http" + v2httptest "github.com/v2fly/v2ray-core/v4/testing/servers/http" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestHttpConformance(t *testing.T) { diff --git a/testing/scenarios/policy_test.go b/testing/scenarios/policy_test.go index 6b712aac5..f69b57f4e 100644 --- a/testing/scenarios/policy_test.go +++ b/testing/scenarios/policy_test.go @@ -7,22 +7,22 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func startQuickClosingTCPServer() (net.Listener, error) { diff --git a/testing/scenarios/reverse_test.go b/testing/scenarios/reverse_test.go index 4501f8b62..6da74523b 100644 --- a/testing/scenarios/reverse_test.go +++ b/testing/scenarios/reverse_test.go @@ -6,25 +6,25 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/policy" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/reverse" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/policy" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/app/reverse" + "github.com/v2fly/v2ray-core/v4/app/router" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestReverseProxy(t *testing.T) { @@ -46,7 +46,7 @@ func TestReverseProxy(t *testing.T) { PortalConfig: []*reverse.PortalConfig{ { Tag: "portal", - Domain: "test.v2ray.com", + Domain: "test.v2fly.org", }, }, }), @@ -54,7 +54,7 @@ func TestReverseProxy(t *testing.T) { Rule: []*router.RoutingRule{ { Domain: []*router.Domain{ - {Type: router.Domain_Full, Value: "test.v2ray.com"}, + {Type: router.Domain_Full, Value: "test.v2fly.org"}, }, TargetTag: &router.RoutingRule_Tag{ Tag: "portal", @@ -115,7 +115,7 @@ func TestReverseProxy(t *testing.T) { BridgeConfig: []*reverse.BridgeConfig{ { Tag: "bridge", - Domain: "test.v2ray.com", + Domain: "test.v2fly.org", }, }, }), @@ -123,7 +123,7 @@ func TestReverseProxy(t *testing.T) { Rule: []*router.RoutingRule{ { Domain: []*router.Domain{ - {Type: router.Domain_Full, Value: "test.v2ray.com"}, + {Type: router.Domain_Full, Value: "test.v2fly.org"}, }, TargetTag: &router.RoutingRule_Tag{ Tag: "reverse", @@ -231,7 +231,7 @@ func TestReverseProxyLongRunning(t *testing.T) { PortalConfig: []*reverse.PortalConfig{ { Tag: "portal", - Domain: "test.v2ray.com", + Domain: "test.v2fly.org", }, }, }), @@ -239,7 +239,7 @@ func TestReverseProxyLongRunning(t *testing.T) { Rule: []*router.RoutingRule{ { Domain: []*router.Domain{ - {Type: router.Domain_Full, Value: "test.v2ray.com"}, + {Type: router.Domain_Full, Value: "test.v2fly.org"}, }, TargetTag: &router.RoutingRule_Tag{ Tag: "portal", @@ -314,7 +314,7 @@ func TestReverseProxyLongRunning(t *testing.T) { BridgeConfig: []*reverse.BridgeConfig{ { Tag: "bridge", - Domain: "test.v2ray.com", + Domain: "test.v2fly.org", }, }, }), @@ -322,7 +322,7 @@ func TestReverseProxyLongRunning(t *testing.T) { Rule: []*router.RoutingRule{ { Domain: []*router.Domain{ - {Type: router.Domain_Full, Value: "test.v2ray.com"}, + {Type: router.Domain_Full, Value: "test.v2fly.org"}, }, TargetTag: &router.RoutingRule_Tag{ Tag: "reverse", diff --git a/testing/scenarios/shadowsocks_test.go b/testing/scenarios/shadowsocks_test.go index 35d8a6202..b6ff212e0 100644 --- a/testing/scenarios/shadowsocks_test.go +++ b/testing/scenarios/shadowsocks_test.go @@ -6,19 +6,19 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/shadowsocks" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/proxy/shadowsocks" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) func TestShadowsocksChaCha20Poly1305TCP(t *testing.T) { diff --git a/testing/scenarios/socks_test.go b/testing/scenarios/socks_test.go index 1a959a796..1bf21fa25 100644 --- a/testing/scenarios/socks_test.go +++ b/testing/scenarios/socks_test.go @@ -7,19 +7,19 @@ import ( xproxy "golang.org/x/net/proxy" socks4 "h12.io/socks" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/app/router" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/proxy/blackhole" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/socks" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "github.com/v2fly/v2ray-core/v4/app/router" + "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/common/serial" + "github.com/v2fly/v2ray-core/v4/proxy/blackhole" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/proxy/freedom" + "github.com/v2fly/v2ray-core/v4/proxy/socks" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" ) func TestSocksBridgeTCP(t *testing.T) { diff --git a/testing/scenarios/tls_test.go b/testing/scenarios/tls_test.go index fe3309642..ba03e29b3 100644 --- a/testing/scenarios/tls_test.go +++ b/testing/scenarios/tls_test.go @@ -8,25 +8,25 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/websocket" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" + "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" ) func TestSimpleTLSConnection(t *testing.T) { @@ -228,7 +228,7 @@ func TestAutoIssuingCertificate(t *testing.T) { SecurityType: serial.GetMessageType(&tls.Config{}), SecuritySettings: []*serial.TypedMessage{ serial.ToTypedMessage(&tls.Config{ - ServerName: "v2ray.com", + ServerName: "v2fly.org", Certificate: []*tls.Certificate{{ Certificate: certPEM, Usage: tls.Certificate_AUTHORITY_VERIFY, @@ -488,7 +488,7 @@ func TestHTTP2(t *testing.T) { { Protocol: internet.TransportProtocol_HTTP, Settings: serial.ToTypedMessage(&http.Config{ - Host: []string{"v2ray.com"}, + Host: []string{"v2fly.org"}, Path: "/testpath", }), }, @@ -560,7 +560,7 @@ func TestHTTP2(t *testing.T) { { Protocol: internet.TransportProtocol_HTTP, Settings: serial.ToTypedMessage(&http.Config{ - Host: []string{"v2ray.com"}, + Host: []string{"v2fly.org"}, Path: "/testpath", }), }, diff --git a/testing/scenarios/transport_test.go b/testing/scenarios/transport_test.go index e60c2868e..1a78abdbd 100644 --- a/testing/scenarios/transport_test.go +++ b/testing/scenarios/transport_test.go @@ -8,27 +8,27 @@ import ( "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/domainsocket" - "v2ray.com/core/transport/internet/headers/http" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/quic" - tcptransport "v2ray.com/core/transport/internet/tcp" + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket" + "github.com/v2fly/v2ray-core/v4/transport/internet/headers/http" + "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat" + "github.com/v2fly/v2ray-core/v4/transport/internet/quic" + tcptransport "github.com/v2fly/v2ray-core/v4/transport/internet/tcp" ) func TestHTTPConnectionHeader(t *testing.T) { diff --git a/testing/scenarios/vmess_test.go b/testing/scenarios/vmess_test.go index 5f90cca7b..f601d1d41 100644 --- a/testing/scenarios/vmess_test.go +++ b/testing/scenarios/vmess_test.go @@ -6,24 +6,25 @@ import ( "time" "golang.org/x/sync/errgroup" - "v2ray.com/core" - "v2ray.com/core/app/log" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - clog "v2ray.com/core/common/log" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/freedom" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/inbound" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/kcp" + + core "github.com/v2fly/v2ray-core/v4" + "github.com/v2fly/v2ray-core/v4/app/log" + "github.com/v2fly/v2ray-core/v4/app/proxyman" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "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/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) func TestVMessDynamicPort(t *testing.T) { diff --git a/testing/servers/http/http.go b/testing/servers/http/http.go index 8ba591a7f..6c83c5f20 100644 --- a/testing/servers/http/http.go +++ b/testing/servers/http/http.go @@ -3,7 +3,7 @@ package tcp import ( "net/http" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) type Server struct { diff --git a/testing/servers/tcp/port.go b/testing/servers/tcp/port.go index 86e73e7ac..9026ffd2d 100644 --- a/testing/servers/tcp/port.go +++ b/testing/servers/tcp/port.go @@ -1,6 +1,6 @@ package tcp -import "v2ray.com/core/common/net" +import "github.com/v2fly/v2ray-core/v4/common/net" // PickPort returns an unused TCP port of the system. func PickPort() net.Port { diff --git a/testing/servers/tcp/tcp.go b/testing/servers/tcp/tcp.go index ef366f388..f841d6e79 100644 --- a/testing/servers/tcp/tcp.go +++ b/testing/servers/tcp/tcp.go @@ -5,11 +5,11 @@ import ( "fmt" "io" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type Server struct { diff --git a/testing/servers/udp/port.go b/testing/servers/udp/port.go index f71b0c96b..44211661d 100644 --- a/testing/servers/udp/port.go +++ b/testing/servers/udp/port.go @@ -1,6 +1,6 @@ package udp -import "v2ray.com/core/common/net" +import "github.com/v2fly/v2ray-core/v4/common/net" // PickPort returns an unused UDP port of the system. func PickPort() net.Port { diff --git a/testing/servers/udp/udp.go b/testing/servers/udp/udp.go index 94ce46c6b..8a450362a 100644 --- a/testing/servers/udp/udp.go +++ b/testing/servers/udp/udp.go @@ -3,7 +3,7 @@ package udp import ( "fmt" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) type Server struct { diff --git a/transport/config.go b/transport/config.go index 486ea45a6..505cd6535 100644 --- a/transport/config.go +++ b/transport/config.go @@ -1,7 +1,7 @@ package transport import ( - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // Apply applies this Config. diff --git a/transport/config.pb.go b/transport/config.pb.go index 5d603240a..72c8476bf 100644 --- a/transport/config.pb.go +++ b/transport/config.pb.go @@ -8,11 +8,11 @@ package transport import ( proto "github.com/golang/protobuf/proto" + internet "github.com/v2fly/v2ray-core/v4/transport/internet" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - internet "v2ray.com/core/transport/internet" ) const ( @@ -91,10 +91,11 @@ var file_transport_config_proto_rawDesc = []byte{ 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x11, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x42, 0x4d, 0x0a, 0x18, + 0x53, 0x65, 0x74, 0x74, 0x69, 0x6e, 0x67, 0x73, 0x3a, 0x02, 0x18, 0x01, 0x42, 0x5d, 0x0a, 0x18, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x01, 0x5a, 0x18, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x50, 0x01, 0x5a, 0x28, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0xaa, 0x02, 0x14, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/transport/config.proto b/transport/config.proto index 600e739db..d89014c97 100644 --- a/transport/config.proto +++ b/transport/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport; option csharp_namespace = "V2Ray.Core.Transport"; -option go_package = "v2ray.com/core/transport"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport"; option java_package = "com.v2ray.core.transport"; option java_multiple_files = true; diff --git a/transport/internet/config.go b/transport/internet/config.go index 92a180803..524f6705b 100644 --- a/transport/internet/config.go +++ b/transport/internet/config.go @@ -1,8 +1,8 @@ package internet import ( - "v2ray.com/core/common/serial" - "v2ray.com/core/features" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/features" ) type ConfigCreator func() interface{} diff --git a/transport/internet/config.pb.go b/transport/internet/config.pb.go index 9e4f984da..33f044c1d 100644 --- a/transport/internet/config.pb.go +++ b/transport/internet/config.pb.go @@ -8,11 +8,11 @@ package internet import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -587,11 +587,12 @@ var file_transport_internet_config_proto_rawDesc = []byte{ 0x55, 0x44, 0x50, 0x10, 0x01, 0x12, 0x08, 0x0a, 0x04, 0x4d, 0x4b, 0x43, 0x50, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x57, 0x65, 0x62, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x10, 0x03, 0x12, 0x08, 0x0a, 0x04, 0x48, 0x54, 0x54, 0x50, 0x10, 0x04, 0x12, 0x10, 0x0a, 0x0c, 0x44, 0x6f, 0x6d, 0x61, - 0x69, 0x6e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x10, 0x05, 0x42, 0x68, 0x0a, 0x21, 0x63, 0x6f, + 0x69, 0x6e, 0x53, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x10, 0x05, 0x42, 0x78, 0x0a, 0x21, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x50, - 0x01, 0x5a, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x01, 0x5a, 0x31, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, + 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0xaa, 0x02, 0x1d, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, diff --git a/transport/internet/config.proto b/transport/internet/config.proto index 485a3f530..d23b5a6bd 100644 --- a/transport/internet/config.proto +++ b/transport/internet/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet; option csharp_namespace = "V2Ray.Core.Transport.Internet"; -option go_package = "v2ray.com/core/transport/internet"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet"; option java_package = "com.v2ray.core.transport.internet"; option java_multiple_files = true; diff --git a/transport/internet/connection.go b/transport/internet/connection.go index b55b0606e..e4112a659 100644 --- a/transport/internet/connection.go +++ b/transport/internet/connection.go @@ -3,7 +3,7 @@ package internet import ( "net" - "v2ray.com/core/features/stats" + "github.com/v2fly/v2ray-core/v4/features/stats" ) type Connection interface { diff --git a/transport/internet/dialer.go b/transport/internet/dialer.go index 9ac0b3a6a..78a45fdf8 100644 --- a/transport/internet/dialer.go +++ b/transport/internet/dialer.go @@ -3,8 +3,8 @@ package internet import ( "context" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" ) // Dialer is the interface for dialing outbound connections. diff --git a/transport/internet/dialer_test.go b/transport/internet/dialer_test.go index e9d913670..ee58833f2 100644 --- a/transport/internet/dialer_test.go +++ b/transport/internet/dialer_test.go @@ -6,10 +6,10 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + . "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestDialWithLocalAddr(t *testing.T) { diff --git a/transport/internet/domainsocket/config.go b/transport/internet/domainsocket/config.go index f51879476..97ca05745 100644 --- a/transport/internet/domainsocket/config.go +++ b/transport/internet/domainsocket/config.go @@ -3,9 +3,9 @@ package domainsocket import ( - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const protocolName = "domainsocket" diff --git a/transport/internet/domainsocket/config.pb.go b/transport/internet/domainsocket/config.pb.go index 65d0b849f..f713ae7ec 100644 --- a/transport/internet/domainsocket/config.pb.go +++ b/transport/internet/domainsocket/config.pb.go @@ -108,12 +108,13 @@ var file_transport_internet_domainsocket_config_proto_rawDesc = []byte{ 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x12, 0x1a, 0x0a, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x08, 0x61, 0x62, 0x73, 0x74, 0x72, 0x61, 0x63, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x18, - 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x8f, + 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x70, 0x61, 0x64, 0x64, 0x69, 0x6e, 0x67, 0x42, 0x9f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, - 0x74, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, - 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, + 0x74, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x64, 0x6f, 0x6d, 0x61, 0x69, 0x6e, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, diff --git a/transport/internet/domainsocket/config.proto b/transport/internet/domainsocket/config.proto index b66c71e8b..52656ea2c 100644 --- a/transport/internet/domainsocket/config.proto +++ b/transport/internet/domainsocket/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.domainsocket; option csharp_namespace = "V2Ray.Core.Transport.Internet.DomainSocket"; -option go_package = "v2ray.com/core/transport/internet/domainsocket"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"; option java_package = "com.v2ray.core.transport.internet.domainsocket"; option java_multiple_files = true; diff --git a/transport/internet/domainsocket/dial.go b/transport/internet/domainsocket/dial.go index bd6591de3..e0d6a596a 100644 --- a/transport/internet/domainsocket/dial.go +++ b/transport/internet/domainsocket/dial.go @@ -7,10 +7,10 @@ package domainsocket import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) func Dial(ctx context.Context, dest net.Destination, streamSettings *internet.MemoryStreamConfig) (internet.Connection, error) { diff --git a/transport/internet/domainsocket/errgen.go b/transport/internet/domainsocket/errgen.go index 124b932bf..568f702e4 100644 --- a/transport/internet/domainsocket/errgen.go +++ b/transport/internet/domainsocket/errgen.go @@ -1,3 +1,3 @@ package domainsocket -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/domainsocket/errors.generated.go b/transport/internet/domainsocket/errors.generated.go index 645ddaa71..54d7578c2 100644 --- a/transport/internet/domainsocket/errors.generated.go +++ b/transport/internet/domainsocket/errors.generated.go @@ -1,6 +1,6 @@ package domainsocket -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/domainsocket/listener.go b/transport/internet/domainsocket/listener.go index aba951d0a..cc3cf85da 100644 --- a/transport/internet/domainsocket/listener.go +++ b/transport/internet/domainsocket/listener.go @@ -12,10 +12,10 @@ import ( "golang.org/x/sys/unix" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) type Listener struct { diff --git a/transport/internet/domainsocket/listener_test.go b/transport/internet/domainsocket/listener_test.go index 43285898a..fc926ac17 100644 --- a/transport/internet/domainsocket/listener_test.go +++ b/transport/internet/domainsocket/listener_test.go @@ -8,11 +8,11 @@ import ( "runtime" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/domainsocket" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + . "github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket" ) func TestListen(t *testing.T) { diff --git a/transport/internet/errors.generated.go b/transport/internet/errors.generated.go index b1c035ddd..07872c102 100644 --- a/transport/internet/errors.generated.go +++ b/transport/internet/errors.generated.go @@ -1,6 +1,6 @@ package internet -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/header.go b/transport/internet/header.go index 9f71c60d5..944a727b6 100644 --- a/transport/internet/header.go +++ b/transport/internet/header.go @@ -4,7 +4,7 @@ import ( "context" "net" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type PacketHeader interface { diff --git a/transport/internet/header_test.go b/transport/internet/header_test.go index 1acbf7f0c..14c37a40e 100644 --- a/transport/internet/header_test.go +++ b/transport/internet/header_test.go @@ -3,13 +3,13 @@ package internet_test import ( "testing" - "v2ray.com/core/common" - . "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/noop" - "v2ray.com/core/transport/internet/headers/srtp" - "v2ray.com/core/transport/internet/headers/utp" - "v2ray.com/core/transport/internet/headers/wechat" - "v2ray.com/core/transport/internet/headers/wireguard" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/transport/internet" + "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/utp" + "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat" + "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wireguard" ) func TestAllHeadersLoadable(t *testing.T) { diff --git a/transport/internet/headers/http/config.go b/transport/internet/headers/http/config.go index 0f4c2b172..9af29dbed 100644 --- a/transport/internet/headers/http/config.go +++ b/transport/internet/headers/http/config.go @@ -3,7 +3,7 @@ package http import ( "strings" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common/dice" ) func pickString(arr []string) string { diff --git a/transport/internet/headers/http/config.pb.go b/transport/internet/headers/http/config.pb.go index 44052b81d..8a3170095 100644 --- a/transport/internet/headers/http/config.pb.go +++ b/transport/internet/headers/http/config.pb.go @@ -495,11 +495,12 @@ var file_transport_internet_headers_http_config_proto_rawDesc = []byte{ 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x08, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x73, 0x65, 0x42, 0x9f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, - 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, + 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, + 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x68, 0x74, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, diff --git a/transport/internet/headers/http/config.proto b/transport/internet/headers/http/config.proto index f9e881e66..884ffe379 100644 --- a/transport/internet/headers/http/config.proto +++ b/transport/internet/headers/http/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.http; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Http"; -option go_package = "v2ray.com/core/transport/internet/headers/http"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"; option java_package = "com.v2ray.core.transport.internet.headers.http"; option java_multiple_files = true; diff --git a/transport/internet/headers/http/errors.generated.go b/transport/internet/headers/http/errors.generated.go index 9c6e8e4cb..bbaec46a4 100644 --- a/transport/internet/headers/http/errors.generated.go +++ b/transport/internet/headers/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/headers/http/http.go b/transport/internet/headers/http/http.go index e50495ad5..c73f7a63e 100644 --- a/transport/internet/headers/http/http.go +++ b/transport/internet/headers/http/http.go @@ -1,6 +1,6 @@ package http -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen import ( "bufio" @@ -12,8 +12,8 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" ) const ( diff --git a/transport/internet/headers/http/http_test.go b/transport/internet/headers/http/http_test.go index 13db12386..00b4d3c5c 100644 --- a/transport/internet/headers/http/http_test.go +++ b/transport/internet/headers/http/http_test.go @@ -9,10 +9,10 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - . "v2ray.com/core/transport/internet/headers/http" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + . "github.com/v2fly/v2ray-core/v4/transport/internet/headers/http" ) func TestReaderWriter(t *testing.T) { @@ -80,7 +80,7 @@ func TestConnection(t *testing.T) { Header: []*Header{ { Name: "Host", - Value: []string{"www.v2ray.com", "www.google.com"}, + Value: []string{"www.v2fly.org", "www.google.com"}, }, { Name: "User-Agent", @@ -153,7 +153,7 @@ func TestConnectionInvPath(t *testing.T) { Header: []*Header{ { Name: "Host", - Value: []string{"www.v2ray.com", "www.google.com"}, + Value: []string{"www.v2fly.org", "www.google.com"}, }, { Name: "User-Agent", @@ -180,7 +180,7 @@ func TestConnectionInvPath(t *testing.T) { Header: []*Header{ { Name: "Host", - Value: []string{"www.v2ray.com", "www.google.com"}, + Value: []string{"www.v2fly.org", "www.google.com"}, }, { Name: "User-Agent", @@ -254,7 +254,7 @@ func TestConnectionInvReq(t *testing.T) { Header: []*Header{ { Name: "Host", - Value: []string{"www.v2ray.com", "www.google.com"}, + Value: []string{"www.v2fly.org", "www.google.com"}, }, { Name: "User-Agent", diff --git a/transport/internet/headers/noop/config.pb.go b/transport/internet/headers/noop/config.pb.go index a333e72c8..04893818e 100644 --- a/transport/internet/headers/noop/config.pb.go +++ b/transport/internet/headers/noop/config.pb.go @@ -111,11 +111,12 @@ var file_transport_internet_headers_noop_config_proto_rawDesc = []byte{ 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x22, 0x12, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x6e, 0x6f, 0x6f, 0x70, 0x50, 0x01, 0x5a, 0x3e, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x6e, 0x6f, 0x6f, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, diff --git a/transport/internet/headers/noop/config.proto b/transport/internet/headers/noop/config.proto index a5db08dda..0be13f08d 100644 --- a/transport/internet/headers/noop/config.proto +++ b/transport/internet/headers/noop/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.noop; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Noop"; -option go_package = "v2ray.com/core/transport/internet/headers/noop"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/noop"; option java_package = "com.v2ray.core.transport.internet.headers.noop"; option java_multiple_files = true; diff --git a/transport/internet/headers/noop/noop.go b/transport/internet/headers/noop/noop.go index eb5cd1110..dcbb33207 100644 --- a/transport/internet/headers/noop/noop.go +++ b/transport/internet/headers/noop/noop.go @@ -4,7 +4,7 @@ import ( "context" "net" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type Header struct{} diff --git a/transport/internet/headers/srtp/config.pb.go b/transport/internet/headers/srtp/config.pb.go index 2b98ae1fc..3ac672843 100644 --- a/transport/internet/headers/srtp/config.pb.go +++ b/transport/internet/headers/srtp/config.pb.go @@ -132,11 +132,12 @@ var file_transport_internet_headers_srtp_config_proto_rawDesc = []byte{ 0x18, 0x05, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x54, 0x79, 0x70, - 0x65, 0x42, 0x8f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x65, 0x42, 0x9f, 0x01, 0x0a, 0x2e, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, - 0x73, 0x72, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, - 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, + 0x73, 0x72, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x3e, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, + 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x73, 0x72, 0x74, 0x70, 0xaa, 0x02, 0x2a, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, diff --git a/transport/internet/headers/srtp/config.proto b/transport/internet/headers/srtp/config.proto index 3888cf614..676ea547b 100644 --- a/transport/internet/headers/srtp/config.proto +++ b/transport/internet/headers/srtp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.srtp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Srtp"; -option go_package = "v2ray.com/core/transport/internet/headers/srtp"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp"; option java_package = "com.v2ray.core.transport.internet.headers.srtp"; option java_multiple_files = true; diff --git a/transport/internet/headers/srtp/srtp.go b/transport/internet/headers/srtp/srtp.go index cf881cbe5..9db32a932 100644 --- a/transport/internet/headers/srtp/srtp.go +++ b/transport/internet/headers/srtp/srtp.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" ) type SRTP struct { diff --git a/transport/internet/headers/srtp/srtp_test.go b/transport/internet/headers/srtp/srtp_test.go index 128961129..c07f3e36c 100644 --- a/transport/internet/headers/srtp/srtp_test.go +++ b/transport/internet/headers/srtp/srtp_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/srtp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/internet/headers/srtp" ) func TestSRTPWrite(t *testing.T) { diff --git a/transport/internet/headers/tls/config.pb.go b/transport/internet/headers/tls/config.pb.go index 86ca7d579..3ed5725ae 100644 --- a/transport/internet/headers/tls/config.pb.go +++ b/transport/internet/headers/tls/config.pb.go @@ -72,11 +72,12 @@ var file_transport_internet_headers_tls_config_proto_rawDesc = []byte{ 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x22, 0x0e, 0x0a, 0x0c, 0x50, 0x61, 0x63, 0x6b, - 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x8c, 0x01, 0x0a, 0x2d, 0x63, 0x6f, 0x6d, + 0x65, 0x74, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9c, 0x01, 0x0a, 0x2d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, - 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x2d, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, + 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, 0x3d, 0x67, 0x69, + 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, + 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x29, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, diff --git a/transport/internet/headers/tls/config.proto b/transport/internet/headers/tls/config.proto index 415527e88..c3237b9e1 100644 --- a/transport/internet/headers/tls/config.proto +++ b/transport/internet/headers/tls/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.tls; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Tls"; -option go_package = "v2ray.com/core/transport/internet/headers/tls"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/tls"; option java_package = "com.v2ray.core.transport.internet.headers.tls"; option java_multiple_files = true; diff --git a/transport/internet/headers/tls/dtls.go b/transport/internet/headers/tls/dtls.go index e48ab6e99..d80bfd716 100644 --- a/transport/internet/headers/tls/dtls.go +++ b/transport/internet/headers/tls/dtls.go @@ -3,8 +3,8 @@ package tls import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" ) // DTLS writes header as DTLS. See https://tools.ietf.org/html/rfc6347 diff --git a/transport/internet/headers/tls/dtls_test.go b/transport/internet/headers/tls/dtls_test.go index e26aab37f..220e956d3 100644 --- a/transport/internet/headers/tls/dtls_test.go +++ b/transport/internet/headers/tls/dtls_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/internet/headers/tls" ) func TestDTLSWrite(t *testing.T) { diff --git a/transport/internet/headers/utp/config.pb.go b/transport/internet/headers/utp/config.pb.go index 1dfdb9c72..2121a2884 100644 --- a/transport/internet/headers/utp/config.pb.go +++ b/transport/internet/headers/utp/config.pb.go @@ -82,11 +82,12 @@ var file_transport_internet_headers_utp_config_proto_rawDesc = []byte{ 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x22, 0x22, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x8c, 0x01, 0x0a, + 0x01, 0x28, 0x0d, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x42, 0x9c, 0x01, 0x0a, 0x2d, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x75, 0x74, 0x70, 0x50, 0x01, - 0x5a, 0x2d, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, + 0x5a, 0x3d, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, + 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x75, 0x74, 0x70, 0xaa, 0x02, 0x29, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, diff --git a/transport/internet/headers/utp/config.proto b/transport/internet/headers/utp/config.proto index f874fcc28..4e6a9d1a4 100644 --- a/transport/internet/headers/utp/config.proto +++ b/transport/internet/headers/utp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.utp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Utp"; -option go_package = "v2ray.com/core/transport/internet/headers/utp"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/utp"; option java_package = "com.v2ray.core.transport.internet.headers.utp"; option java_multiple_files = true; diff --git a/transport/internet/headers/utp/utp.go b/transport/internet/headers/utp/utp.go index e210cc3bd..2396267de 100644 --- a/transport/internet/headers/utp/utp.go +++ b/transport/internet/headers/utp/utp.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" ) type UTP struct { diff --git a/transport/internet/headers/utp/utp_test.go b/transport/internet/headers/utp/utp_test.go index de8955240..c01b95baf 100644 --- a/transport/internet/headers/utp/utp_test.go +++ b/transport/internet/headers/utp/utp_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/utp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/internet/headers/utp" ) func TestUTPWrite(t *testing.T) { diff --git a/transport/internet/headers/wechat/config.pb.go b/transport/internet/headers/wechat/config.pb.go index 4fcd5e85a..cc8c72803 100644 --- a/transport/internet/headers/wechat/config.pb.go +++ b/transport/internet/headers/wechat/config.pb.go @@ -72,12 +72,13 @@ var file_transport_internet_headers_wechat_config_proto_rawDesc = []byte{ 0x12, 0x2c, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0x22, 0x0d, - 0x0a, 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x95, 0x01, + 0x0a, 0x0b, 0x56, 0x69, 0x64, 0x65, 0x6f, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xa5, 0x01, 0x0a, 0x30, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x65, 0x63, 0x68, - 0x61, 0x74, 0x50, 0x01, 0x5a, 0x30, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, - 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, + 0x61, 0x74, 0x50, 0x01, 0x5a, 0x40, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, + 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, + 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x65, 0x63, 0x68, 0x61, 0x74, 0xaa, 0x02, 0x2c, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, diff --git a/transport/internet/headers/wechat/config.proto b/transport/internet/headers/wechat/config.proto index 467057a03..0d0ccfdeb 100644 --- a/transport/internet/headers/wechat/config.proto +++ b/transport/internet/headers/wechat/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.wechat; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Wechat"; -option go_package = "v2ray.com/core/transport/internet/headers/wechat"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat"; option java_package = "com.v2ray.core.transport.internet.headers.wechat"; option java_multiple_files = true; diff --git a/transport/internet/headers/wechat/wechat.go b/transport/internet/headers/wechat/wechat.go index 8cbb603b3..94a240053 100644 --- a/transport/internet/headers/wechat/wechat.go +++ b/transport/internet/headers/wechat/wechat.go @@ -4,8 +4,8 @@ import ( "context" "encoding/binary" - "v2ray.com/core/common" - "v2ray.com/core/common/dice" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" ) type VideoChat struct { diff --git a/transport/internet/headers/wechat/wechat_test.go b/transport/internet/headers/wechat/wechat_test.go index 083929ef8..15b641691 100644 --- a/transport/internet/headers/wechat/wechat_test.go +++ b/transport/internet/headers/wechat/wechat_test.go @@ -4,9 +4,9 @@ import ( "context" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/headers/wechat" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat" ) func TestUTPWrite(t *testing.T) { diff --git a/transport/internet/headers/wireguard/config.pb.go b/transport/internet/headers/wireguard/config.pb.go index 9bb7749cf..84cf8142b 100644 --- a/transport/internet/headers/wireguard/config.pb.go +++ b/transport/internet/headers/wireguard/config.pb.go @@ -73,12 +73,13 @@ var file_transport_internet_headers_wireguard_config_proto_rawDesc = []byte{ 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x22, 0x11, 0x0a, 0x0f, 0x57, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, - 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x9e, 0x01, 0x0a, 0x33, 0x63, 0x6f, 0x6d, 0x2e, + 0x64, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0xae, 0x01, 0x0a, 0x33, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2e, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0x50, - 0x01, 0x5a, 0x33, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, - 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, + 0x01, 0x5a, 0x43, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, + 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, + 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x2f, 0x77, 0x69, 0x72, 0x65, 0x67, 0x75, 0x61, 0x72, 0x64, 0xaa, 0x02, 0x2f, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, diff --git a/transport/internet/headers/wireguard/config.proto b/transport/internet/headers/wireguard/config.proto index 05e8bfe46..4ecc9f635 100644 --- a/transport/internet/headers/wireguard/config.proto +++ b/transport/internet/headers/wireguard/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.headers.wireguard; option csharp_namespace = "V2Ray.Core.Transport.Internet.Headers.Wireguard"; -option go_package = "v2ray.com/core/transport/internet/headers/wireguard"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wireguard"; option java_package = "com.v2ray.core.transport.internet.headers.wireguard"; option java_multiple_files = true; diff --git a/transport/internet/headers/wireguard/wireguard.go b/transport/internet/headers/wireguard/wireguard.go index 466f48e6a..a1871bf7c 100644 --- a/transport/internet/headers/wireguard/wireguard.go +++ b/transport/internet/headers/wireguard/wireguard.go @@ -3,7 +3,7 @@ package wireguard import ( "context" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) type Wireguard struct{} diff --git a/transport/internet/http/config.go b/transport/internet/http/config.go index b433e331c..30d1c5453 100644 --- a/transport/internet/http/config.go +++ b/transport/internet/http/config.go @@ -3,9 +3,9 @@ package http import ( - "v2ray.com/core/common" - "v2ray.com/core/common/dice" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const protocolName = "http" diff --git a/transport/internet/http/config.pb.go b/transport/internet/http/config.pb.go index 3dbb47d5c..718c00f8c 100644 --- a/transport/internet/http/config.pb.go +++ b/transport/internet/http/config.pb.go @@ -90,15 +90,16 @@ var file_transport_internet_http_config_proto_rawDesc = []byte{ 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x22, 0x30, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70, 0x61, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x77, 0x0a, 0x26, - 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, - 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x26, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, - 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x74, 0x74, 0x70, - 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x61, 0x74, 0x68, 0x42, 0x87, 0x01, 0x0a, + 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, + 0x65, 0x74, 0x2e, 0x68, 0x74, 0x74, 0x70, 0x50, 0x01, 0x5a, 0x36, 0x67, 0x69, 0x74, 0x68, 0x75, + 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, + 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, + 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x68, 0x74, 0x74, + 0x70, 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/transport/internet/http/config.proto b/transport/internet/http/config.proto index 079fb2bcb..874c5a9c9 100644 --- a/transport/internet/http/config.proto +++ b/transport/internet/http/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.http; option csharp_namespace = "V2Ray.Core.Transport.Internet.Http"; -option go_package = "v2ray.com/core/transport/internet/http"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/http"; option java_package = "com.v2ray.core.transport.internet.http"; option java_multiple_files = true; diff --git a/transport/internet/http/dialer.go b/transport/internet/http/dialer.go index 6768be6da..08ae989bf 100644 --- a/transport/internet/http/dialer.go +++ b/transport/internet/http/dialer.go @@ -10,12 +10,13 @@ import ( "sync" "golang.org/x/net/http2" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/pipe" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) var ( diff --git a/transport/internet/http/errors.generated.go b/transport/internet/http/errors.generated.go index 9c6e8e4cb..bbaec46a4 100644 --- a/transport/internet/http/errors.generated.go +++ b/transport/internet/http/errors.generated.go @@ -1,6 +1,6 @@ package http -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/http/http.go b/transport/internet/http/http.go index f2305b871..0ef5118f0 100644 --- a/transport/internet/http/http.go +++ b/transport/internet/http/http.go @@ -1,3 +1,3 @@ package http -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/http/http_test.go b/transport/internet/http/http_test.go index c7eeb622d..565774808 100644 --- a/transport/internet/http/http_test.go +++ b/transport/internet/http/http_test.go @@ -8,14 +8,14 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/http" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "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" ) func TestHTTPConnection(t *testing.T) { diff --git a/transport/internet/http/hub.go b/transport/internet/http/hub.go index 0e8600b75..f1bc8410a 100644 --- a/transport/internet/http/hub.go +++ b/transport/internet/http/hub.go @@ -12,14 +12,14 @@ import ( "golang.org/x/net/http2" "golang.org/x/net/http2/h2c" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - http_proto "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + http_proto "github.com/v2fly/v2ray-core/v4/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) type Listener struct { diff --git a/transport/internet/internet.go b/transport/internet/internet.go index a2283fcf8..b9f4f7af0 100644 --- a/transport/internet/internet.go +++ b/transport/internet/internet.go @@ -1,3 +1,3 @@ package internet -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/kcp/config.go b/transport/internet/kcp/config.go index 3179e9c7e..1988e4447 100644 --- a/transport/internet/kcp/config.go +++ b/transport/internet/kcp/config.go @@ -5,8 +5,8 @@ package kcp import ( "crypto/cipher" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const protocolName = "mkcp" diff --git a/transport/internet/kcp/config.pb.go b/transport/internet/kcp/config.pb.go index 8c9dee3db..ab31dd058 100644 --- a/transport/internet/kcp/config.pb.go +++ b/transport/internet/kcp/config.pb.go @@ -8,11 +8,11 @@ package kcp import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -589,15 +589,16 @@ var file_transport_internet_kcp_config_proto_rawDesc = []byte{ 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, 0x2e, 0x45, 0x6e, 0x63, 0x72, 0x79, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x65, 0x64, 0x52, 0x04, 0x73, 0x65, 0x65, - 0x64, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, - 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, 0x70, - 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, - 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, - 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x4b, 0x63, 0x70, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x64, 0x4a, 0x04, 0x08, 0x09, 0x10, 0x0a, 0x42, 0x84, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x6b, 0x63, + 0x70, 0x50, 0x01, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, + 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, + 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x6b, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, + 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x4b, 0x63, 0x70, 0x62, 0x06, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/transport/internet/kcp/config.proto b/transport/internet/kcp/config.proto index 8fc180ec7..4f98522fb 100644 --- a/transport/internet/kcp/config.proto +++ b/transport/internet/kcp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.kcp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Kcp"; -option go_package = "v2ray.com/core/transport/internet/kcp"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/kcp"; option java_package = "com.v2ray.core.transport.internet.kcp"; option java_multiple_files = true; diff --git a/transport/internet/kcp/connection.go b/transport/internet/kcp/connection.go index b89e1da69..d60232f08 100644 --- a/transport/internet/kcp/connection.go +++ b/transport/internet/kcp/connection.go @@ -11,9 +11,9 @@ import ( "sync/atomic" "time" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/semaphore" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/signal/semaphore" ) var ( diff --git a/transport/internet/kcp/connection_test.go b/transport/internet/kcp/connection_test.go index 0d80dd225..7fe80f295 100644 --- a/transport/internet/kcp/connection_test.go +++ b/transport/internet/kcp/connection_test.go @@ -5,8 +5,8 @@ import ( "testing" "time" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/internet/kcp" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) type NoOpCloser int diff --git a/transport/internet/kcp/crypt.go b/transport/internet/kcp/crypt.go index 35bf55eac..d6e2550fa 100644 --- a/transport/internet/kcp/crypt.go +++ b/transport/internet/kcp/crypt.go @@ -7,7 +7,7 @@ import ( "encoding/binary" "hash/fnv" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) // SimpleAuthenticator is a legacy AEAD used for KCP encryption. diff --git a/transport/internet/kcp/crypt_test.go b/transport/internet/kcp/crypt_test.go index c1b9ffd7e..faa1ff801 100644 --- a/transport/internet/kcp/crypt_test.go +++ b/transport/internet/kcp/crypt_test.go @@ -5,8 +5,8 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - . "v2ray.com/core/transport/internet/kcp" + "github.com/v2fly/v2ray-core/v4/common" + . "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) func TestSimpleAuthenticator(t *testing.T) { diff --git a/transport/internet/kcp/cryptreal.go b/transport/internet/kcp/cryptreal.go index bbf1c5b96..72934f77e 100644 --- a/transport/internet/kcp/cryptreal.go +++ b/transport/internet/kcp/cryptreal.go @@ -5,7 +5,7 @@ import ( "crypto/cipher" "crypto/sha256" - "v2ray.com/core/common" + "github.com/v2fly/v2ray-core/v4/common" ) func NewAEADAESGCMBasedOnSeed(seed string) cipher.AEAD { diff --git a/transport/internet/kcp/dialer.go b/transport/internet/kcp/dialer.go index 4a6d9b4ff..1abcae402 100644 --- a/transport/internet/kcp/dialer.go +++ b/transport/internet/kcp/dialer.go @@ -7,12 +7,12 @@ import ( "io" "sync/atomic" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/dice" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/dice" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) var ( diff --git a/transport/internet/kcp/errors.generated.go b/transport/internet/kcp/errors.generated.go index 1f342be9f..2192c7648 100644 --- a/transport/internet/kcp/errors.generated.go +++ b/transport/internet/kcp/errors.generated.go @@ -1,6 +1,6 @@ package kcp -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/kcp/io.go b/transport/internet/kcp/io.go index 58f657ca0..12f03cbb6 100644 --- a/transport/internet/kcp/io.go +++ b/transport/internet/kcp/io.go @@ -7,9 +7,9 @@ import ( "crypto/rand" "io" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type PacketReader interface { diff --git a/transport/internet/kcp/io_test.go b/transport/internet/kcp/io_test.go index 9a4b6e2c1..3d7ae0313 100644 --- a/transport/internet/kcp/io_test.go +++ b/transport/internet/kcp/io_test.go @@ -3,7 +3,7 @@ package kcp_test import ( "testing" - . "v2ray.com/core/transport/internet/kcp" + . "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) func TestKCPPacketReader(t *testing.T) { diff --git a/transport/internet/kcp/kcp.go b/transport/internet/kcp/kcp.go index 5bef0b896..847f13998 100644 --- a/transport/internet/kcp/kcp.go +++ b/transport/internet/kcp/kcp.go @@ -5,4 +5,4 @@ // xtaci@github for translating to Golang package kcp -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/kcp/kcp_test.go b/transport/internet/kcp/kcp_test.go index f241fe5f0..85ea98e3d 100644 --- a/transport/internet/kcp/kcp_test.go +++ b/transport/internet/kcp/kcp_test.go @@ -10,11 +10,11 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/kcp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + . "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) func TestDialAndListen(t *testing.T) { diff --git a/transport/internet/kcp/listener.go b/transport/internet/kcp/listener.go index e0411aa20..670865ccf 100644 --- a/transport/internet/kcp/listener.go +++ b/transport/internet/kcp/listener.go @@ -8,12 +8,12 @@ import ( gotls "crypto/tls" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - "v2ray.com/core/transport/internet/udp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/transport/internet/udp" ) type ConnectionID struct { diff --git a/transport/internet/kcp/output.go b/transport/internet/kcp/output.go index 5f4a1dc2a..591516129 100644 --- a/transport/internet/kcp/output.go +++ b/transport/internet/kcp/output.go @@ -6,9 +6,8 @@ import ( "io" "sync" - "v2ray.com/core/common/retry" - - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/retry" ) type SegmentWriter interface { diff --git a/transport/internet/kcp/receiving.go b/transport/internet/kcp/receiving.go index abdedb9ec..9607ecf15 100644 --- a/transport/internet/kcp/receiving.go +++ b/transport/internet/kcp/receiving.go @@ -5,7 +5,7 @@ package kcp import ( "sync" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) type ReceivingWindow struct { diff --git a/transport/internet/kcp/segment.go b/transport/internet/kcp/segment.go index 1f3f31db7..c16635c4e 100644 --- a/transport/internet/kcp/segment.go +++ b/transport/internet/kcp/segment.go @@ -5,7 +5,7 @@ package kcp import ( "encoding/binary" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) // Command is a KCP command that indicate the purpose of a Segment. diff --git a/transport/internet/kcp/segment_test.go b/transport/internet/kcp/segment_test.go index 98734cbcf..6d6bd41d2 100644 --- a/transport/internet/kcp/segment_test.go +++ b/transport/internet/kcp/segment_test.go @@ -6,7 +6,7 @@ import ( "github.com/google/go-cmp/cmp" "github.com/google/go-cmp/cmp/cmpopts" - . "v2ray.com/core/transport/internet/kcp" + . "github.com/v2fly/v2ray-core/v4/transport/internet/kcp" ) func TestBadSegment(t *testing.T) { diff --git a/transport/internet/kcp/sending.go b/transport/internet/kcp/sending.go index 4d9931733..157062d31 100644 --- a/transport/internet/kcp/sending.go +++ b/transport/internet/kcp/sending.go @@ -6,7 +6,7 @@ import ( "container/list" "sync" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) type SendingWindow struct { diff --git a/transport/internet/quic/config.go b/transport/internet/quic/config.go index d9dcff3a4..3ff111a29 100644 --- a/transport/internet/quic/config.go +++ b/transport/internet/quic/config.go @@ -8,9 +8,10 @@ import ( "crypto/sha256" "golang.org/x/crypto/chacha20poly1305" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol" - "v2ray.com/core/transport/internet" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func getAuth(config *Config) (cipher.AEAD, error) { diff --git a/transport/internet/quic/config.pb.go b/transport/internet/quic/config.pb.go index f47d75999..ddd862345 100644 --- a/transport/internet/quic/config.pb.go +++ b/transport/internet/quic/config.pb.go @@ -8,12 +8,12 @@ package quic import ( proto "github.com/golang/protobuf/proto" + protocol "github.com/v2fly/v2ray-core/v4/common/protocol" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - protocol "v2ray.com/core/common/protocol" - serial "v2ray.com/core/common/serial" ) const ( @@ -112,15 +112,16 @@ var file_transport_internet_quic_config_proto_rawDesc = []byte{ 0x0b, 0x32, 0x26, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x73, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x2e, 0x54, 0x79, 0x70, 0x65, 0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x06, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x42, 0x77, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x50, 0x01, 0x5a, 0x26, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2f, 0x71, 0x75, 0x69, 0x63, 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, - 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, - 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x72, 0x42, 0x87, 0x01, 0x0a, 0x26, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x71, 0x75, 0x69, 0x63, 0x50, 0x01, 0x5a, 0x36, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, + 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x2f, 0x71, 0x75, 0x69, 0x63, 0xaa, 0x02, 0x22, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, + 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, + 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x51, 0x75, 0x69, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/transport/internet/quic/config.proto b/transport/internet/quic/config.proto index 23420e6d2..16de844af 100644 --- a/transport/internet/quic/config.proto +++ b/transport/internet/quic/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.quic; option csharp_namespace = "V2Ray.Core.Transport.Internet.Quic"; -option go_package = "v2ray.com/core/transport/internet/quic"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/quic"; option java_package = "com.v2ray.core.transport.internet.quic"; option java_multiple_files = true; diff --git a/transport/internet/quic/conn.go b/transport/internet/quic/conn.go index c59b2a7b6..59f35f119 100644 --- a/transport/internet/quic/conn.go +++ b/transport/internet/quic/conn.go @@ -9,10 +9,11 @@ import ( "time" "github.com/lucas-clemente/quic-go" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type sysConn struct { diff --git a/transport/internet/quic/dialer.go b/transport/internet/quic/dialer.go index daec007f5..d7f40ffa5 100644 --- a/transport/internet/quic/dialer.go +++ b/transport/internet/quic/dialer.go @@ -8,11 +8,12 @@ import ( "time" "github.com/lucas-clemente/quic-go" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/task" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/task" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) type sessionContext struct { diff --git a/transport/internet/quic/errors.generated.go b/transport/internet/quic/errors.generated.go index b43c161ac..2f47d0560 100644 --- a/transport/internet/quic/errors.generated.go +++ b/transport/internet/quic/errors.generated.go @@ -1,6 +1,6 @@ package quic -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/quic/hub.go b/transport/internet/quic/hub.go index 9e4947595..3bd64de0f 100644 --- a/transport/internet/quic/hub.go +++ b/transport/internet/quic/hub.go @@ -7,12 +7,13 @@ import ( "time" "github.com/lucas-clemente/quic-go" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) // Listener is an internet.Listener that listens for TCP connections. diff --git a/transport/internet/quic/pool.go b/transport/internet/quic/pool.go index 935a45068..9e79e9720 100644 --- a/transport/internet/quic/pool.go +++ b/transport/internet/quic/pool.go @@ -5,7 +5,7 @@ package quic import ( "sync" - "v2ray.com/core/common/bytespool" + "github.com/v2fly/v2ray-core/v4/common/bytespool" ) var pool *sync.Pool diff --git a/transport/internet/quic/quic.go b/transport/internet/quic/quic.go index 16bb0ab7b..00d2e0ac7 100644 --- a/transport/internet/quic/quic.go +++ b/transport/internet/quic/quic.go @@ -3,11 +3,11 @@ package quic import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen // Here is some modification needs to be done before update quic vendor. // * use bytespool in buffer_pool.go @@ -16,7 +16,7 @@ import ( // const protocolName = "quic" -const internalDomain = "quic.internal.v2ray.com" +const internalDomain = "quic.internal.v2fly.org" func init() { common.Must(internet.RegisterProtocolConfigCreator(protocolName, func() interface{} { diff --git a/transport/internet/quic/quic_test.go b/transport/internet/quic/quic_test.go index 73639e9e9..3e34b9e90 100644 --- a/transport/internet/quic/quic_test.go +++ b/transport/internet/quic/quic_test.go @@ -8,17 +8,17 @@ import ( "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/common/serial" - "v2ray.com/core/testing/servers/udp" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/headers/wireguard" - "v2ray.com/core/transport/internet/quic" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/testing/servers/udp" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/headers/wireguard" + "github.com/v2fly/v2ray-core/v4/transport/internet/quic" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) func TestQuicConnection(t *testing.T) { diff --git a/transport/internet/sockopt_linux_test.go b/transport/internet/sockopt_linux_test.go index 9221384cb..afead4d8d 100644 --- a/transport/internet/sockopt_linux_test.go +++ b/transport/internet/sockopt_linux_test.go @@ -5,10 +5,10 @@ import ( "syscall" "testing" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + . "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestSockOptMark(t *testing.T) { diff --git a/transport/internet/sockopt_test.go b/transport/internet/sockopt_test.go index 2bef2b2e9..d8ddaf8f0 100644 --- a/transport/internet/sockopt_test.go +++ b/transport/internet/sockopt_test.go @@ -5,10 +5,11 @@ import ( "testing" "github.com/google/go-cmp/cmp" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/testing/servers/tcp" - . "v2ray.com/core/transport/internet" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + . "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestTCPFastOpen(t *testing.T) { diff --git a/transport/internet/system_dialer.go b/transport/internet/system_dialer.go index d0ab52bb0..f46cb5484 100644 --- a/transport/internet/system_dialer.go +++ b/transport/internet/system_dialer.go @@ -5,8 +5,8 @@ import ( "syscall" "time" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" ) var ( diff --git a/transport/internet/system_listener.go b/transport/internet/system_listener.go index 48f233ddf..4aff71758 100644 --- a/transport/internet/system_listener.go +++ b/transport/internet/system_listener.go @@ -6,8 +6,9 @@ import ( "syscall" "github.com/pires/go-proxyproto" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" + + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" ) var ( diff --git a/transport/internet/system_listener_test.go b/transport/internet/system_listener_test.go index ae4136155..330e88277 100644 --- a/transport/internet/system_listener_test.go +++ b/transport/internet/system_listener_test.go @@ -5,8 +5,8 @@ import ( "net" "testing" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func TestRegisterListenerController(t *testing.T) { diff --git a/transport/internet/tcp/config.go b/transport/internet/tcp/config.go index f1bbcebb3..793410242 100644 --- a/transport/internet/tcp/config.go +++ b/transport/internet/tcp/config.go @@ -3,8 +3,8 @@ package tcp import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const protocolName = "tcp" diff --git a/transport/internet/tcp/config.pb.go b/transport/internet/tcp/config.pb.go index 93175faa4..11852d1d1 100644 --- a/transport/internet/tcp/config.pb.go +++ b/transport/internet/tcp/config.pb.go @@ -8,11 +8,11 @@ package tcp import ( proto "github.com/golang/protobuf/proto" + serial "github.com/v2fly/v2ray-core/v4/common/serial" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" reflect "reflect" sync "sync" - serial "v2ray.com/core/common/serial" ) const ( @@ -100,14 +100,15 @@ var file_transport_internet_tcp_config_proto_rawDesc = []byte{ 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x03, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x4a, 0x04, 0x08, 0x01, 0x10, - 0x02, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, - 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x50, 0x01, 0x5a, 0x25, 0x76, 0x32, - 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, - 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, - 0x74, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, - 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, 0x72, - 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x02, 0x42, 0x84, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, + 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x63, 0x70, 0x50, 0x01, 0x5a, 0x35, 0x67, + 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, + 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, + 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, + 0x2f, 0x74, 0x63, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, + 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, + 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x63, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/transport/internet/tcp/config.proto b/transport/internet/tcp/config.proto index 3915ba80f..823a2d8e5 100644 --- a/transport/internet/tcp/config.proto +++ b/transport/internet/tcp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.tcp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Tcp"; -option go_package = "v2ray.com/core/transport/internet/tcp"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/tcp"; option java_package = "com.v2ray.core.transport.internet.tcp"; option java_multiple_files = true; diff --git a/transport/internet/tcp/dialer.go b/transport/internet/tcp/dialer.go index e6f414e0b..f06bc7a03 100644 --- a/transport/internet/tcp/dialer.go +++ b/transport/internet/tcp/dialer.go @@ -5,11 +5,11 @@ package tcp import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) // Dial dials a new TCP connection to the given destination. diff --git a/transport/internet/tcp/errors.generated.go b/transport/internet/tcp/errors.generated.go index e1ad6289b..6f16e9b1d 100644 --- a/transport/internet/tcp/errors.generated.go +++ b/transport/internet/tcp/errors.generated.go @@ -1,6 +1,6 @@ package tcp -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/tcp/hub.go b/transport/internet/tcp/hub.go index c5c42bb99..c856679f0 100644 --- a/transport/internet/tcp/hub.go +++ b/transport/internet/tcp/hub.go @@ -8,11 +8,11 @@ import ( "strings" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) // Listener is an internet.Listener that listens for TCP connections. diff --git a/transport/internet/tcp/sockopt_freebsd.go b/transport/internet/tcp/sockopt_freebsd.go index 58f3dcd0d..54906f673 100644 --- a/transport/internet/tcp/sockopt_freebsd.go +++ b/transport/internet/tcp/sockopt_freebsd.go @@ -4,8 +4,8 @@ package tcp import ( - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // GetOriginalDestination from tcp conn diff --git a/transport/internet/tcp/sockopt_linux.go b/transport/internet/tcp/sockopt_linux.go index d4f0e36ed..c7c44b5b2 100644 --- a/transport/internet/tcp/sockopt_linux.go +++ b/transport/internet/tcp/sockopt_linux.go @@ -6,8 +6,8 @@ package tcp import ( "syscall" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const SO_ORIGINAL_DST = 80 // nolint: golint,stylecheck diff --git a/transport/internet/tcp/sockopt_linux_test.go b/transport/internet/tcp/sockopt_linux_test.go index b4c77638d..6340a7eaf 100644 --- a/transport/internet/tcp/sockopt_linux_test.go +++ b/transport/internet/tcp/sockopt_linux_test.go @@ -7,10 +7,10 @@ import ( "strings" "testing" - "v2ray.com/core/common" - "v2ray.com/core/testing/servers/tcp" - "v2ray.com/core/transport/internet" - . "v2ray.com/core/transport/internet/tcp" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" + "github.com/v2fly/v2ray-core/v4/transport/internet" + . "github.com/v2fly/v2ray-core/v4/transport/internet/tcp" ) func TestGetOriginalDestination(t *testing.T) { diff --git a/transport/internet/tcp/sockopt_other.go b/transport/internet/tcp/sockopt_other.go index 2d4d4708e..beb199032 100644 --- a/transport/internet/tcp/sockopt_other.go +++ b/transport/internet/tcp/sockopt_other.go @@ -4,8 +4,8 @@ package tcp import ( - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func GetOriginalDestination(conn internet.Connection) (net.Destination, error) { diff --git a/transport/internet/tcp/tcp.go b/transport/internet/tcp/tcp.go index 052d4eb75..1c1ee9439 100644 --- a/transport/internet/tcp/tcp.go +++ b/transport/internet/tcp/tcp.go @@ -1,3 +1,3 @@ package tcp -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/tcp_hub.go b/transport/internet/tcp_hub.go index 310178445..3231f288e 100644 --- a/transport/internet/tcp_hub.go +++ b/transport/internet/tcp_hub.go @@ -3,7 +3,7 @@ package internet import ( "context" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) var ( diff --git a/transport/internet/tls/config.go b/transport/internet/tls/config.go index 123aebfc3..ae310d533 100644 --- a/transport/internet/tls/config.go +++ b/transport/internet/tls/config.go @@ -9,9 +9,9 @@ import ( "sync" "time" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) var ( diff --git a/transport/internet/tls/config.pb.go b/transport/internet/tls/config.pb.go index 73ed6ba9a..b078396d1 100644 --- a/transport/internet/tls/config.pb.go +++ b/transport/internet/tls/config.pb.go @@ -273,15 +273,16 @@ var file_transport_internet_tls_config_proto_rawDesc = []byte{ 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x13, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x5f, 0x73, 0x79, 0x73, 0x74, 0x65, 0x6d, 0x5f, 0x72, 0x6f, 0x6f, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x11, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x53, 0x79, 0x73, 0x74, 0x65, 0x6d, - 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, - 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, 0x5a, - 0x25, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, - 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, - 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, - 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, - 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x33, + 0x52, 0x6f, 0x6f, 0x74, 0x42, 0x84, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, + 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x74, 0x6c, 0x73, 0x50, 0x01, + 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, + 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, + 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, + 0x6e, 0x65, 0x74, 0x2f, 0x74, 0x6c, 0x73, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, + 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, + 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x54, 0x6c, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, + 0x74, 0x6f, 0x33, } var ( diff --git a/transport/internet/tls/config.proto b/transport/internet/tls/config.proto index 4d566276c..ed5137b27 100644 --- a/transport/internet/tls/config.proto +++ b/transport/internet/tls/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.tls; option csharp_namespace = "V2Ray.Core.Transport.Internet.Tls"; -option go_package = "v2ray.com/core/transport/internet/tls"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/tls"; option java_package = "com.v2ray.core.transport.internet.tls"; option java_multiple_files = true; diff --git a/transport/internet/tls/config_test.go b/transport/internet/tls/config_test.go index e0f1f16c5..804e940d0 100644 --- a/transport/internet/tls/config_test.go +++ b/transport/internet/tls/config_test.go @@ -6,9 +6,9 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/protocol/tls/cert" - . "v2ray.com/core/transport/internet/tls" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + . "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) func TestCertificateIssuing(t *testing.T) { @@ -23,7 +23,7 @@ func TestCertificateIssuing(t *testing.T) { tlsConfig := c.GetTLSConfig() v2rayCert, err := tlsConfig.GetCertificate(&gotls.ClientHelloInfo{ - ServerName: "www.v2ray.com", + ServerName: "www.v2fly.org", }) common.Must(err) @@ -36,7 +36,7 @@ func TestCertificateIssuing(t *testing.T) { func TestExpiredCertificate(t *testing.T) { caCert := cert.MustGenerate(nil, cert.Authority(true), cert.KeyUsage(x509.KeyUsageCertSign)) - expiredCert := cert.MustGenerate(caCert, cert.NotAfter(time.Now().Add(time.Minute*-2)), cert.CommonName("www.v2ray.com"), cert.DNSNames("www.v2ray.com")) + expiredCert := cert.MustGenerate(caCert, cert.NotAfter(time.Now().Add(time.Minute*-2)), cert.CommonName("www.v2fly.org"), cert.DNSNames("www.v2fly.org")) certificate := ParseCertificate(caCert) certificate.Usage = Certificate_AUTHORITY_ISSUE @@ -52,7 +52,7 @@ func TestExpiredCertificate(t *testing.T) { tlsConfig := c.GetTLSConfig() v2rayCert, err := tlsConfig.GetCertificate(&gotls.ClientHelloInfo{ - ServerName: "www.v2ray.com", + ServerName: "www.v2fly.org", }) common.Must(err) @@ -89,9 +89,9 @@ func BenchmarkCertificateIssuing(b *testing.B) { for i := 0; i < b.N; i++ { _, _ = tlsConfig.GetCertificate(&gotls.ClientHelloInfo{ - ServerName: "www.v2ray.com", + ServerName: "www.v2fly.org", }) - delete(tlsConfig.NameToCertificate, "www.v2ray.com") + delete(tlsConfig.NameToCertificate, "www.v2fly.org") tlsConfig.Certificates = tlsConfig.Certificates[:lenCerts] } } diff --git a/transport/internet/tls/errors.generated.go b/transport/internet/tls/errors.generated.go index 080eeb749..d925cf647 100644 --- a/transport/internet/tls/errors.generated.go +++ b/transport/internet/tls/errors.generated.go @@ -1,6 +1,6 @@ package tls -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/tls/tls.go b/transport/internet/tls/tls.go index a102e1f08..9b62600c7 100644 --- a/transport/internet/tls/tls.go +++ b/transport/internet/tls/tls.go @@ -5,11 +5,11 @@ package tls import ( "crypto/tls" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" ) -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen var ( _ buf.Writer = (*Conn)(nil) diff --git a/transport/internet/udp/config.go b/transport/internet/udp/config.go index f79568cdc..fb77c23ba 100644 --- a/transport/internet/udp/config.go +++ b/transport/internet/udp/config.go @@ -1,8 +1,8 @@ package udp import ( - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/transport/internet/udp/config.pb.go b/transport/internet/udp/config.pb.go index 12e75ee3b..bfcca97a8 100644 --- a/transport/internet/udp/config.pb.go +++ b/transport/internet/udp/config.pb.go @@ -71,14 +71,16 @@ var file_transport_internet_udp_config_proto_rawDesc = []byte{ 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x21, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x22, 0x08, 0x0a, 0x06, 0x43, 0x6f, 0x6e, 0x66, - 0x69, 0x67, 0x42, 0x74, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, - 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, - 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x50, 0x01, 0x5a, 0x25, 0x76, - 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, - 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, - 0x2f, 0x75, 0x64, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, - 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, 0x65, - 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x55, 0x64, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x69, 0x67, 0x42, 0x84, 0x01, 0x0a, 0x25, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, + 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, + 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x75, 0x64, 0x70, 0x50, 0x01, 0x5a, 0x35, + 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, + 0x2f, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, + 0x74, 0x2f, 0x75, 0x64, 0x70, 0xaa, 0x02, 0x21, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, + 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, 0x6e, 0x74, + 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x55, 0x64, 0x70, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x33, } var ( diff --git a/transport/internet/udp/config.proto b/transport/internet/udp/config.proto index ff4080026..16a18495b 100644 --- a/transport/internet/udp/config.proto +++ b/transport/internet/udp/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.udp; option csharp_namespace = "V2Ray.Core.Transport.Internet.Udp"; -option go_package = "v2ray.com/core/transport/internet/udp"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/udp"; option java_package = "com.v2ray.core.transport.internet.udp"; option java_multiple_files = true; diff --git a/transport/internet/udp/dialer.go b/transport/internet/udp/dialer.go index 5ef5a4c0b..727e178d8 100644 --- a/transport/internet/udp/dialer.go +++ b/transport/internet/udp/dialer.go @@ -3,9 +3,9 @@ package udp import ( "context" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) func init() { diff --git a/transport/internet/udp/dispatcher.go b/transport/internet/udp/dispatcher.go index f83bf6a6f..b205074bb 100644 --- a/transport/internet/udp/dispatcher.go +++ b/transport/internet/udp/dispatcher.go @@ -6,16 +6,15 @@ import ( "sync" "time" - "v2ray.com/core/common/signal/done" - - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/common/session" - "v2ray.com/core/common/signal" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport" ) type ResponseCallback func(ctx context.Context, packet *udp.Packet) diff --git a/transport/internet/udp/dispatcher_test.go b/transport/internet/udp/dispatcher_test.go index e75aa5a17..45d500272 100644 --- a/transport/internet/udp/dispatcher_test.go +++ b/transport/internet/udp/dispatcher_test.go @@ -6,14 +6,14 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/features/routing" - "v2ray.com/core/transport" - . "v2ray.com/core/transport/internet/udp" - "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/transport" + . "github.com/v2fly/v2ray-core/v4/transport/internet/udp" + "github.com/v2fly/v2ray-core/v4/transport/pipe" ) type TestDispatcher struct { diff --git a/transport/internet/udp/errors.generated.go b/transport/internet/udp/errors.generated.go index 62a875701..690703f19 100644 --- a/transport/internet/udp/errors.generated.go +++ b/transport/internet/udp/errors.generated.go @@ -1,6 +1,6 @@ package udp -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/udp/hub.go b/transport/internet/udp/hub.go index d9a00b1b9..2801174a2 100644 --- a/transport/internet/udp/hub.go +++ b/transport/internet/udp/hub.go @@ -3,10 +3,10 @@ package udp import ( "context" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/udp" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/udp" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) type HubOption func(h *Hub) diff --git a/transport/internet/udp/hub_freebsd.go b/transport/internet/udp/hub_freebsd.go index 35d334640..df0d5dbf7 100644 --- a/transport/internet/udp/hub_freebsd.go +++ b/transport/internet/udp/hub_freebsd.go @@ -7,8 +7,8 @@ import ( "encoding/gob" "io" - "v2ray.com/core/common/net" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) // RetrieveOriginalDest from stored laddr, caddr diff --git a/transport/internet/udp/hub_linux.go b/transport/internet/udp/hub_linux.go index c7bbf1b37..391453150 100644 --- a/transport/internet/udp/hub_linux.go +++ b/transport/internet/udp/hub_linux.go @@ -6,7 +6,8 @@ import ( "syscall" "golang.org/x/sys/unix" - "v2ray.com/core/common/net" + + "github.com/v2fly/v2ray-core/v4/common/net" ) func RetrieveOriginalDest(oob []byte) net.Destination { diff --git a/transport/internet/udp/hub_other.go b/transport/internet/udp/hub_other.go index d4ab30e8f..4106139a0 100644 --- a/transport/internet/udp/hub_other.go +++ b/transport/internet/udp/hub_other.go @@ -3,7 +3,7 @@ package udp import ( - "v2ray.com/core/common/net" + "github.com/v2fly/v2ray-core/v4/common/net" ) func RetrieveOriginalDest(oob []byte) net.Destination { diff --git a/transport/internet/udp/udp.go b/transport/internet/udp/udp.go index 444da1cdd..613b44349 100644 --- a/transport/internet/udp/udp.go +++ b/transport/internet/udp/udp.go @@ -1,5 +1,5 @@ package udp -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen const protocolName = "udp" diff --git a/transport/internet/websocket/config.go b/transport/internet/websocket/config.go index 982cf7309..acd226633 100644 --- a/transport/internet/websocket/config.go +++ b/transport/internet/websocket/config.go @@ -5,8 +5,8 @@ package websocket import ( "net/http" - "v2ray.com/core/common" - "v2ray.com/core/transport/internet" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/transport/internet" ) const protocolName = "websocket" diff --git a/transport/internet/websocket/config.pb.go b/transport/internet/websocket/config.pb.go index 1bfc582f0..6b918f0b9 100644 --- a/transport/internet/websocket/config.pb.go +++ b/transport/internet/websocket/config.pb.go @@ -165,11 +165,12 @@ var file_transport_internet_websocket_config_proto_rawDesc = []byte{ 0x0a, 0x15, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x5f, 0x70, 0x72, 0x6f, 0x78, 0x79, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x63, 0x6f, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x13, 0x61, 0x63, 0x63, 0x65, 0x70, 0x74, 0x50, 0x72, 0x6f, 0x78, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x63, - 0x6f, 0x6c, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x86, 0x01, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, + 0x6f, 0x6c, 0x4a, 0x04, 0x08, 0x01, 0x10, 0x02, 0x42, 0x96, 0x01, 0x0a, 0x2b, 0x63, 0x6f, 0x6d, 0x2e, 0x76, 0x32, 0x72, 0x61, 0x79, 0x2e, 0x63, 0x6f, 0x72, 0x65, 0x2e, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2e, 0x77, - 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x2b, 0x76, 0x32, 0x72, 0x61, - 0x79, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, + 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0x50, 0x01, 0x5a, 0x3b, 0x67, 0x69, 0x74, 0x68, + 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x76, 0x32, 0x66, 0x6c, 0x79, 0x2f, 0x76, 0x32, 0x72, + 0x61, 0x79, 0x2d, 0x63, 0x6f, 0x72, 0x65, 0x2f, 0x76, 0x34, 0x2f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x65, 0x74, 0x2f, 0x77, 0x65, 0x62, 0x73, 0x6f, 0x63, 0x6b, 0x65, 0x74, 0xaa, 0x02, 0x27, 0x56, 0x32, 0x52, 0x61, 0x79, 0x2e, 0x43, 0x6f, 0x72, 0x65, 0x2e, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x70, 0x6f, 0x72, 0x74, 0x2e, 0x49, diff --git a/transport/internet/websocket/config.proto b/transport/internet/websocket/config.proto index 7d53f9d13..fa376f494 100644 --- a/transport/internet/websocket/config.proto +++ b/transport/internet/websocket/config.proto @@ -2,7 +2,7 @@ syntax = "proto3"; package v2ray.core.transport.internet.websocket; option csharp_namespace = "V2Ray.Core.Transport.Internet.Websocket"; -option go_package = "v2ray.com/core/transport/internet/websocket"; +option go_package = "github.com/v2fly/v2ray-core/v4/transport/internet/websocket"; option java_package = "com.v2ray.core.transport.internet.websocket"; option java_multiple_files = true; diff --git a/transport/internet/websocket/connection.go b/transport/internet/websocket/connection.go index c63d6b57b..2f45e3130 100644 --- a/transport/internet/websocket/connection.go +++ b/transport/internet/websocket/connection.go @@ -8,9 +8,10 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/errors" - "v2ray.com/core/common/serial" + + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/errors" + "github.com/v2fly/v2ray-core/v4/common/serial" ) var ( diff --git a/transport/internet/websocket/dialer.go b/transport/internet/websocket/dialer.go index 7545f8537..e3b782596 100644 --- a/transport/internet/websocket/dialer.go +++ b/transport/internet/websocket/dialer.go @@ -7,11 +7,12 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) // Dial dials a WebSocket connection to the given destination. diff --git a/transport/internet/websocket/errors.generated.go b/transport/internet/websocket/errors.generated.go index 1633cdf02..533f42122 100644 --- a/transport/internet/websocket/errors.generated.go +++ b/transport/internet/websocket/errors.generated.go @@ -1,6 +1,6 @@ package websocket -import "v2ray.com/core/common/errors" +import "github.com/v2fly/v2ray-core/v4/common/errors" type errPathObjHolder struct{} diff --git a/transport/internet/websocket/hub.go b/transport/internet/websocket/hub.go index 0439a05d7..4537dd38d 100644 --- a/transport/internet/websocket/hub.go +++ b/transport/internet/websocket/hub.go @@ -10,12 +10,13 @@ import ( "time" "github.com/gorilla/websocket" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - http_proto "v2ray.com/core/common/protocol/http" - "v2ray.com/core/common/session" - "v2ray.com/core/transport/internet" - v2tls "v2ray.com/core/transport/internet/tls" + + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + http_proto "github.com/v2fly/v2ray-core/v4/common/protocol/http" + "github.com/v2fly/v2ray-core/v4/common/session" + "github.com/v2fly/v2ray-core/v4/transport/internet" + v2tls "github.com/v2fly/v2ray-core/v4/transport/internet/tls" ) type requestHandler struct { diff --git a/transport/internet/websocket/ws.go b/transport/internet/websocket/ws.go index 157f436a7..54bf9e7a3 100644 --- a/transport/internet/websocket/ws.go +++ b/transport/internet/websocket/ws.go @@ -4,4 +4,4 @@ Websocket transport implements an HTTP(S) compliable, surveillance proof transpo */ package websocket -//go:generate go run v2ray.com/core/common/errors/errorgen +//go:generate go run github.com/v2fly/v2ray-core/v4/common/errors/errorgen diff --git a/transport/internet/websocket/ws_test.go b/transport/internet/websocket/ws_test.go index 0cfb3697a..c912d8c7e 100644 --- a/transport/internet/websocket/ws_test.go +++ b/transport/internet/websocket/ws_test.go @@ -6,12 +6,12 @@ import ( "testing" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol/tls/cert" - "v2ray.com/core/transport/internet" - "v2ray.com/core/transport/internet/tls" - . "v2ray.com/core/transport/internet/websocket" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/net" + "github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert" + "github.com/v2fly/v2ray-core/v4/transport/internet" + "github.com/v2fly/v2ray-core/v4/transport/internet/tls" + . "github.com/v2fly/v2ray-core/v4/transport/internet/websocket" ) func Test_listenWSAndDial(t *testing.T) { diff --git a/transport/link.go b/transport/link.go index 0a17f8dba..be8a58fb8 100644 --- a/transport/link.go +++ b/transport/link.go @@ -1,6 +1,6 @@ package transport -import "v2ray.com/core/common/buf" +import "github.com/v2fly/v2ray-core/v4/common/buf" // Link is a utility for connecting between an inbound and an outbound proxy handler. type Link struct { diff --git a/transport/pipe/impl.go b/transport/pipe/impl.go index d560992b0..4d711f045 100644 --- a/transport/pipe/impl.go +++ b/transport/pipe/impl.go @@ -7,10 +7,10 @@ import ( "sync" "time" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/done" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/signal/done" ) type state byte diff --git a/transport/pipe/pipe.go b/transport/pipe/pipe.go index 4c9ced01d..b21abd299 100644 --- a/transport/pipe/pipe.go +++ b/transport/pipe/pipe.go @@ -3,9 +3,9 @@ package pipe import ( "context" - "v2ray.com/core/common/signal" - "v2ray.com/core/common/signal/done" - "v2ray.com/core/features/policy" + "github.com/v2fly/v2ray-core/v4/common/signal" + "github.com/v2fly/v2ray-core/v4/common/signal/done" + "github.com/v2fly/v2ray-core/v4/features/policy" ) // Option for creating new Pipes. diff --git a/transport/pipe/pipe_test.go b/transport/pipe/pipe_test.go index 1f7fb9563..984ebf228 100644 --- a/transport/pipe/pipe_test.go +++ b/transport/pipe/pipe_test.go @@ -9,9 +9,9 @@ import ( "github.com/google/go-cmp/cmp" "golang.org/x/sync/errgroup" - "v2ray.com/core/common" - "v2ray.com/core/common/buf" - . "v2ray.com/core/transport/pipe" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/buf" + . "github.com/v2fly/v2ray-core/v4/transport/pipe" ) func TestPipeReadWrite(t *testing.T) { diff --git a/transport/pipe/reader.go b/transport/pipe/reader.go index 0f0b5b9c2..b5c0181ae 100644 --- a/transport/pipe/reader.go +++ b/transport/pipe/reader.go @@ -3,7 +3,7 @@ package pipe import ( "time" - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) // Reader is a buf.Reader that reads content from a pipe. diff --git a/transport/pipe/writer.go b/transport/pipe/writer.go index f95340788..b3cb8c041 100644 --- a/transport/pipe/writer.go +++ b/transport/pipe/writer.go @@ -1,7 +1,7 @@ package pipe import ( - "v2ray.com/core/common/buf" + "github.com/v2fly/v2ray-core/v4/common/buf" ) // Writer is a buf.Writer that writes data into a pipe. diff --git a/v2ray.go b/v2ray.go index 0dfd8b5a5..6a0278f08 100644 --- a/v2ray.go +++ b/v2ray.go @@ -7,16 +7,16 @@ import ( "reflect" "sync" - "v2ray.com/core/common" - "v2ray.com/core/common/serial" - "v2ray.com/core/features" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/dns/localdns" - "v2ray.com/core/features/inbound" - "v2ray.com/core/features/outbound" - "v2ray.com/core/features/policy" - "v2ray.com/core/features/routing" - "v2ray.com/core/features/stats" + "github.com/v2fly/v2ray-core/v4/common" + "github.com/v2fly/v2ray-core/v4/common/serial" + "github.com/v2fly/v2ray-core/v4/features" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/dns/localdns" + "github.com/v2fly/v2ray-core/v4/features/inbound" + "github.com/v2fly/v2ray-core/v4/features/outbound" + "github.com/v2fly/v2ray-core/v4/features/policy" + "github.com/v2fly/v2ray-core/v4/features/routing" + "github.com/v2fly/v2ray-core/v4/features/stats" ) // Server is an instance of V2Ray. At any time, there must be at most one Server instance running. diff --git a/v2ray_test.go b/v2ray_test.go index 7bb1a7cc9..dcf692a98 100644 --- a/v2ray_test.go +++ b/v2ray_test.go @@ -4,21 +4,21 @@ import ( "testing" "github.com/golang/protobuf/proto" - . "v2ray.com/core" - "v2ray.com/core/app/dispatcher" - "v2ray.com/core/app/proxyman" - "v2ray.com/core/common" - "v2ray.com/core/common/net" - "v2ray.com/core/common/protocol" - "v2ray.com/core/common/serial" - "v2ray.com/core/common/uuid" - "v2ray.com/core/features/dns" - "v2ray.com/core/features/dns/localdns" - _ "v2ray.com/core/main/distro/all" - "v2ray.com/core/proxy/dokodemo" - "v2ray.com/core/proxy/vmess" - "v2ray.com/core/proxy/vmess/outbound" - "v2ray.com/core/testing/servers/tcp" + . "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/common" + "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/common/uuid" + "github.com/v2fly/v2ray-core/v4/features/dns" + "github.com/v2fly/v2ray-core/v4/features/dns/localdns" + _ "github.com/v2fly/v2ray-core/v4/main/distro/all" + "github.com/v2fly/v2ray-core/v4/proxy/dokodemo" + "github.com/v2fly/v2ray-core/v4/proxy/vmess" + "github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound" + "github.com/v2fly/v2ray-core/v4/testing/servers/tcp" ) func TestV2RayDependency(t *testing.T) {