const socks5Version … type Config … type Server … // New creates a new Server and potentially returns an error func New(conf *Config) (*Server, error) { … } // ListenAndServe is used to create a listener and serve on it func (s *Server) ListenAndServe(network, addr string) error { … } // Serve is used to serve connections from a listener func (s *Server) Serve(l net.Listener) error { … } // ServeConn is used to serve a single connection. func (s *Server) ServeConn(conn net.Conn) error { … }