Documentation
¶
Overview ¶
Package socksclient is the minimal RFC 1928 client double the SOCKS service's suites exercise — the only SOCKS client written in-tree: standard clients are the compatibility surface, and nothing here grows past the dialect the service pins — method none, CONNECT, UDP ASSOCIATE, whole datagrams.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Connect ¶
Connect negotiates method none over conn and issues CONNECT for address, returning the spliced leg: bytes written cross at the destination, and the destination's bytes return.
func DecodeDatagram ¶
DecodeDatagram parses one reply datagram: the payload and the source its header names.
Types ¶
type Refused ¶
type Refused struct {
Rep byte
}
Refused is a service refusal: the reply code it answered with.
type Relay ¶
type Relay struct {
// Conn is the client's own UDP socket.
Conn net.PacketConn
// Addr is the relay endpoint the ASSOCIATE reply carried — the exit's
// true address and the relay's port.
Addr netip.AddrPort
}
Relay is one association's client leg: the packet conn the client's datagrams ride beside the relay endpoint the reply named.
func Associate ¶
Associate negotiates method none over conn and issues UDP ASSOCIATE, returning the relay endpoint the reply named beside the client's own datagram leg, pc.