NewConnectionHandler creates a standard SOCKS5 connection handler This process connections from a generic TCP listener from the standard library
(requestHandler RequestHandler)
| 21 | // NewConnectionHandler creates a standard SOCKS5 connection handler |
| 22 | // This process connections from a generic TCP listener from the standard library |
| 23 | func NewConnectionHandler(requestHandler RequestHandler) ConnectionHandler { |
| 24 | return &StandardConnectionHandler{ |
| 25 | requestHandler: requestHandler, |
| 26 | authHandler: NewAuthHandler(), |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | // Serve process new connection created after calling `Accept()` in the standard library |
| 31 | func (h *StandardConnectionHandler) Serve(c io.ReadWriter) error { |