Documentation ¶
Index ¶
Constants ¶
View Source
const ( ScanType = "socks" SOCKSVersion = 5 )
View Source
const MethodNoAuth = 0
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MethodReply ¶
type MethodReply struct { Ver byte // version of the protocol Method byte // server selects from one of the methods given in the request METHODS field. }
MethodReply is a negotiation reply for the authentication method to be used. From RFC1928: +----+--------+ |VER | METHOD | +----+--------+ | 1 | 1 | +----+--------+
func (*MethodReply) Len ¶
func (*MethodReply) Len() int64
type MethodRequest ¶
type MethodRequest struct { Ver byte // version of the protocol NMethods byte // number of method identifier octets that appear in the METHODS field. Methods []byte }
MethodRequest is a negotiation request for the authentication method to be used. It is the initial message that the client sends to the SOCKS5 server. From RFC1928: +----+----------+----------+ |VER | NMETHODS | METHODS | +----+----------+----------+ | 1 | 1 | 1 to 255 | +----+----------+----------+
func NewMethodRequest ¶
func NewMethodRequest(version byte, methods ...byte) *MethodRequest
func (*MethodRequest) Len ¶
func (r *MethodRequest) Len() int64
type ScanResult ¶
type ScanResult struct { ScanType string `json:"scan"` Version int `json:"version"` IP string `json:"ip"` Port uint16 `json:"port"` Auth bool `json:"auth,omitempty"` }
func (*ScanResult) ID ¶
func (r *ScanResult) ID() string
func (*ScanResult) MarshalJSON ¶
func (r *ScanResult) MarshalJSON() ([]byte, error)
func (*ScanResult) String ¶
func (r *ScanResult) String() string
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner(opts ...ScannerOption) *Scanner
type ScannerOption ¶
type ScannerOption func(*Scanner)
func WithDataTimeout ¶
func WithDataTimeout(timeout time.Duration) ScannerOption
func WithDialTimeout ¶
func WithDialTimeout(timeout time.Duration) ScannerOption
Click to show internal directories.
Click to hide internal directories.