1
0
mirror of https://github.com/v2fly/v2ray-core.git synced 2024-12-22 10:08:15 -05:00
v2fly/net/socks/socks_test.go

40 lines
837 B
Go
Raw Normal View History

2015-09-11 08:12:09 -04:00
package socks
import (
2015-09-12 05:55:51 -04:00
// "bytes"
2015-09-11 08:12:09 -04:00
"testing"
2015-09-12 05:55:51 -04:00
// "github.com/v2ray/v2ray-core"
// "github.com/v2ray/v2ray-core/testing/mocks"
// "github.com/v2ray/v2ray-core/testing/unit"
2015-09-11 08:12:09 -04:00
)
func TestSocksTcpConnect(t *testing.T) {
t.Skip("Not ready yet.")
2015-09-12 14:36:21 -04:00
/*
assert := unit.Assert(t)
2015-09-11 08:12:09 -04:00
2015-09-12 14:36:21 -04:00
port := uint16(12384)
2015-09-11 08:12:09 -04:00
2015-09-12 14:36:21 -04:00
uuid := "2418d087-648d-4990-86e8-19dca1d006d3"
2015-09-12 16:11:54 -04:00
id, err := core.UUIDToID(uuid)
2015-09-12 14:36:21 -04:00
assert.Error(err).IsNil()
2015-09-11 08:12:09 -04:00
2015-09-12 14:36:21 -04:00
config := core.VConfig{
port,
2015-09-12 16:11:54 -04:00
[]core.User{core.User{id}},
2015-09-12 14:36:21 -04:00
"",
[]core.VNext{}}
2015-09-11 08:12:09 -04:00
2015-09-12 14:36:21 -04:00
och := new(mocks.FakeOutboundConnectionHandler)
och.Data2Send = bytes.NewBuffer(make([]byte, 1024))
och.Data2Return = []byte("The data to be returned to socks server.")
2015-09-11 08:12:09 -04:00
2015-09-12 16:11:54 -04:00
vpoint, err := core.NewPoint(&config, SocksServerFactory{}, och)
2015-09-12 14:36:21 -04:00
assert.Error(err).IsNil()
2015-09-11 08:12:09 -04:00
2015-09-12 14:36:21 -04:00
err = vpoint.Start()
assert.Error(err).IsNil()
*/
2015-09-11 08:12:09 -04:00
}