Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenAndServe ¶
func ListenAndServe(ctx context.Context, network, address string, handler *ServerHandler) error
ListenAndServe listens on the network address and serves proxy requests.
Types ¶
type ServerHandler ¶
type ServerHandler struct {
Socks4 socks4.ServerHandler
Socks5 socks5.ServerHandler
UnknownHandler func(conn net.Conn, peekedByte byte)
}
ServerHandler multiplexes incoming connections to the appropriate SOCKS4 or SOCKS5 handlers based on protocol detection.
Click to show internal directories.
Click to hide internal directories.