Documentation ¶
Index ¶
- Constants
- Variables
- type MethodsRequest
- type Request
- func (s *Request) AType() uint8
- func (s *Request) Addr() string
- func (s *Request) Bytes() []byte
- func (s *Request) CMD() uint8
- func (s *Request) Host() string
- func (s *Request) NewReply(rep uint8, addr string) []byte
- func (s *Request) Port() string
- func (s *Request) TCPReply(rep uint8) (err error)
- func (s *Request) UDPReply(rep uint8, addr string) (err error)
- type UDPPacket
Constants ¶
View Source
const ( Method_NO_AUTH = uint8(0x00) Method_GSSAPI = uint8(0x01) Method_USER_PASS = uint8(0x02) Method_IANA = uint8(0x7F) Method_RESVERVE = uint8(0x80) Method_NONE_ACCEPTABLE = uint8(0xFF) VERSION_V5 = uint8(0x05) CMD_CONNECT = uint8(0x01) CMD_BIND = uint8(0x02) CMD_ASSOCIATE = uint8(0x03) ATYP_IPV4 = uint8(0x01) ATYP_DOMAIN = uint8(0x03) ATYP_IPV6 = uint8(0x04) REP_SUCCESS = uint8(0x00) REP_REQ_FAIL = uint8(0x01) REP_RULE_FORBIDDEN = uint8(0x02) REP_NETWOR_UNREACHABLE = uint8(0x03) REP_HOST_UNREACHABLE = uint8(0x04) REP_CONNECTION_REFUSED = uint8(0x05) REP_TTL_TIMEOUT = uint8(0x06) REP_CMD_UNSUPPORTED = uint8(0x07) REP_ATYP_UNSUPPORTED = uint8(0x08) REP_UNKNOWN = uint8(0x09) RSV = uint8(0x00) )
Variables ¶
View Source
var ( ZERO_IP = []byte{0x00, 0x00, 0x00, 0x00} ZERO_PORT = []byte{0x00, 0x00} )
Functions ¶
This section is empty.
Types ¶
type MethodsRequest ¶
type MethodsRequest struct {
// contains filtered or unexported fields
}
func NewMethodsRequest ¶
func NewMethodsRequest(r io.ReadWriter) (s MethodsRequest, err interface{})
func (*MethodsRequest) Bytes ¶
func (s *MethodsRequest) Bytes() []byte
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) (req Request, err interface{})
type UDPPacket ¶
type UDPPacket struct {
// contains filtered or unexported fields
}
func ParseUDPPacket ¶
Click to show internal directories.
Click to hide internal directories.