Documentation ¶
Index ¶
- type Conn
- type Listener
- type PacketConn
- type Server
- func (s *Server) Close() error
- func (s *Server) Handshake(conn net.Conn) (uc *net.UDPConn, buf []byte, ok bool, err error)
- func (s *Server) LookupIP(ip net.IP, b []byte) (*socks.Addr, error)
- func (s *Server) ParseAddr(host, port string, b []byte) (*socks.Addr, error)
- func (s *Server) ProxyConnect(w http.ResponseWriter, r *http.Request)
- func (s *Server) ProxyGet(w http.ResponseWriter, r *http.Request)
- func (s *Server) ProxySocks(conn gonet.Conn, uc *net.UDPConn, buf []byte)
- func (s *Server) Serve()
- func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
Listener is ... net.Listener accept connections bypassed by Server.handshake
type PacketConn ¶
PacketConn is ... gonet.PacketConn
func NewPacketConn ¶
func NewPacketConn(src net.Addr, conn *net.UDPConn) *PacketConn
NewPacketConn is ...
type Server ¶
type Server struct { // Logger is ... Logger logger.Logger // Route is ... Router *http.ServeMux // Server is ... // serve http.Request Server http.Server // Listener is ... Listener net.Listener // Handler is ... // gonet.Handler Handler gonet.Handler // contains filtered or unexported fields }
Server is ... a combined socks5/http proxy server
func NewServer ¶
func NewServer(ln net.Listener, lg logger.Logger, h gonet.Handler, t *suffixtree.DomainTree, r *http.ServeMux) *Server
NewServer is ...
func (*Server) ProxyConnect ¶
func (s *Server) ProxyConnect(w http.ResponseWriter, r *http.Request)
ProxyConnect is ... handle http proxy CONNECT method
func (*Server) ProxyGet ¶
func (s *Server) ProxyGet(w http.ResponseWriter, r *http.Request)
ProxyGet is ... handle http proxy GET method
func (*Server) ProxySocks ¶
ProxySocks is ... handle socks5 proxy
Click to show internal directories.
Click to hide internal directories.