socks5

package
v0.0.0-...-4526a9f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 5, 2019 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicAuther

type BasicAuther interface {
	CheckUserPass(username, password, userIP, localIP, toTarget string) bool
}

type MethodsRequest

type MethodsRequest struct {
	// contains filtered or unexported fields
}

func NewMethodsRequest

func NewMethodsRequest(r io.ReadWriter, header ...[]byte) (s MethodsRequest, err interface{})

func (*MethodsRequest) Bytes

func (s *MethodsRequest) Bytes() []byte

func (*MethodsRequest) Methods

func (s *MethodsRequest) Methods() []uint8

func (*MethodsRequest) MethodsCount

func (s *MethodsRequest) MethodsCount() uint8

func (*MethodsRequest) Reply

func (s *MethodsRequest) Reply(method uint8) (err error)

func (*MethodsRequest) Select

func (s *MethodsRequest) Select(method uint8) bool

func (*MethodsRequest) Version

func (s *MethodsRequest) Version() uint8

type Request

type Request struct {
	// contains filtered or unexported fields
}

func NewRequest

func NewRequest(rw io.ReadWriter, header ...[]byte) (req Request, err interface{})

func (*Request) AType

func (s *Request) AType() uint8

func (*Request) Addr

func (s *Request) Addr() string

func (*Request) Bytes

func (s *Request) Bytes() []byte

func (*Request) CMD

func (s *Request) CMD() uint8

func (*Request) Host

func (s *Request) Host() string

func (*Request) NewReply

func (s *Request) NewReply(rep uint8, addr string) []byte

func (*Request) Port

func (s *Request) Port() string

func (*Request) TCPReply

func (s *Request) TCPReply(rep uint8) (err error)

func (*Request) UDPReply

func (s *Request) UDPReply(rep uint8, addr string) (err error)

type ServerConn

type ServerConn struct {
	// contains filtered or unexported fields
}

func NewServerConn

func NewServerConn(conn *net.Conn, timeout time.Duration, auth *BasicAuther, udpAddress string, header []byte) *ServerConn

func (*ServerConn) AuthData

func (s *ServerConn) AuthData() socks5c.UsernamePassword

func (*ServerConn) Close

func (s *ServerConn) Close()

func (*ServerConn) Handshake

func (s *ServerConn) Handshake() (err error)

func (*ServerConn) Method

func (s *ServerConn) Method() uint8

func (*ServerConn) Target

func (s *ServerConn) Target() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL