Browse Source

Chore: change module name (#677)

Loyalsoldier 4 years ago
parent
commit
f94dd11a8c
100 changed files with 463 additions and 434 deletions
  1. 5 5
      app/commander/commander.go
  2. 5 4
      app/commander/config.pb.go
  3. 1 1
      app/commander/config.proto
  4. 1 1
      app/commander/errors.generated.go
  5. 4 4
      app/commander/outbound.go
  6. 2 1
      app/commander/service.go
  7. 4 3
      app/dispatcher/config.pb.go
  8. 1 1
      app/dispatcher/config.proto
  9. 15 15
      app/dispatcher/default.go
  10. 1 1
      app/dispatcher/dispatcher.go
  11. 1 1
      app/dispatcher/errors.generated.go
  12. 5 5
      app/dispatcher/fakednssniffer.go
  13. 4 4
      app/dispatcher/sniffer.go
  14. 3 3
      app/dispatcher/stats.go
  15. 3 3
      app/dispatcher/stats_test.go
  16. 3 3
      app/dns/config.go
  17. 6 5
      app/dns/config.pb.go
  18. 1 1
      app/dns/config.proto
  19. 9 9
      app/dns/dns.go
  20. 14 13
      app/dns/dns_test.go
  21. 5 4
      app/dns/dnscommon.go
  22. 5 4
      app/dns/dnscommon_test.go
  23. 1 1
      app/dns/errors.generated.go
  24. 1 1
      app/dns/fakedns/errors.generated.go
  25. 4 4
      app/dns/fakedns/fake.go
  26. 1 1
      app/dns/fakedns/fakedns.go
  27. 4 3
      app/dns/fakedns/fakedns.pb.go
  28. 2 2
      app/dns/fakedns/fakedns.proto
  29. 4 3
      app/dns/fakedns/fakedns_test.go
  30. 4 4
      app/dns/hosts.go
  31. 6 5
      app/dns/hosts_test.go
  32. 6 6
      app/dns/nameserver.go
  33. 10 9
      app/dns/nameserver_doh.go
  34. 3 3
      app/dns/nameserver_fakedns.go
  35. 2 2
      app/dns/nameserver_local.go
  36. 3 3
      app/dns/nameserver_local_test.go
  37. 10 9
      app/dns/nameserver_quic.go
  38. 3 3
      app/dns/nameserver_quic_test.go
  39. 11 10
      app/dns/nameserver_udp.go
  40. 4 4
      app/log/command/command.go
  41. 9 9
      app/log/command/command_test.go
  42. 4 3
      app/log/command/config.pb.go
  43. 1 1
      app/log/command/config.proto
  44. 1 1
      app/log/command/errors.generated.go
  45. 5 4
      app/log/config.pb.go
  46. 1 1
      app/log/config.proto
  47. 1 1
      app/log/errors.generated.go
  48. 3 3
      app/log/log.go
  49. 2 2
      app/log/log_creator.go
  50. 5 4
      app/log/log_test.go
  51. 1 1
      app/policy/config.go
  52. 4 3
      app/policy/config.pb.go
  53. 1 1
      app/policy/config.proto
  54. 1 1
      app/policy/errors.generated.go
  55. 2 2
      app/policy/manager.go
  56. 3 3
      app/policy/manager_test.go
  57. 1 1
      app/policy/policy.go
  58. 5 5
      app/proxyman/command/command.go
  59. 30 29
      app/proxyman/command/command.pb.go
  60. 1 1
      app/proxyman/command/command.proto
  61. 1 1
      app/proxyman/command/doc.go
  62. 1 1
      app/proxyman/command/errors.generated.go
  63. 7 6
      app/proxyman/config.pb.go
  64. 1 1
      app/proxyman/config.proto
  65. 11 11
      app/proxyman/inbound/always.go
  66. 8 8
      app/proxyman/inbound/dynamic.go
  67. 1 1
      app/proxyman/inbound/errors.generated.go
  68. 7 7
      app/proxyman/inbound/inbound.go
  69. 15 15
      app/proxyman/inbound/worker.go
  70. 1 1
      app/proxyman/outbound/errors.generated.go
  71. 14 14
      app/proxyman/outbound/handler.go
  72. 9 9
      app/proxyman/outbound/handler_test.go
  73. 6 6
      app/proxyman/outbound/outbound.go
  74. 8 7
      app/reverse/bridge.go
  75. 1 1
      app/reverse/config.go
  76. 4 3
      app/reverse/config.pb.go
  77. 1 1
      app/reverse/config.proto
  78. 1 1
      app/reverse/errors.generated.go
  79. 10 9
      app/reverse/portal.go
  80. 2 2
      app/reverse/portal_test.go
  81. 8 8
      app/reverse/reverse.go
  82. 2 2
      app/router/balancing.go
  83. 6 5
      app/router/command/command.go
  84. 5 4
      app/router/command/command.pb.go
  85. 1 1
      app/router/command/command.proto
  86. 8 7
      app/router/command/command_test.go
  87. 2 2
      app/router/command/config.go
  88. 1 1
      app/router/command/errors.generated.go
  89. 4 3
      app/router/condition.go
  90. 1 1
      app/router/condition_geoip.go
  91. 6 5
      app/router/condition_geoip_test.go
  92. 17 17
      app/router/condition_test.go
  93. 3 3
      app/router/config.go
  94. 5 4
      app/router/config.pb.go
  95. 1 1
      app/router/config.proto
  96. 1 1
      app/router/errors.generated.go
  97. 7 7
      app/router/router.go
  98. 14 13
      app/router/router_test.go
  99. 1 1
      app/stats/channel.go
  100. 3 3
      app/stats/channel_test.go

+ 5 - 5
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.

+ 5 - 4
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 4 - 4
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.

+ 2 - 1
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.

+ 4 - 3
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,

+ 1 - 1
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;
 

+ 15 - 15
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 (

+ 1 - 1
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

+ 1 - 1
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{}
 

+ 5 - 5
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

+ 4 - 4
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 {

+ 3 - 3
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 {

+ 3 - 3
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

+ 3 - 3
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{

+ 6 - 5
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,
 }

+ 1 - 1
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;
 

+ 9 - 9
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.

+ 14 - 13
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 {

+ 5 - 4
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 '.'

+ 5 - 4
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) {

+ 1 - 1
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{}
 

+ 1 - 1
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{}
 

+ 4 - 4
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 {

+ 1 - 1
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

+ 4 - 3
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,

+ 2 - 2
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
-}
+}

+ 4 - 3
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) {

+ 4 - 4
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.

+ 6 - 5
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,
 		})

+ 6 - 6
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.

+ 10 - 9
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,

+ 3 - 3
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 {

+ 2 - 2
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.

+ 3 - 3
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) {

+ 10 - 9
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

+ 3 - 3
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) {

+ 11 - 10
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.

+ 4 - 4
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 {

+ 9 - 9
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) {

+ 4 - 3
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 5 - 4
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 3 - 3
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.

+ 2 - 2
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 {

+ 5 - 4
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) {

+ 1 - 1
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.

+ 4 - 3
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 2 - 2
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.

+ 3 - 3
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) {

+ 1 - 1
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

+ 5 - 5
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.

+ 30 - 29
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

+ 1 - 1
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;
 

+ 1 - 1
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

+ 1 - 1
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{}
 

+ 7 - 6
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,

+ 1 - 1
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;
 

+ 11 - 11
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) {

+ 8 - 8
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 {

+ 1 - 1
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{}
 

+ 7 - 7
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.

+ 15 - 15
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 {

+ 1 - 1
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{}
 

+ 14 - 14
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) {

+ 9 - 9
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) {

+ 6 - 6
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.

+ 8 - 7
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.

+ 1 - 1
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() {

+ 4 - 3
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 10 - 9
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 {

+ 2 - 2
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) {

+ 8 - 8
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 {

+ 2 - 2
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 {

+ 6 - 5
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.

+ 5 - 4
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,

+ 1 - 1
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;
 

+ 8 - 7
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) {

+ 2 - 2
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.

+ 1 - 1
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{}
 

+ 4 - 3
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 {

+ 1 - 1
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 {

+ 6 - 5
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() {

+ 17 - 17
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,
 				},
 				{

+ 3 - 3
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.

+ 5 - 4
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,

+ 1 - 1
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;
 

+ 1 - 1
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{}
 

+ 7 - 7
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.

+ 14 - 13
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" {

+ 1 - 1
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.

+ 3 - 3
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) {

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