barely working http proxy

This commit is contained in:
v2ray committed 2015-12-15 16:00:47 +01:00
1 parent d0a75ce9f3
commit e12e5a0ecb
10 files changed
+139 -31

No files matched your search

+1
View File
@@ -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()
+2
View File
@@ -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()
+4 -1
View File
@@ -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()