Versions in this module Expand all Collapse all v1 v1.1.0 Jun 6, 2025 Changes in this version + const VersionCode + var ErrHostnameTooLong = errors.New("hostname too long") + var ErrInvalidAddrType = errors.New("invalid address type") + var ErrInvalidVersion = errors.New("invalid version") + var ErrNonZeroReservedField = errors.New("reserved field has a non-zero value") + var ErrTooManyAuthMethods = errors.New("too many auth methods") + type AuthMethod byte + const AuthNone + const AuthNotAcceptable + func (m AuthMethod) MarshalText() ([]byte, error) + func (m AuthMethod) String() string + type Command byte + const CommandAssociateUDP + const CommandBind + const CommandConnect + func (c Command) MarshalText() ([]byte, error) + func (c Command) String() string + type Greeting struct + AuthMethods []AuthMethod + func ReadGreeting(r *bufio.Reader) (*Greeting, error) + func (g *Greeting) Write(w io.Writer) error + type GreetingReply struct + AuthMethod AuthMethod + func ReadGreetingReply(r *bufio.Reader) (*GreetingReply, error) + func (r *GreetingReply) Write(w io.Writer) error + type Reply struct + BindAddr addr.Addr + Status Status + func ReadReply(r *bufio.Reader) (*Reply, error) + func (r *Reply) Write(w io.Writer) error + type Request struct + Command Command + DstAddr addr.Addr + func ReadRequest(r *bufio.Reader) (*Request, error) + func (r *Request) Write(w io.Writer) error + type Status byte + const StatusAddrTypeNotSupported + const StatusCommandNotSupported + const StatusConnectionNotAllowed + const StatusConnectionRefused + const StatusGeneralFailure + const StatusHostUnreachable + const StatusNetworkUnreachable + const StatusOK + const StatusTTLExpired + func (s Status) MarshalText() ([]byte, error) + func (s Status) String() string v1.0.0 May 31, 2025