Documentation ¶
Index ¶
- func ListenPacket(addr *net.UDPAddr) (net.PacketConn, error)
- func ListenUDP(network string, laddr *net.UDPAddr) (*net.UDPConn, error)
- func NewTProxyServer(s string, p proxy.Proxy) (proxy.Server, error)
- func ReadFromUDP(conn *net.UDPConn, b []byte) (int, *net.UDPAddr, *net.UDPAddr, error)
- type TProxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ListenPacket ¶ added in v0.15.0
func ListenPacket(addr *net.UDPAddr) (net.PacketConn, error)
ListenPacket acts like net.ListenPacket but the addr could be non-local.
func ListenUDP ¶ added in v0.15.0
ListenUDP acts like net.ListenUDP but returns an conn with IP_TRANSPARENT option.
func NewTProxyServer ¶
NewTProxyServer returns a udp tunnel server.
func ReadFromUDP ¶
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 ¶
type TProxy ¶
type TProxy struct {
// contains filtered or unexported fields
}
TProxy struct.
func (*TProxy) ListenAndServe ¶
func (s *TProxy) ListenAndServe()
ListenAndServe listens on server's addr and serves connections.
func (*TProxy) ListenAndServeTCP ¶
func (s *TProxy) ListenAndServeTCP()
ListenAndServeTCP listens and serves tcp.
func (*TProxy) ListenAndServeUDP ¶
func (s *TProxy) ListenAndServeUDP()
ListenAndServeUDP listens and serves udp.
Click to show internal directories.
Click to hide internal directories.