NewRequestHandler creates a standard SOCKS5 request handler This handles the SOCKS5 commands and proxies them to their destination
(dialer Dialer, accessPolicy *ipaccess.Policy)
| 25 | // NewRequestHandler creates a standard SOCKS5 request handler |
| 26 | // This handles the SOCKS5 commands and proxies them to their destination |
| 27 | func NewRequestHandler(dialer Dialer, accessPolicy *ipaccess.Policy) RequestHandler { |
| 28 | return &StandardRequestHandler{ |
| 29 | dialer: dialer, |
| 30 | accessPolicy: accessPolicy, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // Handle processes and responds to socks5 commands |
| 35 | func (h *StandardRequestHandler) Handle(req *Request, conn io.ReadWriter) error { |
no outgoing calls