1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2026-01-04 16:25:21 -05:00

Chore: change module name (#677)

This commit is contained in:
Loyalsoldier
2021-02-17 04:31:50 +08:00
committed by GitHub
parent 0957442e01
commit f94dd11a8c
623 changed files with 2532 additions and 2404 deletions

View File

@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: v2ray.com/core/features/dns (interfaces: Client)
// Source: github.com/v2fly/v2ray-core/v4/features/dns (interfaces: Client)
// Package mocks is a generated GoMock package.
package mocks

View File

@@ -1,13 +1,13 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: v2ray.com/core/common/log (interfaces: Handler)
// Source: github.com/v2fly/v2ray-core/v4/common/log (interfaces: Handler)
// Package mocks is a generated GoMock package.
package mocks
import (
gomock "github.com/golang/mock/gomock"
log "github.com/v2fly/v2ray-core/v4/common/log"
reflect "reflect"
log "v2ray.com/core/common/log"
)
// LogHandler is a mock of Handler interface

View File

@@ -1,13 +1,13 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: v2ray.com/core/common/mux (interfaces: ClientWorkerFactory)
// Source: github.com/v2fly/v2ray-core/v4/common/mux (interfaces: ClientWorkerFactory)
// Package mocks is a generated GoMock package.
package mocks
import (
gomock "github.com/golang/mock/gomock"
mux "github.com/v2fly/v2ray-core/v4/common/mux"
reflect "reflect"
mux "v2ray.com/core/common/mux"
)
// MuxClientWorkerFactory is a mock of ClientWorkerFactory interface

View File

@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: v2ray.com/core/features/outbound (interfaces: Manager,HandlerSelector)
// Source: github.com/v2fly/v2ray-core/v4/features/outbound (interfaces: Manager,HandlerSelector)
// Package mocks is a generated GoMock package.
package mocks
@@ -7,8 +7,8 @@ package mocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
outbound "github.com/v2fly/v2ray-core/v4/features/outbound"
reflect "reflect"
outbound "v2ray.com/core/features/outbound"
)
// OutboundManager is a mock of Manager interface

View File

@@ -1,5 +1,5 @@
// Code generated by MockGen. DO NOT EDIT.
// Source: v2ray.com/core/proxy (interfaces: Inbound,Outbound)
// Source: github.com/v2fly/v2ray-core/v4/proxy (interfaces: Inbound,Outbound)
// Package mocks is a generated GoMock package.
package mocks
@@ -7,11 +7,11 @@ package mocks
import (
context "context"
gomock "github.com/golang/mock/gomock"
net "github.com/v2fly/v2ray-core/v4/common/net"
routing "github.com/v2fly/v2ray-core/v4/features/routing"
transport "github.com/v2fly/v2ray-core/v4/transport"
internet "github.com/v2fly/v2ray-core/v4/transport/internet"
reflect "reflect"
net "v2ray.com/core/common/net"
routing "v2ray.com/core/features/routing"
transport "v2ray.com/core/transport"
internet "v2ray.com/core/transport/internet"
)
// ProxyInbound is a mock of Inbound interface

View File

@@ -11,25 +11,26 @@ import (
"github.com/google/go-cmp/cmp"
"github.com/google/go-cmp/cmp/cmpopts"
"google.golang.org/grpc"
"v2ray.com/core"
"v2ray.com/core/app/commander"
"v2ray.com/core/app/policy"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/proxyman/command"
"v2ray.com/core/app/router"
"v2ray.com/core/app/stats"
statscmd "v2ray.com/core/app/stats/command"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/commander"
"github.com/v2fly/v2ray-core/v4/app/policy"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/proxyman/command"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/app/stats"
statscmd "github.com/v2fly/v2ray-core/v4/app/stats/command"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestCommanderRemoveHandler(t *testing.T) {
@@ -282,7 +283,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
Operation: serial.ToTypedMessage(
&command.AddUserOperation{
User: &protocol.User{
Email: "test@v2ray.com",
Email: "test@v2fly.org",
Account: serial.ToTypedMessage(&vmess.Account{
Id: u2.String(),
AlterId: 64,
@@ -301,7 +302,7 @@ func TestCommanderAddRemoveUser(t *testing.T) {
resp, err = hsClient.AlterInbound(context.Background(), &command.AlterInboundRequest{
Tag: "v",
Operation: serial.ToTypedMessage(&command.RemoveUserOperation{Email: "test@v2ray.com"}),
Operation: serial.ToTypedMessage(&command.RemoveUserOperation{Email: "test@v2fly.org"}),
})
common.Must(err)
if resp == nil {

View File

@@ -14,15 +14,16 @@ import (
"time"
"github.com/golang/protobuf/proto"
"v2ray.com/core"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/errors"
"v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/retry"
"v2ray.com/core/common/serial"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/errors"
"github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/retry"
"github.com/v2fly/v2ray-core/v4/common/serial"
)
func xor(b []byte) []byte {
@@ -118,7 +119,7 @@ func genTestBinaryPath() {
}
func GetSourcePath() string {
return filepath.Join("v2ray.com", "core", "main")
return filepath.Join("github.com", "v2fly", "v2ray-core", "v4", "main")
}
func CloseAllServers(servers []*exec.Cmd) {

View File

@@ -7,7 +7,7 @@ import (
"os"
"os/exec"
"v2ray.com/core/common/uuid"
"github.com/v2fly/v2ray-core/v4/common/uuid"
)
func BuildV2Ray() error {
@@ -16,7 +16,7 @@ func BuildV2Ray() error {
return nil
}
cmd := exec.Command("go", "test", "-tags", "coverage coveragemain", "-coverpkg", "v2ray.com/core/...", "-c", "-o", testBinaryPath, GetSourcePath())
cmd := exec.Command("go", "test", "-tags", "coverage coveragemain", "-coverpkg", "github.com/v2fly/v2ray-core/v4/...", "-c", "-o", testBinaryPath, GetSourcePath())
return cmd.Run()
}

View File

@@ -6,17 +6,18 @@ import (
"time"
xproxy "golang.org/x/net/proxy"
"v2ray.com/core"
"v2ray.com/core/app/dns"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/router"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/serial"
"v2ray.com/core/proxy/blackhole"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/socks"
"v2ray.com/core/testing/servers/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dns"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestResolveIP(t *testing.T) {

View File

@@ -5,22 +5,23 @@ import (
"time"
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
)
func TestDokodemoTCP(t *testing.T) {

View File

@@ -9,30 +9,31 @@ import (
"time"
xproxy "golang.org/x/net/proxy"
"v2ray.com/core"
"v2ray.com/core/app/dispatcher"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
_ "v2ray.com/core/app/proxyman/inbound"
_ "v2ray.com/core/app/proxyman/outbound"
"v2ray.com/core/app/router"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/blackhole"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
v2http "v2ray.com/core/proxy/http"
"v2ray.com/core/proxy/socks"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
"v2ray.com/core/transport/internet"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/dispatcher"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
_ "github.com/v2fly/v2ray-core/v4/app/proxyman/inbound"
_ "github.com/v2fly/v2ray-core/v4/app/proxyman/outbound"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
v2http "github.com/v2fly/v2ray-core/v4/proxy/http"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
"github.com/v2fly/v2ray-core/v4/transport/internet"
)
func TestPassiveConnection(t *testing.T) {

View File

@@ -12,16 +12,17 @@ import (
"time"
"github.com/google/go-cmp/cmp"
"v2ray.com/core"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
"v2ray.com/core/common/serial"
"v2ray.com/core/proxy/freedom"
v2http "v2ray.com/core/proxy/http"
v2httptest "v2ray.com/core/testing/servers/http"
"v2ray.com/core/testing/servers/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
v2http "github.com/v2fly/v2ray-core/v4/proxy/http"
v2httptest "github.com/v2fly/v2ray-core/v4/testing/servers/http"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestHttpConformance(t *testing.T) {

View File

@@ -7,22 +7,22 @@ import (
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/policy"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/policy"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func startQuickClosingTCPServer() (net.Listener, error) {

View File

@@ -6,25 +6,25 @@ import (
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/policy"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/reverse"
"v2ray.com/core/app/router"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/blackhole"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/policy"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/reverse"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
)
func TestReverseProxy(t *testing.T) {
@@ -46,7 +46,7 @@ func TestReverseProxy(t *testing.T) {
PortalConfig: []*reverse.PortalConfig{
{
Tag: "portal",
Domain: "test.v2ray.com",
Domain: "test.v2fly.org",
},
},
}),
@@ -54,7 +54,7 @@ func TestReverseProxy(t *testing.T) {
Rule: []*router.RoutingRule{
{
Domain: []*router.Domain{
{Type: router.Domain_Full, Value: "test.v2ray.com"},
{Type: router.Domain_Full, Value: "test.v2fly.org"},
},
TargetTag: &router.RoutingRule_Tag{
Tag: "portal",
@@ -115,7 +115,7 @@ func TestReverseProxy(t *testing.T) {
BridgeConfig: []*reverse.BridgeConfig{
{
Tag: "bridge",
Domain: "test.v2ray.com",
Domain: "test.v2fly.org",
},
},
}),
@@ -123,7 +123,7 @@ func TestReverseProxy(t *testing.T) {
Rule: []*router.RoutingRule{
{
Domain: []*router.Domain{
{Type: router.Domain_Full, Value: "test.v2ray.com"},
{Type: router.Domain_Full, Value: "test.v2fly.org"},
},
TargetTag: &router.RoutingRule_Tag{
Tag: "reverse",
@@ -231,7 +231,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
PortalConfig: []*reverse.PortalConfig{
{
Tag: "portal",
Domain: "test.v2ray.com",
Domain: "test.v2fly.org",
},
},
}),
@@ -239,7 +239,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
Rule: []*router.RoutingRule{
{
Domain: []*router.Domain{
{Type: router.Domain_Full, Value: "test.v2ray.com"},
{Type: router.Domain_Full, Value: "test.v2fly.org"},
},
TargetTag: &router.RoutingRule_Tag{
Tag: "portal",
@@ -314,7 +314,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
BridgeConfig: []*reverse.BridgeConfig{
{
Tag: "bridge",
Domain: "test.v2ray.com",
Domain: "test.v2fly.org",
},
},
}),
@@ -322,7 +322,7 @@ func TestReverseProxyLongRunning(t *testing.T) {
Rule: []*router.RoutingRule{
{
Domain: []*router.Domain{
{Type: router.Domain_Full, Value: "test.v2ray.com"},
{Type: router.Domain_Full, Value: "test.v2fly.org"},
},
TargetTag: &router.RoutingRule_Tag{
Tag: "reverse",

View File

@@ -6,19 +6,19 @@ import (
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/shadowsocks"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/shadowsocks"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
)
func TestShadowsocksChaCha20Poly1305TCP(t *testing.T) {

View File

@@ -7,19 +7,19 @@ import (
xproxy "golang.org/x/net/proxy"
socks4 "h12.io/socks"
"v2ray.com/core"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/app/router"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/proxy/blackhole"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/socks"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/app/router"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/proxy/blackhole"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/socks"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
)
func TestSocksBridgeTCP(t *testing.T) {

View File

@@ -8,25 +8,25 @@ import (
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/protocol/tls/cert"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/internet/http"
"v2ray.com/core/transport/internet/tls"
"v2ray.com/core/transport/internet/websocket"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/protocol/tls/cert"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/http"
"github.com/v2fly/v2ray-core/v4/transport/internet/tls"
"github.com/v2fly/v2ray-core/v4/transport/internet/websocket"
)
func TestSimpleTLSConnection(t *testing.T) {
@@ -228,7 +228,7 @@ func TestAutoIssuingCertificate(t *testing.T) {
SecurityType: serial.GetMessageType(&tls.Config{}),
SecuritySettings: []*serial.TypedMessage{
serial.ToTypedMessage(&tls.Config{
ServerName: "v2ray.com",
ServerName: "v2fly.org",
Certificate: []*tls.Certificate{{
Certificate: certPEM,
Usage: tls.Certificate_AUTHORITY_VERIFY,
@@ -488,7 +488,7 @@ func TestHTTP2(t *testing.T) {
{
Protocol: internet.TransportProtocol_HTTP,
Settings: serial.ToTypedMessage(&http.Config{
Host: []string{"v2ray.com"},
Host: []string{"v2fly.org"},
Path: "/testpath",
}),
},
@@ -560,7 +560,7 @@ func TestHTTP2(t *testing.T) {
{
Protocol: internet.TransportProtocol_HTTP,
Settings: serial.ToTypedMessage(&http.Config{
Host: []string{"v2ray.com"},
Host: []string{"v2fly.org"},
Path: "/testpath",
}),
},

View File

@@ -8,27 +8,27 @@ import (
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/internet/domainsocket"
"v2ray.com/core/transport/internet/headers/http"
"v2ray.com/core/transport/internet/headers/wechat"
"v2ray.com/core/transport/internet/quic"
tcptransport "v2ray.com/core/transport/internet/tcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/domainsocket"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/http"
"github.com/v2fly/v2ray-core/v4/transport/internet/headers/wechat"
"github.com/v2fly/v2ray-core/v4/transport/internet/quic"
tcptransport "github.com/v2fly/v2ray-core/v4/transport/internet/tcp"
)
func TestHTTPConnectionHeader(t *testing.T) {

View File

@@ -6,24 +6,25 @@ import (
"time"
"golang.org/x/sync/errgroup"
"v2ray.com/core"
"v2ray.com/core/app/log"
"v2ray.com/core/app/proxyman"
"v2ray.com/core/common"
clog "v2ray.com/core/common/log"
"v2ray.com/core/common/net"
"v2ray.com/core/common/protocol"
"v2ray.com/core/common/serial"
"v2ray.com/core/common/uuid"
"v2ray.com/core/proxy/dokodemo"
"v2ray.com/core/proxy/freedom"
"v2ray.com/core/proxy/vmess"
"v2ray.com/core/proxy/vmess/inbound"
"v2ray.com/core/proxy/vmess/outbound"
"v2ray.com/core/testing/servers/tcp"
"v2ray.com/core/testing/servers/udp"
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/internet/kcp"
core "github.com/v2fly/v2ray-core/v4"
"github.com/v2fly/v2ray-core/v4/app/log"
"github.com/v2fly/v2ray-core/v4/app/proxyman"
"github.com/v2fly/v2ray-core/v4/common"
clog "github.com/v2fly/v2ray-core/v4/common/log"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/protocol"
"github.com/v2fly/v2ray-core/v4/common/serial"
"github.com/v2fly/v2ray-core/v4/common/uuid"
"github.com/v2fly/v2ray-core/v4/proxy/dokodemo"
"github.com/v2fly/v2ray-core/v4/proxy/freedom"
"github.com/v2fly/v2ray-core/v4/proxy/vmess"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/inbound"
"github.com/v2fly/v2ray-core/v4/proxy/vmess/outbound"
"github.com/v2fly/v2ray-core/v4/testing/servers/tcp"
"github.com/v2fly/v2ray-core/v4/testing/servers/udp"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/internet/kcp"
)
func TestVMessDynamicPort(t *testing.T) {

View File

@@ -3,7 +3,7 @@ package tcp
import (
"net/http"
"v2ray.com/core/common/net"
"github.com/v2fly/v2ray-core/v4/common/net"
)
type Server struct {

View File

@@ -1,6 +1,6 @@
package tcp
import "v2ray.com/core/common/net"
import "github.com/v2fly/v2ray-core/v4/common/net"
// PickPort returns an unused TCP port of the system.
func PickPort() net.Port {

View File

@@ -5,11 +5,11 @@ import (
"fmt"
"io"
"v2ray.com/core/common/buf"
"v2ray.com/core/common/net"
"v2ray.com/core/common/task"
"v2ray.com/core/transport/internet"
"v2ray.com/core/transport/pipe"
"github.com/v2fly/v2ray-core/v4/common/buf"
"github.com/v2fly/v2ray-core/v4/common/net"
"github.com/v2fly/v2ray-core/v4/common/task"
"github.com/v2fly/v2ray-core/v4/transport/internet"
"github.com/v2fly/v2ray-core/v4/transport/pipe"
)
type Server struct {

View File

@@ -1,6 +1,6 @@
package udp
import "v2ray.com/core/common/net"
import "github.com/v2fly/v2ray-core/v4/common/net"
// PickPort returns an unused UDP port of the system.
func PickPort() net.Port {

View File

@@ -3,7 +3,7 @@ package udp
import (
"fmt"
"v2ray.com/core/common/net"
"github.com/v2fly/v2ray-core/v4/common/net"
)
type Server struct {