diff --git a/doc/html/howtoe.html b/doc/html/howtoe.html index 84387cc..1b99e67 100644 --- a/doc/html/howtoe.html +++ b/doc/html/howtoe.html @@ -49,6 +49,8 @@
  • How to configure name resolution and DNS caching
  • How to use IPv6
  • How to use connect back +
  • How to use HAProxy PROXY protocol +
  • How to set TCP maximum segment size (MSS)
  • Client configuration
  • Administering and information analysis @@ -1278,7 +1280,54 @@ allowed traffic in megabytes (MB). nocountin allows you to set exclusions. allow * * 1.1.1.1 tcppm -R0.0.0.0:1234 3128 1.1.1.1 3128 For browser settings, the proxy is host.dyndns.example.org:3128. -

    +

    +
  • How to use HAProxy PROXY protocol +

    + 3proxy supports HAProxy PROXY protocol v1 for both receiving and sending client + IP information. This is useful when 3proxy is behind a load balancer or when + passing client information to a parent proxy. +

    +

    + Receiving PROXY protocol header: +
    Use the -H option to make 3proxy expect a PROXY protocol v1 header + on incoming connections. This allows 3proxy to receive the real client IP address + from HAProxy or another load balancer: +

    +proxy -H -p3128
    +socks -H -p1080
    +
    +

    + The PROXY protocol header must be sent before any protocol-specific data. +

    +

    + Sending PROXY protocol header to parent proxy: +
    Use the ha parent type to send a PROXY protocol v1 header to + the parent proxy. This must be the last parent in the chain: +

    +allow *
    +parent 1000 ha
    +parent 1000 socks5 parent.example.com 1080
    +socks
    +
    +

    + This configuration sends the client IP information to the SOCKS5 parent proxy + via the PROXY protocol. +

    +
  • How to set TCP maximum segment size (MSS) +

    + Use the maxseg command to set the TCP maximum segment size (MSS) + for outgoing connections. This can be useful to work around path MTU discovery + issues or to optimize traffic for specific network conditions: +

    +maxseg 1400
    +proxy -p3128 -OcTCP_NODELAY,TCP_MAXSEG -OsTCP_NODELAY,TCP_MAXSEG
    +
    +

    + The value is specified in bytes. This setting uses the TCP_MAXSEG socket option + and may not be supported on all platforms. A typical use case is to reduce MSS + to avoid fragmentation in VPN tunnels or to work around MTU issues with certain + network paths. +


    diff --git a/doc/html/howtor.html b/doc/html/howtor.html index ea74a0f..e4c5349 100644 --- a/doc/html/howtor.html +++ b/doc/html/howtor.html @@ -48,6 +48,8 @@
  • Как управлять разрешением имен и кэшированием DNS
  • Как использовать IPv6
  • Как использовать connect back +
  • Как использовать протокол HAProxy PROXY +
  • Как установить максимальный размер сегмента TCP (MSS)
  • Конфигурация и настройка клиентов
  • Конфигурация клиентов diff --git a/doc/html/man3/3proxy.cfg.3.html b/doc/html/man3/3proxy.cfg.3.html index 1d6cfac..6cdd3dc 100644 --- a/doc/html/man3/3proxy.cfg.3.html +++ b/doc/html/man3/3proxy.cfg.3.html @@ -176,7 +176,12 @@ accepted.
    -N
    (for socks) External NAT address 3proxy reports to client for BIND and UDPASSOC By default external address is reported. It’s only useful in the case of IP-IP NAT -(will not work for PAT)
    +(will not work for PAT)
    +-H
    (for all services) Expect HAProxy PROXY protocol v1 +header on incoming connection. This allows the proxy to +receive real client IP address from HAProxy or other load +balancer that supports the PROXY protocol. The header must +be sent before any protocol-specific data.
    Also, all options mentioned for proxy(8) socks(8) pop3p(8) tcppm(8) udppm(8) ftppr(8)
    @@ -677,6 +682,10 @@ useful). Never use this option unless you know exactly you need it.
    admin redirect request to local ´admin´ service (with -s parameter).
    +ha send HAProxy PROXY protocol v1 header to parent proxy. +Must be the last in the proxy chain. Useful for passing +client IP information to the parent proxy. Example: parent +1000 ha
    Use "+" proxy only with "fakeresolve" option

    diff --git a/man/3proxy.cfg.3 b/man/3proxy.cfg.3 index bd90178..7c55c97 100644 --- a/man/3proxy.cfg.3 +++ b/man/3proxy.cfg.3 @@ -186,6 +186,12 @@ By default, connections to any interface are accepted. (for socks) External NAT address 3proxy reports to client for BIND and UDPASSOC By default external address is reported. It's only useful in the case of IP-IP NAT (will not work for PAT) +.br +.B -H +(for all services) Expect HAProxy PROXY protocol v1 header on incoming connection. +This allows the proxy to receive real client IP address from HAProxy or other +load balancer that supports the PROXY protocol. The header must be sent before +any protocol-specific data. .br Also, all options mentioned for .BR proxy (8) @@ -776,7 +782,11 @@ unless you know exactly you need it. .br admin redirect request to local \'admin\' service (with -s parameter). .br - Use "+" proxy only with "fakeresolve" option +ha send HAProxy PROXY protocol v1 header to parent proxy. Must be the last +in the proxy chain. Useful for passing client IP information to the parent proxy. +Example: parent 1000 ha +.br +Use "+" proxy only with "fakeresolve" option .br IP and port are ip addres and port of parent proxy server.