(password []byte, src string, client net.Conn, timeout int, dst []byte)
| 34 | } |
| 35 | |
| 36 | func NewSimplePacketServer(password []byte, src string, client net.Conn, timeout int, dst []byte) (Exchanger, error) { |
| 37 | s := &SimplePacketServer{Password: password, Client: client, Timeout: timeout, src: src} |
| 38 | s.RB = x.BP65507.Get().([]byte) |
| 39 | s.WB = x.BP65507.Get().([]byte) |
| 40 | s.dstl = copy(s.WB[:len(dst)], dst) |
| 41 | s.dst = socks5.ToAddress(dst[0], dst[1:s.dstl-2], dst[s.dstl-2:]) |
| 42 | return ServerGate(s) |
| 43 | } |
| 44 | |
| 45 | func (s *SimplePacketServer) Exchange(remote net.Conn) error { |
| 46 | go func() { |