vcptr 6 years ago
parent
commit
239d1b0fec
100 changed files with 320 additions and 320 deletions
  1. 4 4
      app/commander/commander.go
  2. 1 1
      app/commander/config.pb.go
  3. 1 1
      app/commander/errors.generated.go
  4. 4 4
      app/commander/outbound.go
  5. 12 12
      app/dispatcher/default.go
  6. 1 1
      app/dispatcher/errors.generated.go
  7. 4 4
      app/dispatcher/sniffer.go
  8. 3 3
      app/dispatcher/stats.go
  9. 3 3
      app/dispatcher/stats_test.go
  10. 1 1
      app/dns/config.pb.go
  11. 1 1
      app/dns/errors.generated.go
  12. 4 4
      app/dns/hosts.go
  13. 3 3
      app/dns/hosts_test.go
  14. 2 2
      app/dns/nameserver.go
  15. 2 2
      app/dns/nameserver_test.go
  16. 9 9
      app/dns/server.go
  17. 12 12
      app/dns/server_test.go
  18. 11 11
      app/dns/udpns.go
  19. 3 3
      app/log/command/command.go
  20. 9 9
      app/log/command/command_test.go
  21. 1 1
      app/log/command/errors.generated.go
  22. 1 1
      app/log/config.pb.go
  23. 1 1
      app/log/errors.generated.go
  24. 2 2
      app/log/log.go
  25. 2 2
      app/log/log_creator.go
  26. 4 4
      app/log/log_test.go
  27. 1 1
      app/policy/config.go
  28. 1 1
      app/policy/errors.generated.go
  29. 2 2
      app/policy/manager.go
  30. 3 3
      app/policy/manager_test.go
  31. 5 5
      app/proxyman/command/command.go
  32. 3 3
      app/proxyman/command/command.pb.go
  33. 1 1
      app/proxyman/command/errors.generated.go
  34. 3 3
      app/proxyman/config.pb.go
  35. 11 11
      app/proxyman/inbound/always.go
  36. 8 8
      app/proxyman/inbound/dynamic.go
  37. 1 1
      app/proxyman/inbound/errors.generated.go
  38. 6 6
      app/proxyman/inbound/inbound.go
  39. 15 15
      app/proxyman/inbound/worker.go
  40. 1 1
      app/proxyman/outbound/errors.generated.go
  41. 11 11
      app/proxyman/outbound/handler.go
  42. 2 2
      app/proxyman/outbound/handler_test.go
  43. 5 5
      app/proxyman/outbound/outbound.go
  44. 1 1
      app/proxyman/proxyman.go
  45. 7 7
      app/reverse/bridge.go
  46. 1 1
      app/reverse/config.go
  47. 1 1
      app/reverse/errors.generated.go
  48. 9 9
      app/reverse/portal.go
  49. 2 2
      app/reverse/portal_test.go
  50. 6 6
      app/reverse/reverse.go
  51. 2 2
      app/router/balancing.go
  52. 2 2
      app/router/condition.go
  53. 1 1
      app/router/condition_geoip.go
  54. 5 5
      app/router/condition_geoip_test.go
  55. 9 9
      app/router/condition_test.go
  56. 2 2
      app/router/config.go
  57. 1 1
      app/router/config.pb.go
  58. 1 1
      app/router/errors.generated.go
  59. 7 7
      app/router/router.go
  60. 6 6
      app/router/router_test.go
  61. 5 5
      app/stats/command/command.go
  62. 3 3
      app/stats/command/command_test.go
  63. 1 1
      app/stats/command/errors.generated.go
  64. 1 1
      app/stats/config.go
  65. 1 1
      app/stats/errors.generated.go
  66. 1 1
      app/stats/stats.go
  67. 3 3
      app/stats/stats_test.go
  68. 1 1
      common/bitmask/byte_test.go
  69. 1 1
      common/buf/buffer.go
  70. 2 2
      common/buf/buffer_test.go
  71. 2 2
      common/buf/copy.go
  72. 3 3
      common/buf/copy_test.go
  73. 1 1
      common/buf/errors.generated.go
  74. 3 3
      common/buf/io_test.go
  75. 3 3
      common/buf/multi_buffer.go
  76. 2 2
      common/buf/multi_buffer_test.go
  77. 2 2
      common/buf/reader.go
  78. 3 3
      common/buf/reader_test.go
  79. 1 1
      common/buf/readv_reader.go
  80. 3 3
      common/buf/readv_test.go
  81. 2 2
      common/buf/writer.go
  82. 3 3
      common/buf/writer_test.go
  83. 1 1
      common/common.go
  84. 1 1
      common/common_test.go
  85. 1 1
      common/crypto/aes.go
  86. 4 4
      common/crypto/auth.go
  87. 4 4
      common/crypto/auth_test.go
  88. 1 1
      common/crypto/benchmark_test.go
  89. 1 1
      common/crypto/chacha20.go
  90. 2 2
      common/crypto/chacha20_test.go
  91. 2 2
      common/crypto/chunk.go
  92. 3 3
      common/crypto/chunk_test.go
  93. 1 1
      common/crypto/errors.generated.go
  94. 1 1
      common/crypto/io.go
  95. 1 1
      common/dice/dice_test.go
  96. 1 1
      common/errors.generated.go
  97. 2 2
      common/errors/errors.go
  98. 2 2
      common/errors/errors_test.go
  99. 1 1
      common/interfaces.go
  100. 1 1
      common/log/access.go

+ 4 - 4
app/commander/commander.go

@@ -11,10 +11,10 @@ import (
 
 
 	"google.golang.org/grpc"
 	"google.golang.org/grpc"
 
 
-	"v2ray.com/core"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/signal/done"
-	"v2ray.com/core/features/outbound"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/signal/done"
+	"v2ray.com/core/v4/features/outbound"
 )
 )
 
 
 // Commander is a V2Ray feature that provides gRPC methods to external clients.
 // Commander is a V2Ray feature that provides gRPC methods to external clients.

+ 1 - 1
app/commander/config.pb.go

@@ -4,7 +4,7 @@ import (
 	fmt "fmt"
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	math "math"
 	math "math"
-	serial "v2ray.com/core/common/serial"
+	serial "v2ray.com/core/v4/common/serial"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 1 - 1
app/commander/errors.generated.go

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

+ 4 - 4
app/commander/outbound.go

@@ -6,10 +6,10 @@ import (
 	"context"
 	"context"
 	"sync"
 	"sync"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/common/signal/done"
-	"v2ray.com/core/transport"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/signal/done"
+	"v2ray.com/core/v4/transport"
 )
 )
 
 
 // OutboundListener is a net.Listener for listening gRPC connections.
 // OutboundListener is a net.Listener for listening gRPC connections.

+ 12 - 12
app/dispatcher/default.go

@@ -10,18 +10,18 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"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/session"
-	"v2ray.com/core/features/outbound"
-	"v2ray.com/core/features/policy"
-	"v2ray.com/core/features/routing"
-	"v2ray.com/core/features/stats"
-	"v2ray.com/core/transport"
-	"v2ray.com/core/transport/pipe"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/protocol"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/features/policy"
+	"v2ray.com/core/v4/features/routing"
+	"v2ray.com/core/v4/features/stats"
+	"v2ray.com/core/v4/transport"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 var (
 var (

+ 1 - 1
app/dispatcher/errors.generated.go

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

+ 4 - 4
app/dispatcher/sniffer.go

@@ -3,10 +3,10 @@
 package dispatcher
 package dispatcher
 
 
 import (
 import (
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/protocol/bittorrent"
-	"v2ray.com/core/common/protocol/http"
-	"v2ray.com/core/common/protocol/tls"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/protocol/bittorrent"
+	"v2ray.com/core/v4/common/protocol/http"
+	"v2ray.com/core/v4/common/protocol/tls"
 )
 )
 
 
 type SniffResult interface {
 type SniffResult interface {

+ 3 - 3
app/dispatcher/stats.go

@@ -3,9 +3,9 @@
 package dispatcher
 package dispatcher
 
 
 import (
 import (
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/buf"
-	"v2ray.com/core/features/stats"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/features/stats"
 )
 )
 
 
 type SizeStatWriter struct {
 type SizeStatWriter struct {

+ 3 - 3
app/dispatcher/stats_test.go

@@ -3,9 +3,9 @@ package dispatcher_test
 import (
 import (
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/app/dispatcher"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/buf"
+	. "v2ray.com/core/v4/app/dispatcher"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
 )
 )
 
 
 type TestCounter int64
 type TestCounter int64

+ 1 - 1
app/dns/config.pb.go

@@ -4,7 +4,7 @@ import (
 	fmt "fmt"
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	math "math"
 	math "math"
-	net "v2ray.com/core/common/net"
+	net "v2ray.com/core/v4/common/net"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 1 - 1
app/dns/errors.generated.go

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

+ 4 - 4
app/dns/hosts.go

@@ -3,10 +3,10 @@
 package dns
 package dns
 
 
 import (
 import (
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/common/strmatcher"
-	"v2ray.com/core/features"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/strmatcher"
+	"v2ray.com/core/v4/features"
 )
 )
 
 
 // StaticHosts represents static domain-ip mapping in DNS server.
 // StaticHosts represents static domain-ip mapping in DNS server.

+ 3 - 3
app/dns/hosts_test.go

@@ -5,9 +5,9 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
-	. "v2ray.com/core/app/dns"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/net"
+	. "v2ray.com/core/v4/app/dns"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
 )
 )
 
 
 func TestStaticHosts(t *testing.T) {
 func TestStaticHosts(t *testing.T) {

+ 2 - 2
app/dns/nameserver.go

@@ -5,8 +5,8 @@ package dns
 import (
 import (
 	"context"
 	"context"
 
 
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/features/dns/localdns"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/features/dns/localdns"
 )
 )
 
 
 // IPOption is an object for IP query options.
 // IPOption is an object for IP query options.

+ 2 - 2
app/dns/nameserver_test.go

@@ -5,8 +5,8 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	. "v2ray.com/core/app/dns"
-	"v2ray.com/core/common"
+	. "v2ray.com/core/v4/app/dns"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 func TestLocalNameServer(t *testing.T) {
 func TestLocalNameServer(t *testing.T) {

+ 9 - 9
app/dns/server.go

@@ -9,15 +9,15 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"time"
 
 
-	"v2ray.com/core"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/common/session"
-	"v2ray.com/core/common/strmatcher"
-	"v2ray.com/core/common/uuid"
-	"v2ray.com/core/features"
-	"v2ray.com/core/features/dns"
-	"v2ray.com/core/features/routing"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/common/strmatcher"
+	"v2ray.com/core/v4/common/uuid"
+	"v2ray.com/core/v4/features"
+	"v2ray.com/core/v4/features/dns"
+	"v2ray.com/core/v4/features/routing"
 )
 )
 
 
 // Server is a DNS rely server.
 // Server is a DNS rely server.

+ 12 - 12
app/dns/server_test.go

@@ -7,18 +7,18 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 	"github.com/miekg/dns"
 	"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/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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/dispatcher"
+	. "v2ray.com/core/v4/app/dns"
+	"v2ray.com/core/v4/app/policy"
+	"v2ray.com/core/v4/app/proxyman"
+	_ "v2ray.com/core/v4/app/proxyman/outbound"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/serial"
+	feature_dns "v2ray.com/core/v4/features/dns"
+	"v2ray.com/core/v4/proxy/freedom"
+	"v2ray.com/core/v4/testing/servers/udp"
 )
 )
 
 
 type staticHandler struct {
 type staticHandler struct {

+ 11 - 11
app/dns/udpns.go

@@ -10,17 +10,17 @@ import (
 	"time"
 	"time"
 
 
 	"golang.org/x/net/dns/dnsmessage"
 	"golang.org/x/net/dns/dnsmessage"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/errors"
-	"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"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/protocol/dns"
+	udp_proto "v2ray.com/core/v4/common/protocol/udp"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/common/signal/pubsub"
+	"v2ray.com/core/v4/common/task"
+	dns_feature "v2ray.com/core/v4/features/dns"
+	"v2ray.com/core/v4/features/routing"
+	"v2ray.com/core/v4/transport/internet/udp"
 )
 )
 
 
 type record struct {
 type record struct {

+ 3 - 3
app/log/command/command.go

@@ -9,9 +9,9 @@ import (
 
 
 	grpc "google.golang.org/grpc"
 	grpc "google.golang.org/grpc"
 
 
-	"v2ray.com/core"
-	"v2ray.com/core/app/log"
-	"v2ray.com/core/common"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/log"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 type LoggerServer struct {
 type LoggerServer struct {

+ 9 - 9
app/log/command/command_test.go

@@ -4,15 +4,15 @@ import (
 	"context"
 	"context"
 	"testing"
 	"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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/dispatcher"
+	"v2ray.com/core/v4/app/log"
+	. "v2ray.com/core/v4/app/log/command"
+	"v2ray.com/core/v4/app/proxyman"
+	_ "v2ray.com/core/v4/app/proxyman/inbound"
+	_ "v2ray.com/core/v4/app/proxyman/outbound"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/serial"
 )
 )
 
 
 func TestLoggerRestart(t *testing.T) {
 func TestLoggerRestart(t *testing.T) {

+ 1 - 1
app/log/command/errors.generated.go

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

+ 1 - 1
app/log/config.pb.go

@@ -4,7 +4,7 @@ import (
 	fmt "fmt"
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	math "math"
 	math "math"
-	log "v2ray.com/core/common/log"
+	log "v2ray.com/core/v4/common/log"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 1 - 1
app/log/errors.generated.go

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

+ 2 - 2
app/log/log.go

@@ -8,8 +8,8 @@ import (
 	"context"
 	"context"
 	"sync"
 	"sync"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/log"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/log"
 )
 )
 
 
 // Instance is a log.Handler that handles logs.
 // Instance is a log.Handler that handles logs.

+ 2 - 2
app/log/log_creator.go

@@ -3,8 +3,8 @@
 package log
 package log
 
 
 import (
 import (
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/log"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/log"
 )
 )
 
 
 type HandlerCreatorOptions struct {
 type HandlerCreatorOptions struct {

+ 4 - 4
app/log/log_test.go

@@ -5,10 +5,10 @@ import (
 	"testing"
 	"testing"
 
 
 	"github.com/golang/mock/gomock"
 	"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"
+	"v2ray.com/core/v4/app/log"
+	"v2ray.com/core/v4/common"
+	clog "v2ray.com/core/v4/common/log"
+	"v2ray.com/core/v4/testing/mocks"
 )
 )
 
 
 func TestCustomLogHandler(t *testing.T) {
 func TestCustomLogHandler(t *testing.T) {

+ 1 - 1
app/policy/config.go

@@ -3,7 +3,7 @@ package policy
 import (
 import (
 	"time"
 	"time"
 
 
-	"v2ray.com/core/features/policy"
+	"v2ray.com/core/v4/features/policy"
 )
 )
 
 
 // Duration converts Second to time.Duration.
 // Duration converts Second to time.Duration.

+ 1 - 1
app/policy/errors.generated.go

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

+ 2 - 2
app/policy/manager.go

@@ -3,8 +3,8 @@ package policy
 import (
 import (
 	"context"
 	"context"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/features/policy"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/features/policy"
 )
 )
 
 
 // Instance is an instance of Policy manager.
 // Instance is an instance of Policy manager.

+ 3 - 3
app/policy/manager_test.go

@@ -5,9 +5,9 @@ import (
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
-	. "v2ray.com/core/app/policy"
-	"v2ray.com/core/common"
-	"v2ray.com/core/features/policy"
+	. "v2ray.com/core/v4/app/policy"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/features/policy"
 )
 )
 
 
 func TestPolicy(t *testing.T) {
 func TestPolicy(t *testing.T) {

+ 5 - 5
app/proxyman/command/command.go

@@ -7,11 +7,11 @@ import (
 
 
 	grpc "google.golang.org/grpc"
 	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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/features/inbound"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/proxy"
 )
 )
 
 
 // InboundOperation is the interface for operations that applies to inbound handlers.
 // InboundOperation is the interface for operations that applies to inbound handlers.

+ 3 - 3
app/proxyman/command/command.pb.go

@@ -6,9 +6,9 @@ import (
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	grpc "google.golang.org/grpc"
 	grpc "google.golang.org/grpc"
 	math "math"
 	math "math"
-	core "v2ray.com/core"
-	protocol "v2ray.com/core/common/protocol"
-	serial "v2ray.com/core/common/serial"
+	core "v2ray.com/core/v4"
+	protocol "v2ray.com/core/v4/common/protocol"
+	serial "v2ray.com/core/v4/common/serial"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 1 - 1
app/proxyman/command/errors.generated.go

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

+ 3 - 3
app/proxyman/config.pb.go

@@ -4,9 +4,9 @@ import (
 	fmt "fmt"
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	math "math"
 	math "math"
-	net "v2ray.com/core/common/net"
-	serial "v2ray.com/core/common/serial"
-	internet "v2ray.com/core/transport/internet"
+	net "v2ray.com/core/v4/common/net"
+	serial "v2ray.com/core/v4/common/serial"
+	internet "v2ray.com/core/v4/transport/internet"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 11 - 11
app/proxyman/inbound/always.go

@@ -3,17 +3,17 @@ package inbound
 import (
 import (
 	"context"
 	"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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/dice"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/mux"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/features/policy"
+	"v2ray.com/core/v4/features/stats"
+	"v2ray.com/core/v4/proxy"
+	"v2ray.com/core/v4/transport/internet"
 )
 )
 
 
 func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter) {
 func getStatCounter(v *core.Instance, tag string) (stats.Counter, stats.Counter) {

+ 8 - 8
app/proxyman/inbound/dynamic.go

@@ -5,14 +5,14 @@ import (
 	"sync"
 	"sync"
 	"time"
 	"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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common/dice"
+	"v2ray.com/core/v4/common/mux"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/task"
+	"v2ray.com/core/v4/proxy"
+	"v2ray.com/core/v4/transport/internet"
 )
 )
 
 
 type DynamicInboundHandler struct {
 type DynamicInboundHandler struct {

+ 1 - 1
app/proxyman/inbound/errors.generated.go

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

+ 6 - 6
app/proxyman/inbound/inbound.go

@@ -6,12 +6,12 @@ import (
 	"context"
 	"context"
 	"sync"
 	"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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/serial"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/features/inbound"
 )
 )
 
 
 // Manager is to manage all inbound handlers.
 // Manager is to manage all inbound handlers.

+ 15 - 15
app/proxyman/inbound/worker.go

@@ -6,21 +6,21 @@ import (
 	"sync/atomic"
 	"sync/atomic"
 	"time"
 	"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"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/serial"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/common/signal/done"
+	"v2ray.com/core/v4/common/task"
+	"v2ray.com/core/v4/features/routing"
+	"v2ray.com/core/v4/features/stats"
+	"v2ray.com/core/v4/proxy"
+	"v2ray.com/core/v4/transport/internet"
+	"v2ray.com/core/v4/transport/internet/tcp"
+	"v2ray.com/core/v4/transport/internet/udp"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 type worker interface {
 type worker interface {

+ 1 - 1
app/proxyman/outbound/errors.generated.go

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

+ 11 - 11
app/proxyman/outbound/handler.go

@@ -3,17 +3,17 @@ package outbound
 import (
 import (
 	"context"
 	"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/proxy"
-	"v2ray.com/core/transport"
-	"v2ray.com/core/transport/internet"
-	"v2ray.com/core/transport/pipe"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/mux"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/proxy"
+	"v2ray.com/core/v4/transport"
+	"v2ray.com/core/v4/transport/internet"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 // Handler is an implements of outbound.Handler.
 // Handler is an implements of outbound.Handler.

+ 2 - 2
app/proxyman/outbound/handler_test.go

@@ -3,8 +3,8 @@ package outbound_test
 import (
 import (
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/app/proxyman/outbound"
-	"v2ray.com/core/features/outbound"
+	. "v2ray.com/core/v4/app/proxyman/outbound"
+	"v2ray.com/core/v4/features/outbound"
 )
 )
 
 
 func TestInterfaces(t *testing.T) {
 func TestInterfaces(t *testing.T) {

+ 5 - 5
app/proxyman/outbound/outbound.go

@@ -7,11 +7,11 @@ import (
 	"strings"
 	"strings"
 	"sync"
 	"sync"
 
 
-	"v2ray.com/core"
-	"v2ray.com/core/app/proxyman"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/errors"
-	"v2ray.com/core/features/outbound"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/proxyman"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/features/outbound"
 )
 )
 
 
 // Manager is to manage all outbound handlers.
 // Manager is to manage all outbound handlers.

+ 1 - 1
app/proxyman/proxyman.go

@@ -4,7 +4,7 @@ package proxyman
 import (
 import (
 	"context"
 	"context"
 
 
-	"v2ray.com/core/common/session"
+	"v2ray.com/core/v4/common/session"
 )
 )
 
 
 // ContextWithSniffingConfig is a wrapper of session.ContextWithContent.
 // ContextWithSniffingConfig is a wrapper of session.ContextWithContent.

+ 7 - 7
app/reverse/bridge.go

@@ -7,13 +7,13 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/golang/protobuf/proto"
 	"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"
+	"v2ray.com/core/v4/common/mux"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/common/task"
+	"v2ray.com/core/v4/features/routing"
+	"v2ray.com/core/v4/transport"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 // Bridge is a component in reverse proxy, that relays connections from Portal to local address.
 // 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"
 	"crypto/rand"
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common/dice"
+	"v2ray.com/core/v4/common/dice"
 )
 )
 
 
 func (c *Control) FillInRandom() {
 func (c *Control) FillInRandom() {

+ 1 - 1
app/reverse/errors.generated.go

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

+ 9 - 9
app/reverse/portal.go

@@ -8,15 +8,15 @@ import (
 	"time"
 	"time"
 
 
 	"github.com/golang/protobuf/proto"
 	"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"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/mux"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/common/task"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/transport"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 type Portal struct {
 type Portal struct {

+ 2 - 2
app/reverse/portal_test.go

@@ -3,8 +3,8 @@ package reverse_test
 import (
 import (
 	"testing"
 	"testing"
 
 
-	"v2ray.com/core/app/reverse"
-	"v2ray.com/core/common"
+	"v2ray.com/core/v4/app/reverse"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 func TestStaticPickerEmpty(t *testing.T) {
 func TestStaticPickerEmpty(t *testing.T) {

+ 6 - 6
app/reverse/reverse.go

@@ -7,12 +7,12 @@ package reverse
 import (
 import (
 	"context"
 	"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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/features/routing"
 )
 )
 
 
 const (
 const (

+ 2 - 2
app/router/balancing.go

@@ -3,8 +3,8 @@
 package router
 package router
 
 
 import (
 import (
-	"v2ray.com/core/common/dice"
-	"v2ray.com/core/features/outbound"
+	"v2ray.com/core/v4/common/dice"
+	"v2ray.com/core/v4/features/outbound"
 )
 )
 
 
 type BalancingStrategy interface {
 type BalancingStrategy interface {

+ 2 - 2
app/router/condition.go

@@ -8,8 +8,8 @@ import (
 	"go.starlark.net/starlark"
 	"go.starlark.net/starlark"
 	"go.starlark.net/syntax"
 	"go.starlark.net/syntax"
 
 
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/common/strmatcher"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/strmatcher"
 )
 )
 
 
 type Condition interface {
 type Condition interface {

+ 1 - 1
app/router/condition_geoip.go

@@ -6,7 +6,7 @@ import (
 	"encoding/binary"
 	"encoding/binary"
 	"sort"
 	"sort"
 
 
-	"v2ray.com/core/common/net"
+	"v2ray.com/core/v4/common/net"
 )
 )
 
 
 type ipv6 struct {
 type ipv6 struct {

+ 5 - 5
app/router/condition_geoip_test.go

@@ -6,11 +6,11 @@ import (
 	"testing"
 	"testing"
 
 
 	proto "github.com/golang/protobuf/proto"
 	proto "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"
+	"v2ray.com/core/v4/app/router"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/platform"
+	"v2ray.com/core/v4/common/platform/filesystem"
 )
 )
 
 
 func init() {
 func init() {

+ 9 - 9
app/router/condition_test.go

@@ -8,15 +8,15 @@ import (
 
 
 	proto "github.com/golang/protobuf/proto"
 	proto "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/v4/app/router"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/platform"
+	"v2ray.com/core/v4/common/platform/filesystem"
+	"v2ray.com/core/v4/common/protocol"
+	"v2ray.com/core/v4/common/protocol/http"
+	"v2ray.com/core/v4/common/session"
 )
 )
 
 
 func init() {
 func init() {

+ 2 - 2
app/router/config.go

@@ -3,8 +3,8 @@
 package router
 package router
 
 
 import (
 import (
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/features/outbound"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/features/outbound"
 )
 )
 
 
 // CIDRList is an alias of []*CIDR to provide sort.Interface.
 // CIDRList is an alias of []*CIDR to provide sort.Interface.

+ 1 - 1
app/router/config.pb.go

@@ -4,7 +4,7 @@ import (
 	fmt "fmt"
 	fmt "fmt"
 	proto "github.com/golang/protobuf/proto"
 	proto "github.com/golang/protobuf/proto"
 	math "math"
 	math "math"
-	net "v2ray.com/core/common/net"
+	net "v2ray.com/core/v4/common/net"
 )
 )
 
 
 // Reference imports to suppress errors if they are not otherwise used.
 // Reference imports to suppress errors if they are not otherwise used.

+ 1 - 1
app/router/errors.generated.go

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

+ 7 - 7
app/router/router.go

@@ -7,13 +7,13 @@ package router
 import (
 import (
 	"context"
 	"context"
 
 
-	"v2ray.com/core"
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/common/session"
-	"v2ray.com/core/features/dns"
-	"v2ray.com/core/features/outbound"
-	"v2ray.com/core/features/routing"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/features/dns"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/features/routing"
 )
 )
 
 
 func init() {
 func init() {

+ 6 - 6
app/router/router_test.go

@@ -5,12 +5,12 @@ import (
 	"testing"
 	"testing"
 
 
 	"github.com/golang/mock/gomock"
 	"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"
-	"v2ray.com/core/testing/mocks"
+	. "v2ray.com/core/v4/app/router"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/common/session"
+	"v2ray.com/core/v4/features/outbound"
+	"v2ray.com/core/v4/testing/mocks"
 )
 )
 
 
 type mockOutboundManager struct {
 type mockOutboundManager struct {

+ 5 - 5
app/stats/command/command.go

@@ -11,11 +11,11 @@ import (
 
 
 	grpc "google.golang.org/grpc"
 	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"
+	"v2ray.com/core/v4"
+	"v2ray.com/core/v4/app/stats"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/strmatcher"
+	feature_stats "v2ray.com/core/v4/features/stats"
 )
 )
 
 
 // statsServer is an implementation of StatsService.
 // statsServer is an implementation of StatsService.

+ 3 - 3
app/stats/command/command_test.go

@@ -7,9 +7,9 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp/cmpopts"
 	"github.com/google/go-cmp/cmp/cmpopts"
 
 
-	"v2ray.com/core/app/stats"
-	. "v2ray.com/core/app/stats/command"
-	"v2ray.com/core/common"
+	"v2ray.com/core/v4/app/stats"
+	. "v2ray.com/core/v4/app/stats/command"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 func TestGetStats(t *testing.T) {
 func TestGetStats(t *testing.T) {

+ 1 - 1
app/stats/command/errors.generated.go

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

+ 1 - 1
app/stats/config.go

@@ -5,7 +5,7 @@ package stats
 import (
 import (
 	"context"
 	"context"
 
 
-	"v2ray.com/core/common"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 func init() {
 func init() {

+ 1 - 1
app/stats/errors.generated.go

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

+ 1 - 1
app/stats/stats.go

@@ -9,7 +9,7 @@ import (
 	"sync"
 	"sync"
 	"sync/atomic"
 	"sync/atomic"
 
 
-	"v2ray.com/core/features/stats"
+	"v2ray.com/core/v4/features/stats"
 )
 )
 
 
 // Counter is an implementation of stats.Counter.
 // Counter is an implementation of stats.Counter.

+ 3 - 3
app/stats/stats_test.go

@@ -4,9 +4,9 @@ import (
 	"context"
 	"context"
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/app/stats"
-	"v2ray.com/core/common"
-	"v2ray.com/core/features/stats"
+	. "v2ray.com/core/v4/app/stats"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/features/stats"
 )
 )
 
 
 func TestInternface(t *testing.T) {
 func TestInternface(t *testing.T) {

+ 1 - 1
common/bitmask/byte_test.go

@@ -3,7 +3,7 @@ package bitmask_test
 import (
 import (
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/common/bitmask"
+	. "v2ray.com/core/v4/common/bitmask"
 )
 )
 
 
 func TestBitmaskByte(t *testing.T) {
 func TestBitmaskByte(t *testing.T) {

+ 1 - 1
common/buf/buffer.go

@@ -3,7 +3,7 @@ package buf
 import (
 import (
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common/bytespool"
+	"v2ray.com/core/v4/common/bytespool"
 )
 )
 
 
 const (
 const (

+ 2 - 2
common/buf/buffer_test.go

@@ -6,8 +6,8 @@ import (
 	"testing"
 	"testing"
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/buf"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/buf"
 )
 )
 
 
 func TestBufferClear(t *testing.T) {
 func TestBufferClear(t *testing.T) {

+ 2 - 2
common/buf/copy.go

@@ -4,8 +4,8 @@ import (
 	"io"
 	"io"
 	"time"
 	"time"
 
 
-	"v2ray.com/core/common/errors"
-	"v2ray.com/core/common/signal"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/signal"
 )
 )
 
 
 type dataHandler func(MultiBuffer)
 type dataHandler func(MultiBuffer)

+ 3 - 3
common/buf/copy_test.go

@@ -7,9 +7,9 @@ import (
 
 
 	"github.com/golang/mock/gomock"
 	"github.com/golang/mock/gomock"
 
 
-	"v2ray.com/core/common/buf"
-	"v2ray.com/core/common/errors"
-	"v2ray.com/core/testing/mocks"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/testing/mocks"
 )
 )
 
 
 func TestReadError(t *testing.T) {
 func TestReadError(t *testing.T) {

+ 1 - 1
common/buf/errors.generated.go

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

+ 3 - 3
common/buf/io_test.go

@@ -5,9 +5,9 @@ import (
 	"io"
 	"io"
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/common/buf"
-	"v2ray.com/core/common/net"
-	"v2ray.com/core/testing/servers/tcp"
+	. "v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/net"
+	"v2ray.com/core/v4/testing/servers/tcp"
 )
 )
 
 
 func TestWriterCreation(t *testing.T) {
 func TestWriterCreation(t *testing.T) {

+ 3 - 3
common/buf/multi_buffer.go

@@ -3,9 +3,9 @@ package buf
 import (
 import (
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/errors"
-	"v2ray.com/core/common/serial"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/serial"
 )
 )
 
 
 // ReadAllToBytes reads all content from the reader into a byte array, until EOF.
 // ReadAllToBytes reads all content from the reader into a byte array, until EOF.

+ 2 - 2
common/buf/multi_buffer_test.go

@@ -7,8 +7,8 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/buf"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/buf"
 )
 )
 
 
 func TestMultiBufferRead(t *testing.T) {
 func TestMultiBufferRead(t *testing.T) {

+ 2 - 2
common/buf/reader.go

@@ -3,8 +3,8 @@ package buf
 import (
 import (
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/errors"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
 )
 )
 
 
 func readOneUDP(r io.Reader) (*Buffer, error) {
 func readOneUDP(r io.Reader) (*Buffer, error) {

+ 3 - 3
common/buf/reader_test.go

@@ -5,9 +5,9 @@ import (
 	"strings"
 	"strings"
 	"testing"
 	"testing"
 
 
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/buf"
-	"v2ray.com/core/transport/pipe"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 func TestBytesReaderWriteTo(t *testing.T) {
 func TestBytesReaderWriteTo(t *testing.T) {

+ 1 - 1
common/buf/readv_reader.go

@@ -7,7 +7,7 @@ import (
 	"runtime"
 	"runtime"
 	"syscall"
 	"syscall"
 
 
-	"v2ray.com/core/common/platform"
+	"v2ray.com/core/v4/common/platform"
 )
 )
 
 
 type allocStrategy struct {
 type allocStrategy struct {

+ 3 - 3
common/buf/readv_test.go

@@ -10,9 +10,9 @@ import (
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
 	"golang.org/x/sync/errgroup"
 	"golang.org/x/sync/errgroup"
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/buf"
-	"v2ray.com/core/testing/servers/tcp"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/testing/servers/tcp"
 )
 )
 
 
 func TestReadvReader(t *testing.T) {
 func TestReadvReader(t *testing.T) {

+ 2 - 2
common/buf/writer.go

@@ -5,8 +5,8 @@ import (
 	"net"
 	"net"
 	"sync"
 	"sync"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/errors"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/errors"
 )
 )
 
 
 // BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer.
 // BufferToBytesWriter is a Writer that writes alloc.Buffer into underlying writer.

+ 3 - 3
common/buf/writer_test.go

@@ -9,9 +9,9 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/buf"
-	"v2ray.com/core/transport/pipe"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/transport/pipe"
 )
 )
 
 
 func TestWriter(t *testing.T) {
 func TestWriter(t *testing.T) {

+ 1 - 1
common/common.go

@@ -2,7 +2,7 @@
 // See each sub-package for detail.
 // See each sub-package for detail.
 package common
 package common
 
 
-import "v2ray.com/core/common/errors"
+import "v2ray.com/core/v4/common/errors"
 
 
 //go:generate errorgen
 //go:generate errorgen
 
 

+ 1 - 1
common/common_test.go

@@ -4,7 +4,7 @@ import (
 	"errors"
 	"errors"
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/common"
+	. "v2ray.com/core/v4/common"
 )
 )
 
 
 func TestMust(t *testing.T) {
 func TestMust(t *testing.T) {

+ 1 - 1
common/crypto/aes.go

@@ -4,7 +4,7 @@ import (
 	"crypto/aes"
 	"crypto/aes"
 	"crypto/cipher"
 	"crypto/cipher"
 
 
-	"v2ray.com/core/common"
+	"v2ray.com/core/v4/common"
 )
 )
 
 
 // NewAesDecryptionStream creates a new AES encryption stream based on given key and IV.
 // NewAesDecryptionStream creates a new AES encryption stream based on given key and IV.

+ 4 - 4
common/crypto/auth.go

@@ -5,10 +5,10 @@ import (
 	"io"
 	"io"
 	"math/rand"
 	"math/rand"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/buf"
-	"v2ray.com/core/common/bytespool"
-	"v2ray.com/core/common/protocol"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	"v2ray.com/core/v4/common/bytespool"
+	"v2ray.com/core/v4/common/protocol"
 )
 )
 
 
 type BytesGenerator func() []byte
 type BytesGenerator func() []byte

+ 4 - 4
common/crypto/auth_test.go

@@ -10,10 +10,10 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"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"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	. "v2ray.com/core/v4/common/crypto"
+	"v2ray.com/core/v4/common/protocol"
 )
 )
 
 
 func TestAuthenticationReaderWriter(t *testing.T) {
 func TestAuthenticationReaderWriter(t *testing.T) {

+ 1 - 1
common/crypto/benchmark_test.go

@@ -4,7 +4,7 @@ import (
 	"crypto/cipher"
 	"crypto/cipher"
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/common/crypto"
+	. "v2ray.com/core/v4/common/crypto"
 )
 )
 
 
 const benchSize = 1024 * 1024
 const benchSize = 1024 * 1024

+ 1 - 1
common/crypto/chacha20.go

@@ -3,7 +3,7 @@ package crypto
 import (
 import (
 	"crypto/cipher"
 	"crypto/cipher"
 
 
-	"v2ray.com/core/common/crypto/internal"
+	"v2ray.com/core/v4/common/crypto/internal"
 )
 )
 
 
 // NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV.
 // NewChaCha20Stream creates a new Chacha20 encryption/descryption stream based on give key and IV.

+ 2 - 2
common/crypto/chacha20_test.go

@@ -7,8 +7,8 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
-	"v2ray.com/core/common"
-	. "v2ray.com/core/common/crypto"
+	"v2ray.com/core/v4/common"
+	. "v2ray.com/core/v4/common/crypto"
 )
 )
 
 
 func mustDecodeHex(s string) []byte {
 func mustDecodeHex(s string) []byte {

+ 2 - 2
common/crypto/chunk.go

@@ -4,8 +4,8 @@ import (
 	"encoding/binary"
 	"encoding/binary"
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/buf"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
 )
 )
 
 
 // ChunkSizeDecoder is a utility class to decode size value from bytes.
 // ChunkSizeDecoder is a utility class to decode size value from bytes.

+ 3 - 3
common/crypto/chunk_test.go

@@ -5,9 +5,9 @@ import (
 	"io"
 	"io"
 	"testing"
 	"testing"
 
 
-	"v2ray.com/core/common"
-	"v2ray.com/core/common/buf"
-	. "v2ray.com/core/common/crypto"
+	"v2ray.com/core/v4/common"
+	"v2ray.com/core/v4/common/buf"
+	. "v2ray.com/core/v4/common/crypto"
 )
 )
 
 
 func TestChunkStreamIO(t *testing.T) {
 func TestChunkStreamIO(t *testing.T) {

+ 1 - 1
common/crypto/errors.generated.go

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

+ 1 - 1
common/crypto/io.go

@@ -4,7 +4,7 @@ import (
 	"crypto/cipher"
 	"crypto/cipher"
 	"io"
 	"io"
 
 
-	"v2ray.com/core/common/buf"
+	"v2ray.com/core/v4/common/buf"
 )
 )
 
 
 type CryptionReader struct {
 type CryptionReader struct {

+ 1 - 1
common/dice/dice_test.go

@@ -4,7 +4,7 @@ import (
 	"math/rand"
 	"math/rand"
 	"testing"
 	"testing"
 
 
-	. "v2ray.com/core/common/dice"
+	. "v2ray.com/core/v4/common/dice"
 )
 )
 
 
 func BenchmarkRoll1(b *testing.B) {
 func BenchmarkRoll1(b *testing.B) {

+ 1 - 1
common/errors.generated.go

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

+ 2 - 2
common/errors/errors.go

@@ -6,8 +6,8 @@ import (
 	"reflect"
 	"reflect"
 	"strings"
 	"strings"
 
 
-	"v2ray.com/core/common/log"
-	"v2ray.com/core/common/serial"
+	"v2ray.com/core/v4/common/log"
+	"v2ray.com/core/v4/common/serial"
 )
 )
 
 
 type hasInnerError interface {
 type hasInnerError interface {

+ 2 - 2
common/errors/errors_test.go

@@ -7,8 +7,8 @@ import (
 
 
 	"github.com/google/go-cmp/cmp"
 	"github.com/google/go-cmp/cmp"
 
 
-	. "v2ray.com/core/common/errors"
-	"v2ray.com/core/common/log"
+	. "v2ray.com/core/v4/common/errors"
+	"v2ray.com/core/v4/common/log"
 )
 )
 
 
 func TestError(t *testing.T) {
 func TestError(t *testing.T) {

+ 1 - 1
common/interfaces.go

@@ -1,6 +1,6 @@
 package common
 package common
 
 
-import "v2ray.com/core/common/errors"
+import "v2ray.com/core/v4/common/errors"
 
 
 // Closable is the interface for objects that can release its resources.
 // Closable is the interface for objects that can release its resources.
 //
 //

+ 1 - 1
common/log/access.go

@@ -3,7 +3,7 @@ package log
 import (
 import (
 	"strings"
 	"strings"
 
 
-	"v2ray.com/core/common/serial"
+	"v2ray.com/core/v4/common/serial"
 )
 )
 
 
 type AccessStatus string
 type AccessStatus string

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