github.com/AntonOrnatskyi/goproxy@v0.0.0-20190205095733-4526a9fa18b4/core/tproxy/README.md (about)

     1  # Pass-through user IP manual
     2  
     3  ## Description:
     4  
     5  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.
     6  
     7  ## Environmental requirements:
     8  
     9  The source station must be a service program running on Linux, and Linux needs to meet the following conditions:
    10  
    11  1. Linux kernel version >= 2.6.28
    12  
    13  2. Determine whether the system supports TPROXY, execute:
    14  
    15      grep TPROXY /boot/config-`uname -r`
    16  
    17      If the output has the following result description is supported.
    18  
    19      CONFIG_NETFILTER_XT_TARGET_TPROXY=m
    20  
    21  ## Deployment steps:
    22  
    23  1. The tproxy environment setup script should be executed with root privileges every time the boot from the source Linux system: tproxy_setup.sh
    24  
    25  2. Execute proxy proxy with root access on the source Linux system
    26  
    27  ## Parameter-tproxy is the tproxy function that turns on the proxy.
    28  
    29  ./proxy -tproxy
    30  
    31  2. The IP address of the source station to listen to the program requires the use of: `127.0.1.1`
    32  
    33  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`
    34  
    35  3. Forwarding rules inside the source address must be the corresponding, such as the above: `127.0.1.1:8800`