Documentation
¶
Index ¶
- Variables
- func BasicAuth(w http.ResponseWriter, r *http.Request, username string, password string) bool
- func GetConnect(reader *bufio.Reader) (hostname string, port uint16, err error)
- func GetHandshake(reader *bufio.Reader) (methods []byte, err error)
- func GetUserPass(reader *bufio.Reader) (user string, password string, err error)
- func SendAuthResult(writer *bufio.Writer, status byte) (err error)
- func SendConnectResponse(writer *bufio.Writer, res byte) (err error)
- func SendHandshakeResponse(writer *bufio.Writer, status byte) (err error)
- type HttpProxy
- type SocksProxy
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrProtocol = errors.New("protocol error") ErrWrongFmt = errors.New("connect packet wrong format") ErrUnknownAddrType = errors.New("unknown addr type") ErrIPv6 = errors.New("ipv6 not support yet") ErrAuthPacket = errors.New("Auth Packet Error") ErrAuthMethod = errors.New("auth method wrong") ErrAuthFailed = errors.New("auth failed") )
Functions ¶
Types ¶
type HttpProxy ¶
type HttpProxy struct {
// contains filtered or unexported fields
}
func NewHttpProxy ¶
type SocksProxy ¶
type SocksProxy struct {
// contains filtered or unexported fields
}
func NewSocksProxy ¶
func NewSocksProxy(dialer netutil.Dialer, addr, username, password string) (p *SocksProxy)
func (*SocksProxy) ServeConn ¶
func (p *SocksProxy) ServeConn(conn net.Conn)
func (*SocksProxy) SocksHandler ¶
func (*SocksProxy) Start ¶
func (p *SocksProxy) Start()
Click to show internal directories.
Click to hide internal directories.