mirror of
https://github.com/v2ray/v2ray-core.git
synced 2026-11-13 22:45:13 +00:00
barely working http proxy
This commit is contained in:
1 parent
d0a75ce9f3
commit
e12e5a0ecb
10 files changed
+139
-31
No files matched your search
@@ -24,6 +24,7 @@ func TestDokodemoTCP(t *testing.T) {
|
||||
}
|
||||
_, err := tcpServer.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer tcpServer.Close()
|
||||
|
||||
assert.Error(InitializeServerSetOnce("test_2")).IsNil()
|
||||
|
||||
|
||||
@@ -24,6 +24,7 @@ func TestRouter(t *testing.T) {
|
||||
}
|
||||
_, err := tcpServer.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer tcpServer.Close()
|
||||
|
||||
tcpServer2Accessed := false
|
||||
tcpServer2 := &tcp.Server{
|
||||
@@ -35,6 +36,7 @@ func TestRouter(t *testing.T) {
|
||||
}
|
||||
_, err = tcpServer2.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer tcpServer2.Close()
|
||||
|
||||
assert.Error(InitializeServerSetOnce("test_3")).IsNil()
|
||||
|
||||
|
||||
@@ -31,12 +31,13 @@ func TestTCPConnection(t *testing.T) {
|
||||
}
|
||||
_, err := tcpServer.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer tcpServer.Close()
|
||||
|
||||
assert.Error(InitializeServerSetOnce("test_1")).IsNil()
|
||||
|
||||
socksPort := v2net.Port(50000)
|
||||
|
||||
for i := 0; i < 100; i++ {
|
||||
for i := 0; i < 10; i++ {
|
||||
conn, err := net.DialTCP("tcp", nil, &net.TCPAddr{
|
||||
IP: []byte{127, 0, 0, 1},
|
||||
Port: int(socksPort),
|
||||
@@ -98,6 +99,7 @@ func TestTCPBind(t *testing.T) {
|
||||
}
|
||||
_, err := tcpServer.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer tcpServer.Close()
|
||||
|
||||
assert.Error(InitializeServerSetOnce("test_1")).IsNil()
|
||||
|
||||
@@ -146,6 +148,7 @@ func TestUDPAssociate(t *testing.T) {
|
||||
}
|
||||
_, err := udpServer.Start()
|
||||
assert.Error(err).IsNil()
|
||||
defer udpServer.Close()
|
||||
|
||||
assert.Error(InitializeServerSetOnce("test_1")).IsNil()
|
||||
|
||||
|
||||
Reference in new issue
Block a user