(password []byte, src string, server net.Conn, timeout int, dst []byte)
| 35 | } |
| 36 | |
| 37 | func NewSimplePacketClient(password []byte, src string, server net.Conn, timeout int, dst []byte) (Exchanger, error) { |
| 38 | s := &SimplePacketClient{Password: password, Server: server, Timeout: timeout, src: src} |
| 39 | s.RB = x.BP65507.Get().([]byte) |
| 40 | s.WB = x.BP65507.Get().([]byte) |
| 41 | s.dstl = copy(s.WB[32+4:32+4+len(dst)], dst) |
| 42 | s.dst = socks5.ToAddress(dst[0], dst[1:s.dstl-2], dst[s.dstl-2:]) |
| 43 | return ClientGate(s) |
| 44 | } |
| 45 | |
| 46 | func (c *SimplePacketClient) Exchange(local net.Conn) error { |
| 47 | go func() { |
no test coverage detected