Server is accepting connections and handling the details of the SOCKS5 protocol
| 11 | |
| 12 | // Server is accepting connections and handling the details of the SOCKS5 protocol |
| 13 | type Server struct { |
| 14 | // bind is the address to listen on |
| 15 | Bind string |
| 16 | // ProxyDial specifies the optional proxyDial function for |
| 17 | // establishing the transport connection. |
| 18 | ProxyDial statute.ProxyDialFunc |
| 19 | // ProxyListenPacket specifies the optional proxyListenPacket function for |
| 20 | // establishing the transport connection. |
| 21 | ProxyListenPacket statute.ProxyListenPacket |
| 22 | // PacketForwardAddress specifies the packet forwarding address |
| 23 | PacketForwardAddress statute.PacketForwardAddress |
| 24 | // UserConnectHandle gives the user control to handle the TCP CONNECT requests |
| 25 | UserConnectHandle statute.UserConnectHandler |
| 26 | // UserAssociateHandle gives the user control to handle the UDP ASSOCIATE requests |
| 27 | UserAssociateHandle statute.UserAssociateHandler |
| 28 | // Logger error log |
| 29 | Logger statute.Logger |
| 30 | // Context is default context |
| 31 | Context context.Context |
| 32 | // BytesPool getting and returning temporary bytes for use by io.CopyBuffer |
| 33 | BytesPool statute.BytesPool |
| 34 | } |
| 35 | |
| 36 | func NewServer(options ...ServerOption) *Server { |
| 37 | s := &Server{ |
nothing calls this directly
no outgoing calls
no test coverage detected