diff --git a/app/commander/commander.go b/app/commander/commander.go index e0196af6697..1a3c8ded572 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 2741de5da28..af8b603d8d1 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 637202b7509..f505004e5af 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 406ec0cae38..972bdd5183a 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 0a849ddd106..b89ae6312da 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 cf4e6a804d4..4c0604324f0 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 a9b0e5143a5..749f8607db0 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 b461589c168..9e6295abdbc 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 c4629cc4fcf..e6e21f0ba55 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 70c6093215a..b24b2422d32 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 e11616099eb..b0b0ed87825 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 cab29255147..17d7811f137 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 613dc8eba2b..92f0d5bebf6 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 9b1c3a063d7..1bc5a8f0463 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 cdac8d9aae2..841b2d87348 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 e1e7d2de067..7c3fda4ddd6 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 68dcbe831a0..fcc1f8a5894 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 cba15eec415..22fb9393b0d 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 8c0c5dfe272..4c47137644e 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 bdccde2e559..996c96c38bb 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 955962bcb8c..8ddfdffdfc4 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 24cc6927002..689f2934f12 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 ba70372f07c..438eb646ef0 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 c8ad60edae3..c03d2a86506 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 22ff3ceb144..0d2d9a61726 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 0e55e5bd5b2..03703e7288a 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 4ebcf8005df..0dabda1b333 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 9f64b38630a..a7d90dab956 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 8484b0c2b2e..1ddd587ac85 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 051a63bc482..1bae9485e04 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 14148751679..5846f62137c 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 22aab78e5f2..3cca0f097f1 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 b458be6f212..9507d247c25 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 9fa01b4b11b..d67671a1b93 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 10a4be28c9c..f8ce9a92303 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 c6265e9f840..4a15fdec883 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 3001c231f34..9664a67280c 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 35baeb7f5d7..58777c2d3bc 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 9a507ec796e..bffa1390226 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 a6b6b5c21e9..47547e0ba26 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 be96d7578e2..d01395f57de 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 31518b5707a..a6cbd1e4fca 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 369923c8345..a312ae6955c 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 66f78051017..3b1f040e544 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 c97b3b32b21..926e61e7a36 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 2931b713f2b..eeaa1d6e561 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 3088c8116b3..e5ffeaa3f6f 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 ae78be3b3e4..e492ffa0ce8 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 c7ea5a80585..ceb5fd53237 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 41bb7e83204..1d7901e1171 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 adf09448a16..715c97b0619 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 2454a567d9f..f68d18328a7 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 cc07fa3f865..b6044f3fb85 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 123e849923b..f320ff8cdd2 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 205fe3d668b..84ebda7b6c1 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 8f2a6175910..a091ae2bfbb 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 4ae0b028524..8082e23fc49 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 6586bf0c127..c60c431d0c0 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 e653cdadf0a..3c645db2321 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 71004ad5fed..77749e41b2c 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 d09e0a9a394..dabcfaf5e79 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 66f78051017..3b1f040e544 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 f8ff8401577..a6409d7606b 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 ca9e625c0c7..9c2b68ab135 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 33014416ce8..8be2f3f1803 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 f20920699bb..2750337240a 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 90d805b1e7b..91f661e2161 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 947205e8636..df818cd3ce9 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 38f86910da1..30f82c20dde 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 37e984d8758..1d0f494bd2c 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 f899e6b8de2..5e5ba1216d1 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 b3b6e0545a8..8c8169573b1 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 e01c7bb08e6..71b464e3bce 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 5027454850e..1755ed3d2d0 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 04259baeee5..623db4af178 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 18833d8ca2d..b165f760ae7 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 53c81fbc48f..3aabf740ca1 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 e72207995bf..7300553a297 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 ed846fe0c79..34066f21948 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 aa4660a5b27..27bf1083283 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 a1d2628630a..9609a79c9d3 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 0cede39229c..53088b6de04 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 6d777829dd1..52a541ed0dd 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 1dceee0862e..a12a8e4b7e6 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 65e732542ed..e7d4854594f 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 258ff1a09f3..3b4e584bb61 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 c6a242e6cc1..20aa425c538 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 66f78051017..3b1f040e544 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 9da16378b81..9c87a6a1cfd 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 2688bc38b90..f8c8ffc4722 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 9c73393ea20..c3c6ae006de 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 468970de373..20fb0c6b970 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 62b0ada7c0c..16b8a9527e7 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 5c96632dec5..f39caabe56d 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 66f7594705e..d8efd6f6176 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 0bd943f5d11..839616b186d 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 2615c2c8276..45626585ca9 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 080534d6d3a..e78f94b99a7 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 2fd54468c92..265a33bc09b 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 09184bf5798..90c69e18581 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 434af86b327..49c9bb43cce 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 fb0017854d8..d52b5c54fc8 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 11c4d245e80..3ebc518cbf6 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 5bc4bfc006a..387fd6e8b98 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 66f78051017..3b1f040e544 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 8c43010c3b8..95836a2510b 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 db63e9a3633..c876d0b4ed6 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 f2594e1ee69..80d56c20680 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 c2489bea1d7..5ded551d121 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 3b881c33183..10ece3a7d3c 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 1641021dcf4..d6f166bb9b3 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 7eb532b8b53..3bdaf8b01ba 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 8579694c38a..5d0679723c2 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 83db8ea3345..fa1de3cfe77 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 34961c8f6b8..7c748865251 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 87a9518e460..38c33028e79 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 5142a74d38d..3da4008c4a4 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 5853cd0cfa4..fd16e0c3bd4 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 751dd61939d..dd0c8f3c948 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 71ca773be53..b49f3bbe6bc 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 f0d2776b649..cfd35523505 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 4f5d19820b0..db032ffb7a4 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 91085109400..d9cea276905 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 cc9b3eab032..22c1f385105 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 b2a3627d2e8..d5dbc4ad04c 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 8e22a16d60f..60ef104c04f 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 39df1ef0bee..1e11609b166 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 e2bb767f68a..0e0516f0ec3 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 2d0a929baf8..6ef3531bb05 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 7b01f9ad7dc..f1868bf086a 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 b2415b3e830..1137c5bdc5d 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 63cd9d5576a..69117ae93a1 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 17a2f1b6087..fbd654848f3 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 c1c71d96fe2..6a888eb2bb2 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 85946acf200..2fe0b697fd3 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 d7a7c6b7ca7..1303364c605 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 164336d0f75..64410d19142 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 7fd71b58380..55e4b9ccab7 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 0adb1a2a918..74b5df88d28 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 88a2f2ad394..8143bd36cf8 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 19a3a25cf4a..46d8f091277 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 39d771aed9e..763ab8358ff 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 a658378f933..b1a128b46c2 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 0c5d71fd2b5..37cb33a03e2 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 f7bbefe47ec..0d7278d8e1a 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 bea455cc08d..15483ea9ac4 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 b8228a1e18d..e51e6aa8296 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 0e569b9fb52..cac2ac69c6e 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 789426d928a..aaa0b448af6 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 423901b73a7..56e7168b683 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 affe5b7a470..45b23599d3e 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 59c893447e4..7556f25ae9f 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 63755e299ca..d29fe67eddd 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 7360c6498b9..72be4f40fe1 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 9ce8ca3c6c8..fcb91ad6c5d 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 90ea1cfd56d..fd8f8919525 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 b39b2c6cbbc..967037c2c46 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 522a6e33bb8..defb66a58a1 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 4d2ac03271a..cabf1141539 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 afbb3a1575d..c072f48a529 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 35b05a76afe..7e204c9ef81 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 3d7f6fb79b3..045b6fa79a7 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 4783516207f..ac7fb169222 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 c4f9ca9206f..233e15bfe85 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 84764babe54..5565b573d34 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 7fb659a5d6d..26e75a2de8d 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 c28852d9bf3..d9172c529e3 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 3fadaadd414..eecc24efd65 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 2149030f788..5f53a42c8d7 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 8a461630775..740d89c677a 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 f271beef969..6bade6af9da 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 c4e24632780..9ed67e1ba4c 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 11f66960c02..9aab13b2c5b 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 5ba5d53ad4d..45ac96dc09f 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 e3cf99fb48e..5884f2ce2c4 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 172e516db1c..b1fc1535287 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 925ac620762..b12355ed774 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 87dbc05c964..8510ee9252b 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 8e8e1b152f2..fcae35606c9 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 bed263eb8d9..aba741d1db6 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 f668e0ec8fc..9acc9a9a788 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 3ee617bde99..6922f2a6c24 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 91233667c7f..e75e7efcbff 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 b41f694921a..5fb690aa5cb 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 6da185cffe3..845782b0082 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 8cdb51fea4d..f02e9b682e3 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 150f643fb3c..e98965e4b43 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 8e9c19dfaad..ae86a224af1 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 a0285f23d91..c7a2184c7cc 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 ba70372f07c..438eb646ef0 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 e1a75932675..7a15296a955 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 2b52880a3a0..0c545173e8c 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 83a5fdd6df8..11bb641d96e 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 1541dc88891..a5e3cf248aa 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 907947d3f7b..943d7d6f7ae 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 1dfe4d027a2..d87e8dbf62e 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 5716d07521f..8c453909741 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 9974dd2773f..b96c947eb93 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 82f3b1ae968..3e7eb154c7f 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 f7a32e06fd7..6d15970b39c 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 bc55336ddba..94969adad66 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 41d99d0a83f..90f3b89cbad 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 54fbbf43d5c..7adb294c23f 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 d462b4406ef..4cdf1517c2e 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 1212693c43d..ff719d26757 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 7cd6cb78390..bf01c19a7ad 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 47ecfe0a552..55e9d6bc6aa 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 0c0d145d86e..19ab60079cf 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 6ddeed738aa..82fac10c99e 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 8f96db00e11..28c0a8cc034 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 830387966f8..a2ce828835a 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 9695be344bb..a8ba360ef61 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 a4df5c7964b..2e3cd2b707e 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 9f11b490a24..b0e50ce1d13 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 67bcf658bd1..c5aded72ab1 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 22442e02adc..4badfa0048a 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 41d1b34ec87..68927243471 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 db19a63d656..fac5cc43bdf 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 30aed1f1ee1..31cf07ec2f8 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 9d5ae9042ac..a684f43097f 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 f74f96af571..b9c96b24271 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 6fe8d99dbda..a7cd620c7fc 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 082ea0f2357..dbe701ad931 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 d32250ed193..b00276e8383 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 e5f3abd1aa2..397b99031b1 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 2b67e2baa9f..1f41b937bb2 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 2b58acbb34f..be87270aa24 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 e71ed8698cd..16146200f8c 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 40fda7ef254..d26848bca47 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 afda177544a..47cf432fe5e 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 d8e0106c79e..622ab24835e 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 5a0673a30fe..930fa0b9e8c 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 660594a9f2d..482902195cd 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 2fe6ee34e08..1d980eee70e 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 83317fa38e6..03ae644de1a 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 f9cf2e73c6b..2332345843a 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 42d3b8abed4..a0a7a2cddc4 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 cd2b58fadae..13ac0272417 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 1fc52be50b4..5483e57012a 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 0a9b87bb194..2e5e1ff06a1 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 cd99155efb8..64caba4380c 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 9679942a09c..23413d3da4b 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 695406086aa..9f8e606dbfa 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 bcadbb18b11..ae5b6aee716 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 96fc87c2a58..ac7ad371da4 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 4f97f735927..37476642cd3 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 f66b308589c..f52a48de5b0 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 3349895ce27..a1b7c84dd5a 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 2f4c8644fc0..0b44be169a7 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 76f635916bf..0eed4205e2c 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 0206d83072b..1d83f57a146 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 025719075a2..36ab66a65eb 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 c63727c750a..12171251783 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 7c1082afc92..24180612e50 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 5cd0adbd154..a609f3b44c9 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 7a31b8947f4..896af40dca8 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 05ba0758932..2a540b65367 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 64f556984ea..58d93c4f8fc 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 9a7e8b375c7..0c6ed2596c3 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 8d4df342f5e..8e615d6d5cc 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 e36fa1575a2..88a20eb5010 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 ba70372f07c..438eb646ef0 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 2acc9651446..e9a55be7a86 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 a7a32f18de2..a0aa5c6bbf1 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 c2489bea1d7..5ded551d121 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 d0a188adf7b..42f3e8498e3 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 a2fc42f06f6..d08091d8e0d 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 4fd3112e27f..719c4f6a312 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 b004d40db69..1b677f10a99 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 e644fd0b27e..58014cc798c 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 a0eeec43085..c1dd314c171 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 cac4dd32590..72e3ad395d0 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 b7d7829cb34..585d49b6f18 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 66f78051017..3b1f040e544 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 cc8f017094e..66d6325c4b0 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 e50c165ca34..7dbc0e58fcc 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 4a0993847f7..acbaa5812ba 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 506747cf717..38298c9b25b 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 2333892f341..4e87bdbf990 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 64351929fdc..1d405713316 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 27ff0844788..187a79e331a 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 c3b09b45ffe..4f262c35f2a 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 bc78fd61885..c27e6f2a228 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 96798e2de5e..be860e0a7df 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 d731bed5636..b7f66d9d2e4 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 f1f8b2ba193..d232547992c 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 9f4f66425f5..d2ae5d09fc3 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 846b802344f..a6fbb372bc1 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 e3e2b8f8d64..b659e2a5299 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 2780f92d1fe..d2fd081c37e 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 6a654e51a60..f143d1591fe 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 44d8623e23c..cda56cfa632 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 016eb2261d8..6a72a29ebde 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 684e06a594c..ab16800ff47 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 7c7d49111ea..8b1a09077f6 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 73a8a3fc3a0..c5b2aea8869 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 097181052ef..a7408623cd7 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 d9144255b6e..7a1d732c1f2 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 c6c9e1da47a..3006ef7ff9c 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 0d52d0e4f11..ae23ece6e48 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 5f2cb24b6e6..0a1dd0aebb0 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 aeb5e222b3b..6e9546f3b19 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 f7ecf2db152..f3dbf2ad71c 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 2bdda7bde9d..ebe52b79ce3 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 8c0604ac420..27d6c5349f8 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 7f326bdacac..a95200b68a3 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 27bd31445d6..743ef82e34f 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 1d382788baa..73cf370bd67 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 3889a171df1..c8a1858b066 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 d9d09bd35e0..151c1e176a3 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 989060fdbe0..c7fa7da3a13 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 96a1fc44e30..9a1a04d065d 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 d547482f8b8..7cb3cdb3d80 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 e9e23c61ed4..d2b7217f860 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 3900589924d..e77cfea7b5f 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 a26af25eefe..161d39c7e24 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 df589394f64..d4c6a9b482c 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 12035095bd6..0ef1dd73ec2 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 0bede83c622..8e6a88662f8 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 ad3a2e1faf6..726d40df820 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 8954eb6f909..5d435b006aa 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 e39f2869650..0690af850b0 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 5738cc9dda6..6a1f9b50d0f 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 7c05ea278d4..fb604991b6b 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 143c6a0df97..5d8e82f2220 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 30830ae2f20..aee054bc548 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 a911ed4224d..6dfff967f5e 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 e78fa5d12d3..4d35be5f8ee 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 de57a5d28ca..25cbeab5b07 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 d3ab47f382d..015111de104 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 84a1ae14ffa..48bed7f3248 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 f99c6865d78..0d8f1cabd0a 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 deda6e5158d..faf13cf652d 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 919f10d003c..04cde657619 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 1c4145e1a06..7e543b1e276 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 afacd2a94a4..9c6e1b0fb08 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 ed27b93a23a..4f2041bd2bc 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 fb89358a108..9dfb669060c 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 654bc88ec4c..eb6c6c5c184 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 48961bcea1d..aaafcde6bfd 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 a289b2ae62b..94bae0646ba 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 d25ae6647d4..c2ff3d3fc62 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 3b1cc89425f..967a6837ce2 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 00b12a2229c..732c46deeff 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 a9c168e942f..0f48b3b3641 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 6c1e864fa88..b33734283c3 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 d90d8da127f..b4298b4ed11 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 aae9869c9f1..b7957e05602 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 42bf0f0dcbf..603162cb953 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 e985de40f7c..237b8fcef4f 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 97cb97e920f..7a4c8aa699b 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 e56054082f1..3dc361d7391 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 cb33768703d..d510fd5d441 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 aebfb01c589..67f8c1e3571 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 ba70372f07c..438eb646ef0 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 84278afe468..866c186fb58 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 541a6711fe7..655f9a17b15 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 43d6992dbdb..7b99e7674c1 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 a124924e4ff..40766c145b5 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 23562ab49c3..587d4194aeb 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 26a81168317..32b7516717f 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 1fcc80c4ee5..df167bbd815 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 b4ca934ceda..359d2ce3ad3 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 9a55a71b275..ee0adfeca3a 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 c3481633a95..ae0085f37a8 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 7e8da149d50..0a25993dcea 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 81d57f3f10b..82c0492829c 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 4ad274f51d7..0456e8eb430 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 9c6e8e4cbb5..bbaec46a45e 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 f2305b871a8..0ef5118f02f 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 7bc9de6b3f4..dc4b9ece49b 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 2c025ea7e00..707f7f60670 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 b111008248b..b37de874c21 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 115b668b216..bbd28451a9c 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 52d214c0f8d..d536cc43b20 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 6d2c9ca61de..dc281dcef6b 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 1eba6870854..44129c39185 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 52352d709de..fa5d4552464 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 c89a224a349..f581358a77e 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 079e453b5a8..8a3b7161be5 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 f4bd6b51451..a22c637f894 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 04b7c723d78..04f51b0d43a 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 cc60cb1fb92..dad16d9529e 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 83f494c4246..08ed7953a8e 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 2a11bdfb9d3..fcee270183f 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 57131ad5a0c..8befa6684ee 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 42d6d3fe8c8..e7456a1c03f 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 63f807605c9..325c0b0efaa 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 de9f604f624..3db64e88c95 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 fdfa1d9fa30..86905c1cd9f 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 a401063bdea..ef3d7176756 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 feb6e4ae7fa..69b568f3578 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 f9c617de850..6eadbc176d6 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 be333a39648..5bec82e727c 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 873dd2b551e..d9f1d5b1c61 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 a4886798c09..d7fb17c0dc9 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 39d21bc4532..66d10d16bd2 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 40aca93fb41..7a9d9f2803a 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 b398c84574e..9c45219c588 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 d3be1059fa2..ec2a3de5f1e 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 b97461761ce..8be3b93f228 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 03a666c88fe..e0859c16ec2 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 b80cf3b83c4..ca51b212293 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 cfac0b0e8b7..2fdd3d1ac34 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 d15be699ea7..e033f3c7336 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 3b21975d52a..b5bdb088264 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 c30eabef635..dbc2861d2fd 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 2e3fff740a6..eae605c195d 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 f26f081e928..668d2d7af16 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 54e7622e1fe..a593fdcaa57 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 03159cd6746..b5b4fd01256 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 64bbdf0570f..bbe743a0d55 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 6eb9cbbaaa3..59bbd36ab66 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 81b4997dae5..4c43b883609 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 cacd00d66c8..2db7d5def9f 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 81a8d512ae0..492eb82358e 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 496112af550..8b93afa4cb5 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 6fb682106f0..00ebc85f0f5 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 79734c109ad..dc78697160f 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 f0dc2dee681..90114b36154 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 21afccc96e5..790ce0b5481 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 90d805b1e7b..91f661e2161 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 d293c5ce314..e89453671fb 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 469989e9312..0ac30103ae8 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 3604b72d597..ba53a2d9e39 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 37e984d8758..1d0f494bd2c 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 aee8f1c2861..7531a558ea2 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 ac3dc4f1558..3fcf6df96e2 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 b122b57541c..5decff4366b 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 eff55debb78..6da196737af 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 26420a8bba2..e0fc504628c 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 37f7562a2ae..335c61b59ef 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 88e9b1bd3f3..60aa0995998 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 073a4ac2ee2..e31e52f9c4e 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 9a92315751c..d57a31be7e8 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 ed85ebf9791..f5657093fae 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 133ea2d17aa..97daac6e490 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 4b0bc4479c4..ea59401efeb 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 a2833521844..f22a247778f 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 bd601e3aec7..2d2b475bfc2 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 5abcee9dc40..71579b0d066 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 6fb682106f0..00ebc85f0f5 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 264dcf12b3c..b38d650cf39 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 cc044be3ded..6572e81c3b1 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 05ae118db3d..186e3bafd90 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 f4edd7a4cff..9e73d7d77ad 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 90d805b1e7b..91f661e2161 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 c5b32784c9b..d2084b25c61 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 f46983a414f..638321f83a0 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 8d9d39330ec..b8f77484fb6 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 7cbe31a4f6b..788f11b5b15 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 37e984d8758..1d0f494bd2c 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 bb31ad758ed..7b48df63739 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 9f21f597450..65eaf3f2509 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 25c1cf6ab50..4a9d0cc15af 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 6ffb6d46d76..d7cf8ae39bc 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 7217277229c..d6dd70ab480 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 89a1dd063a8..709e088be04 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 489f3a53f70..c6ea577afce 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 a21f1419df7..7d544f50731 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 a1e44a24d64..d488c1b656a 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 7852389f94c..3f297eb4ded 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 c9acace1286..8d7e0032e09 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 bcb908e4e2a..d892bfa0a91 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 50672fd716f..225da359972 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 ed67295fc11..41628802fee 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 9ae6a788b62..66bf9e37fab 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 ed6c7b5a363..fd60db6c253 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 e0ccb5548c1..9e79f026694 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 5031b49c4c4..0fcc21a063f 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 a03593f423a..2e49df3ebd7 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 06b9495a0d7..99af84210bc 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 6b712aac51e..f69b57f4e49 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 4501f8b622f..6da74523b73 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 35d8a62024e..b6ff212e091 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 1a959a79696..1bf21fa2585 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 fe330964284..ba03e29b388 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 e60c2868e8f..1a78abdbd29 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 5f90cca7b1a..f601d1d415f 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 8ba591a7f2c..6c83c5f20f9 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 86e73e7ac5f..9026ffd2d70 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 ef366f388b4..f841d6e799b 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 f71b0c96bec..44211661d85 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 94ce46c6b3a..8a450362a38 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 486ea45a6a7..505cd65357f 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 5d603240acb..72c8476bfdd 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 600e739dbcf..d89014c97d7 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 92a18080322..524f6705be5 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 9e4f984dad6..33f044c1d25 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 485a3f530e6..d23b5a6bdc7 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 b55b0606efe..e4112a659f7 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 9ac0b3a6a19..78a45fdf81b 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 e9d91367043..ee58833f286 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 f5187947683..97ca05745eb 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 65d0b849f5b..f713ae7ecc4 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 b66c71e8b12..52656ea2cf3 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 bd6591de3b2..e0d6a596aa8 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 124b932bfea..568f702e432 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 645ddaa718c..54d7578c2b7 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 aba951d0a42..cc3cf85dafe 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 43285898a87..fc926ac1767 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 b1c035ddd04..07872c1024e 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 9f71c60d5bb..944a727b6bf 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 1acbf7f0c42..14c37a40e5f 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 0f4c2b172d8..9af29dbed3a 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 44052b81d8f..8a317009506 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 f9e881e66d0..884ffe379dc 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 9c6e8e4cbb5..bbaec46a45e 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 e50495ad5fe..c73f7a63ec0 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 13db123865e..00b4d3c5c8d 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 a333e72c8bc..04893818e18 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 a5db08dda70..0be13f08d7b 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 eb5cd1110fd..dcbb332079b 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 2b98ae1fc9b..3ac67284337 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 3888cf61463..676ea547b4e 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 cf881cbe5b0..9db32a932b0 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 12896112946..c07f3e36c91 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 86ca7d57995..3ed5725ae66 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 415527e8836..c3237b9e137 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 e48ab6e9994..d80bfd7161a 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 e26aab37fd5..220e956d3f9 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 1dfdb9c72fb..2121a288458 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 f874fcc283a..4e6a9d1a443 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 e210cc3bdc0..2396267ded0 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 de89552402b..c01b95bafdc 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 4fcd5e85a71..cc8c7280384 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 467057a0326..0d0ccfdeb89 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 8cbb603b30d..94a24005390 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 083929ef811..15b641691cb 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 9bb7749cf99..84cf8142bcc 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 05e8bfe4619..4ecc9f635a8 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 466f48e6ab4..a1871bf7c03 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 b433e331cb8..30d1c54539b 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 3dbb47d5cd7..718c00f8c2f 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 079fb2bcb86..874c5a9c9bb 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 6768be6da96..08ae989bf23 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 9c6e8e4cbb5..bbaec46a45e 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 f2305b871a8..0ef5118f02f 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 c7eeb622dec..56577480830 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 0e8600b75d5..f1bc8410af1 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 a2283fcf833..b9f4f7af03c 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 3179e9c7e40..1988e4447c4 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 8c9dee3db97..ab31dd0588e 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 8fc180ec788..4f98522fb11 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 b89e1da6947..d60232f0882 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 0d80dd2252e..7fe80f29549 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 35bf55eacc3..d6e2550fa2b 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 c1b9ffd7eaf..faa1ff80161 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 bbf1c5b96c7..72934f77e8b 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 4a6d9b4ff9c..1abcae4029c 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 1f342be9f1b..2192c76482b 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 58f657ca027..12f03cbb668 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 9a4b6e2c189..3d7ae0313d1 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 5bef0b89641..847f139981f 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 f241fe5f055..85ea98e3d19 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 e0411aa20b4..670865ccfd9 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 5f4a1dc2a41..59151612908 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 abdedb9ecbb..9607ecf151d 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 1f3f31db74a..c16635c4e06 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 98734cbcfbc..6d6bd41d2fe 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 4d993173351..157062d3198 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 d9dcff3a406..3ff111a299e 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 f47d7599930..ddd862345f9 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 23420e6d2e6..16de844afb3 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 c59b2a7b697..59f35f119c9 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 daec007f5ce..d7f40ffa567 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 b43c161ace2..2f47d056020 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 9e494759522..3bd64de0fe5 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 935a450681a..9e79e972029 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 16bb0ab7b1d..00d2e0ac771 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 73639e9e9dd..3e34b9e903c 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 9221384cb8b..afead4d8dd0 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 2bef2b2e90b..d8ddaf8f023 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 d0ab52bb0cc..f46cb54847b 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 48f233ddf4e..4aff71758dd 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 ae4136155eb..330e8827759 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 f1bbcebb329..79341024249 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 93175faa4a9..11852d1d1c6 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 3915ba80f5a..823a2d8e5e5 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 e6f414e0bdb..f06bc7a039d 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 e1ad6289bce..6f16e9b1d41 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 c5c42bb99a3..c856679f038 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 58f3dcd0d6a..54906f67399 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 d4f0e36ed52..c7c44b5b2f4 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 b4c77638d6e..6340a7eaf57 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 2d4d4708e9d..beb199032ec 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 052d4eb753e..1c1ee9439a7 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 310178445a9..3231f288e07 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 123aebfc3a0..ae310d5333e 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 73ed6ba9aa5..b078396d11c 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 4d566276ca1..ed5137b2745 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 e0f1f16c55e..804e940d054 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 080eeb74964..d925cf647fc 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 a102e1f081d..9b62600c784 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 f79568cdce2..fb77c23ba79 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 12e75ee3b81..bfcca97a800 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 ff40800262c..16a18495b1b 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 5ef5a4c0ba5..727e178d88b 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 f83bf6a6f3e..b205074bbda 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 e75aa5a17cc..45d50027296 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 62a875701b6..690703f191e 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 d9a00b1b9ea..2801174a24e 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 35d334640c7..df0d5dbf70f 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 c7bbf1b3785..39145315084 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 d4ab30e8f1b..4106139a002 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 444da1cdd1e..613b44349f5 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 982cf7309a9..acd2266333d 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 1bfc582f0f3..6b918f0b901 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 7d53f9d1310..fa376f49409 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 c63d6b57bc5..2f45e313093 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 7545f8537d1..e3b7825967f 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 1633cdf0285..533f4212280 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 0439a05d702..4537dd38d71 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 157f436a73f..54bf9e7a30d 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 0cfb3697a24..c912d8c7eab 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 0a17f8dba6e..be8a58fb8eb 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 d560992b0b3..4d711f045f7 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 4c9ced01d53..b21abd29940 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 1f7fb956306..984ebf22822 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 0f0b5b9c2b9..b5c0181ae7f 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 f95340788f2..b3cb8c041ad 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 0dfd8b5a535..6a0278f08b9 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 7bb1a7cc93d..dcf692a988b 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) {