mirror of https://github.com/v2ray/v2ray-core
parent
1d3c8098e9
commit
6c9a60100d
|
@ -10,8 +10,8 @@ import (
|
||||||
"io"
|
"io"
|
||||||
|
|
||||||
. "v2ray.com/core/common/buf"
|
. "v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/transport/ray"
|
"v2ray.com/core/transport/ray"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestWriter(t *testing.T) {
|
func TestWriter(t *testing.T) {
|
||||||
|
|
|
@ -14,8 +14,8 @@ import (
|
||||||
"v2ray.com/core/proxy/blackhole"
|
"v2ray.com/core/proxy/blackhole"
|
||||||
"v2ray.com/core/proxy/freedom"
|
"v2ray.com/core/proxy/freedom"
|
||||||
"v2ray.com/core/proxy/socks"
|
"v2ray.com/core/proxy/socks"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestResolveIP(t *testing.T) {
|
func TestResolveIP(t *testing.T) {
|
||||||
|
|
|
@ -15,9 +15,9 @@ import (
|
||||||
"v2ray.com/core/proxy/vmess"
|
"v2ray.com/core/proxy/vmess"
|
||||||
"v2ray.com/core/proxy/vmess/inbound"
|
"v2ray.com/core/proxy/vmess/inbound"
|
||||||
"v2ray.com/core/proxy/vmess/outbound"
|
"v2ray.com/core/proxy/vmess/outbound"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDokodemoTCP(t *testing.T) {
|
func TestDokodemoTCP(t *testing.T) {
|
||||||
|
|
|
@ -24,10 +24,10 @@ import (
|
||||||
"v2ray.com/core/proxy/vmess"
|
"v2ray.com/core/proxy/vmess"
|
||||||
"v2ray.com/core/proxy/vmess/inbound"
|
"v2ray.com/core/proxy/vmess/inbound"
|
||||||
"v2ray.com/core/proxy/vmess/outbound"
|
"v2ray.com/core/proxy/vmess/outbound"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestPassiveConnection(t *testing.T) {
|
func TestPassiveConnection(t *testing.T) {
|
||||||
|
|
|
@ -15,9 +15,9 @@ import (
|
||||||
"v2ray.com/core/proxy/dokodemo"
|
"v2ray.com/core/proxy/dokodemo"
|
||||||
"v2ray.com/core/proxy/freedom"
|
"v2ray.com/core/proxy/freedom"
|
||||||
"v2ray.com/core/proxy/shadowsocks"
|
"v2ray.com/core/proxy/shadowsocks"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestShadowsocksAES256TCP(t *testing.T) {
|
func TestShadowsocksAES256TCP(t *testing.T) {
|
||||||
|
|
|
@ -13,9 +13,9 @@ import (
|
||||||
"v2ray.com/core/proxy/dokodemo"
|
"v2ray.com/core/proxy/dokodemo"
|
||||||
"v2ray.com/core/proxy/freedom"
|
"v2ray.com/core/proxy/freedom"
|
||||||
"v2ray.com/core/proxy/socks"
|
"v2ray.com/core/proxy/socks"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSocksBridgeTCP(t *testing.T) {
|
func TestSocksBridgeTCP(t *testing.T) {
|
||||||
|
|
|
@ -16,12 +16,12 @@ import (
|
||||||
"v2ray.com/core/proxy/vmess"
|
"v2ray.com/core/proxy/vmess"
|
||||||
"v2ray.com/core/proxy/vmess/inbound"
|
"v2ray.com/core/proxy/vmess/inbound"
|
||||||
"v2ray.com/core/proxy/vmess/outbound"
|
"v2ray.com/core/proxy/vmess/outbound"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
tlsgen "v2ray.com/core/testing/tls"
|
tlsgen "v2ray.com/core/testing/tls"
|
||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
"v2ray.com/core/transport/internet/tls"
|
"v2ray.com/core/transport/internet/tls"
|
||||||
"v2ray.com/core/transport/internet/websocket"
|
"v2ray.com/core/transport/internet/websocket"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimpleTLSConnection(t *testing.T) {
|
func TestSimpleTLSConnection(t *testing.T) {
|
||||||
|
|
|
@ -15,11 +15,11 @@ import (
|
||||||
"v2ray.com/core/proxy/vmess"
|
"v2ray.com/core/proxy/vmess"
|
||||||
"v2ray.com/core/proxy/vmess/inbound"
|
"v2ray.com/core/proxy/vmess/inbound"
|
||||||
"v2ray.com/core/proxy/vmess/outbound"
|
"v2ray.com/core/proxy/vmess/outbound"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
"v2ray.com/core/transport/internet/headers/http"
|
"v2ray.com/core/transport/internet/headers/http"
|
||||||
tcptransport "v2ray.com/core/transport/internet/tcp"
|
tcptransport "v2ray.com/core/transport/internet/tcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestHttpConnectionHeader(t *testing.T) {
|
func TestHttpConnectionHeader(t *testing.T) {
|
||||||
|
|
|
@ -18,10 +18,10 @@ import (
|
||||||
"v2ray.com/core/proxy/vmess"
|
"v2ray.com/core/proxy/vmess"
|
||||||
"v2ray.com/core/proxy/vmess/inbound"
|
"v2ray.com/core/proxy/vmess/inbound"
|
||||||
"v2ray.com/core/proxy/vmess/outbound"
|
"v2ray.com/core/proxy/vmess/outbound"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
"v2ray.com/core/testing/servers/udp"
|
"v2ray.com/core/testing/servers/udp"
|
||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestVMessDynamicPort(t *testing.T) {
|
func TestVMessDynamicPort(t *testing.T) {
|
||||||
|
|
|
@ -5,9 +5,9 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/net"
|
"v2ray.com/core/common/net"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/testing/servers/tcp"
|
"v2ray.com/core/testing/servers/tcp"
|
||||||
. "v2ray.com/core/transport/internet"
|
. "v2ray.com/core/transport/internet"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDialWithLocalAddr(t *testing.T) {
|
func TestDialWithLocalAddr(t *testing.T) {
|
||||||
|
|
|
@ -3,11 +3,11 @@ package internet_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet"
|
. "v2ray.com/core/transport/internet"
|
||||||
"v2ray.com/core/transport/internet/headers/noop"
|
"v2ray.com/core/transport/internet/headers/noop"
|
||||||
"v2ray.com/core/transport/internet/headers/srtp"
|
"v2ray.com/core/transport/internet/headers/srtp"
|
||||||
"v2ray.com/core/transport/internet/headers/utp"
|
"v2ray.com/core/transport/internet/headers/utp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestAllHeadersLoadable(t *testing.T) {
|
func TestAllHeadersLoadable(t *testing.T) {
|
||||||
|
|
|
@ -8,8 +8,8 @@ import (
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
"v2ray.com/core/common/net"
|
"v2ray.com/core/common/net"
|
||||||
"v2ray.com/core/common/serial"
|
"v2ray.com/core/common/serial"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/headers/http"
|
. "v2ray.com/core/transport/internet/headers/http"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestReaderWriter(t *testing.T) {
|
func TestReaderWriter(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/headers/srtp"
|
. "v2ray.com/core/transport/internet/headers/srtp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSRTPWrite(t *testing.T) {
|
func TestSRTPWrite(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/headers/utp"
|
. "v2ray.com/core/transport/internet/headers/utp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUTPWrite(t *testing.T) {
|
func TestUTPWrite(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/headers/wechat"
|
. "v2ray.com/core/transport/internet/headers/wechat"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestUTPWrite(t *testing.T) {
|
func TestUTPWrite(t *testing.T) {
|
||||||
|
|
|
@ -5,8 +5,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/kcp"
|
. "v2ray.com/core/transport/internet/kcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
type NoOpConn struct{}
|
type NoOpConn struct{}
|
||||||
|
|
|
@ -3,8 +3,8 @@ package kcp_test
|
||||||
import (
|
import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/kcp"
|
. "v2ray.com/core/transport/internet/kcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestSimpleAuthenticator(t *testing.T) {
|
func TestSimpleAuthenticator(t *testing.T) {
|
||||||
|
|
|
@ -9,9 +9,9 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"v2ray.com/core/common/net"
|
"v2ray.com/core/common/net"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
"v2ray.com/core/transport/internet"
|
"v2ray.com/core/transport/internet"
|
||||||
. "v2ray.com/core/transport/internet/kcp"
|
. "v2ray.com/core/transport/internet/kcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestDialAndListen(t *testing.T) {
|
func TestDialAndListen(t *testing.T) {
|
||||||
|
|
|
@ -4,8 +4,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/internet/kcp"
|
. "v2ray.com/core/transport/internet/kcp"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestBadSegment(t *testing.T) {
|
func TestBadSegment(t *testing.T) {
|
||||||
|
|
|
@ -6,8 +6,8 @@ import (
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"v2ray.com/core/common/buf"
|
"v2ray.com/core/common/buf"
|
||||||
. "v2ray.com/ext/assert"
|
|
||||||
. "v2ray.com/core/transport/ray"
|
. "v2ray.com/core/transport/ray"
|
||||||
|
. "v2ray.com/ext/assert"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestStreamIO(t *testing.T) {
|
func TestStreamIO(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue