package
0.0.0-20200420102958-02cdb552badb
Repository: https://github.com/tidaybreak/goproxy.git
Documentation: pkg.go.dev

# README

Pass-through user IP manual

Description:

By Linux TPROXY function,you can achieve the source Station service program can see the client's real IP, to achieve this feature requires linux operating systems and programs must meet certain conditions.

Environmental requirements:

The source station must be a service program running on Linux, and Linux needs to meet the following conditions:

  1. Linux kernel version >= 2.6.28

  2. Determine whether the system supports TPROXY, execute:

    grep TPROXY /boot/config-uname -r

    If the output has the following result description is supported.

    CONFIG_NETFILTER_XT_TARGET_TPROXY=m

Deployment steps:

  1. The tproxy environment setup script should be executed with root privileges every time the boot from the source Linux system: tproxy_setup.sh

  2. Execute proxy proxy with root access on the source Linux system

Parameter-tproxy is the tproxy function that turns on the proxy.

./proxy -tproxy

  1. The IP address of the source station to listen to the program requires the use of: 127.0.1.1

For example, the address of the source station before listening is: 0.0.0.0:8800, now need to be modified to: 127.0.1.1:8800

  1. Forwarding rules inside the source address must be the corresponding, such as the above: 127.0.1.1:8800

# Functions

IPTcpAddrToUnixSocksAddr returns Sockaddr for specified TCP addr.
IPv6UdpAddrToUnixSocksAddr returns Sockaddr for specified IPv6 addr.
TCPDial is a special tcp connection which binds a non local address as the source.
TCPListen is listening for incoming IP packets which are being intercepted.

# Constants

No description provided by the author

# Variables

Debug outs the library in Debug mode.