Documentation ¶
Index ¶
- func DialUDP(network string, laddr *net.UDPAddr, raddr *net.UDPAddr) (*net.UDPConn, error)
- func ListenUDP(network string, laddr *net.UDPAddr) (*net.UDPConn, error)
- func NewTproxy(opt *cl.Opts[*cl.Protocol_Tproxy]) (netapi.Server, error)
- func ReadFromUDP(conn *net.UDPConn, b []byte) (n int, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, err error)
- type Tproxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DialUDP ¶
DialUDP connects to the remote address raddr on the network net, which must be "udp", "udp4", or "udp6". If laddr is not nil, it is used as the local address for the connection.
func ListenUDP ¶
ListenUDP will construct a new UDP listener socket with the Linux IP_TRANSPARENT option set on the underlying socket
func ReadFromUDP ¶
func ReadFromUDP(conn *net.UDPConn, b []byte) (n int, srcAddr *net.UDPAddr, dstAddr *net.UDPAddr, err error)
ReadFromUDP reads a UDP packet from c, copying the payload into b. It returns the number of bytes copied into b and the return address that was on the packet.
Out-of-band data is also read in so that the original destination address can be identified and parsed.
Types ¶
Click to show internal directories.
Click to hide internal directories.