Versions in this module Expand all Collapse all v1 v1.0.2 Apr 25, 2024 v1.0.1 Apr 24, 2024 Changes in this version + const AtypDomainName + const AtypIPv4 + const AtypIPv6 + const ErrAddressNotSupported + const ErrCommandNotSupported + const ErrConnectionNotAllowed + const ErrConnectionRefused + const ErrGeneralFailure + const ErrHostUnreachable + const ErrNetworkUnreachable + const ErrTTLExpired + const MaxAddrLen + const MaxAuthLen + const Version + var ErrAuth = errors.New("auth failed") + func EncodeUDPPacket(addr Addr, payload []byte) (packet []byte, err error) + func ReadByte(reader io.Reader) (byte, error) + func ServerHandshake(rw net.Conn, authenticator auth.Authenticator) (addr Addr, command Command, err error) + type Addr []byte + func AddrFromStdAddrPort(addrPort netip.AddrPort) Addr + func ClientHandshake(rw io.ReadWriter, addr Addr, command Command, user *User) (Addr, error) + func DecodeUDPPacket(packet []byte) (addr Addr, payload []byte, err error) + func ParseAddr(s string) Addr + func ParseAddrToSocksAddr(addr net.Addr) Addr + func ReadAddr(r io.Reader, b []byte) (Addr, error) + func ReadAddr0(r io.Reader) (Addr, error) + func SplitAddr(b []byte) Addr + func (a Addr) String() string + func (a Addr) UDPAddr() *net.UDPAddr + type Command = uint8 + const CmdBind + const CmdConnect + const CmdUDPAssociate + type Error byte + func (err Error) Error() string + type User struct + Password string + Username string