Versions in this module Expand all Collapse all v0 v0.0.2 Jun 30, 2024 v0.0.1 Jun 29, 2024 Changes in this version + const MaxAddrLen + const MaxAuthLen + const Version + func EncodeUDPPacket(addr Addr, payload []byte) (packet []byte, err error) + type Addr []byte + 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(addr net.Addr) Addr + func ParseAddrString(s string) Addr + func ReadAddr(r io.Reader, b []byte) (Addr, error) + func SerializeAddr(domainName string, dstIP net.IP, dstPort uint16) Addr + func SplitAddr(b []byte) Addr + func (a Addr) String() string + func (a Addr) UDPAddr() *net.UDPAddr + func (a Addr) Valid() bool + type Atyp = uint8 + const AtypDomainName + const AtypIPv4 + const AtypIPv6 + type AuthMethod = uint8 + const MethodNoAuth + const MethodUserPass + type Command uint8 + const CmdBind + const CmdConnect + const CmdUDPAssociate + func (c Command) String() string + type Reply uint8 + func (r Reply) String() string + type User struct + Password string + Username string