Documentation ¶
Index ¶
- Constants
- Variables
- func NewServerConn(packetConn net.PacketConn) net.Conn
- type ClientConn
- func (c *ClientConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *ClientConn) ReadPacket(buffer *buf.Buffer) (M.Socksaddr, error)
- func (c *ClientConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *ClientConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
- type ServerConn
Constants ¶
View Source
const UOTMagicAddress = "sp.udp-over-tcp.arpa"
Variables ¶
View Source
var AddrParser = M.NewSerializer( M.AddressFamilyByte(0x00, M.AddressFamilyIPv4), M.AddressFamilyByte(0x01, M.AddressFamilyIPv6), M.AddressFamilyByte(0x02, M.AddressFamilyFqdn), )
Functions ¶
func NewServerConn ¶
func NewServerConn(packetConn net.PacketConn) net.Conn
Types ¶
type ClientConn ¶
func NewClientConn ¶
func NewClientConn(conn net.Conn) *ClientConn
func (*ClientConn) ReadPacket ¶
func (*ClientConn) WritePacket ¶
type ServerConn ¶
type ServerConn struct { net.PacketConn // contains filtered or unexported fields }
func (*ServerConn) Close ¶
func (c *ServerConn) Close() error
func (*ServerConn) RemoteAddr ¶
func (c *ServerConn) RemoteAddr() net.Addr
Click to show internal directories.
Click to hide internal directories.