Documentation ¶
Index ¶
- Constants
- Variables
- type PacketConn
- func (c *PacketConn) FrontHeadroom() int
- func (c *PacketConn) Read(b []byte) (n int, err error)
- func (c *PacketConn) ReadFrom(p []byte) (n int, addr net.Addr, err error)
- func (c *PacketConn) ReadPacket(buffer *buf.Buffer) (destination M.Socksaddr, err error)
- func (c *PacketConn) RemoteAddr() net.Addr
- func (c *PacketConn) Upstream() any
- func (c *PacketConn) Write(b []byte) (n int, err error)
- func (c *PacketConn) WritePacket(buffer *buf.Buffer, destination M.Socksaddr) error
- func (c *PacketConn) WriteTo(p []byte, addr net.Addr) (n int, err error)
Constants ¶
View Source
const SeqPacketMagicAddress = "sp.packet-addr.v2fly.arpa"
Variables ¶
View Source
var AddressSerializer = M.NewSerializer( M.AddressFamilyByte(0x01, M.AddressFamilyIPv4), M.AddressFamilyByte(0x02, M.AddressFamilyIPv6), )
View Source
var ErrFqdnUnsupported = E.New("packetaddr: fqdn unsupported")
Functions ¶
This section is empty.
Types ¶
type PacketConn ¶
type PacketConn struct { N.NetPacketConn // contains filtered or unexported fields }
func NewBindConn ¶
func NewBindConn(conn net.Conn) *PacketConn
func NewConn ¶
func NewConn(conn net.PacketConn, bindAddr M.Socksaddr) *PacketConn
func (*PacketConn) FrontHeadroom ¶
func (c *PacketConn) FrontHeadroom() int
func (*PacketConn) ReadPacket ¶
func (*PacketConn) RemoteAddr ¶
func (c *PacketConn) RemoteAddr() net.Addr
func (*PacketConn) Upstream ¶
func (c *PacketConn) Upstream() any
func (*PacketConn) WritePacket ¶
Click to show internal directories.
Click to hide internal directories.