Documentation ¶
Overview ¶
Package tproxy provides the TCPDial and TCPListen tproxy equivalent of the net package Dial and Listen with tproxy support for linux ONLY.
Index ¶
- Constants
- Variables
- func IPTcpAddrToUnixSocksAddr(addr string) (sa unix.Sockaddr, err error)
- func IPv6UdpAddrToUnixSocksAddr(addr string) (sa unix.Sockaddr, err error)
- func TCPDial(localAddr, remoteAddr string, timeout time.Duration) (conn net.Conn, err error)
- func TCPListen(listenAddr string) (listener net.Listener, err error)
Constants ¶
const IP_ORIGADDRS = 20
Variables ¶
var Debug = false
Debug outs the library in Debug mode
Functions ¶
func IPTcpAddrToUnixSocksAddr ¶
IPTcpAddrToUnixSocksAddr returns Sockaddr for specified TCP addr.
func IPv6UdpAddrToUnixSocksAddr ¶
IPv6UdpAddrToUnixSocksAddr returns Sockaddr for specified IPv6 addr.
func TCPDial ¶
TCPDial is a special tcp connection which binds a non local address as the source. Except then the option to bind to a specific local address which the machine doesn't posses it is exactly like any other net.Conn connection. It is advised to use port numbered 0 in the localAddr and leave the kernel to choose which Local port to use in order to avoid errors and binding conflicts.
Types ¶
This section is empty.