mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2024-12-29 16:12:10 +00:00
2a54bb74cd
Have "socks4" and "check-via-socks4" server keyword added. Implement handshake with SOCKS4 proxy server for tcp stream connection. See issue #82. I have the "SOCKS: A protocol for TCP proxy across firewalls" doc found at "https://www.openssh.com/txt/socks4.protocol". Please reference to it. [wt: for now connecting to the SOCKS4 proxy over unix sockets is not supported, and mixing IPv4/IPv6 is discouraged; indeed, the control layer is unique for a connection and will be used both for connecting and for target address manipulation. As such it may for example report incorrect destination addresses in logs if the proxy is reached over IPv6]
56 lines
1.3 KiB
INI
56 lines
1.3 KiB
INI
global
|
|
log /dev/log local0
|
|
log /dev/log local1 notice
|
|
stats timeout 30s
|
|
|
|
defaults
|
|
log global
|
|
mode http
|
|
option httplog
|
|
option dontlognull
|
|
timeout connect 5000
|
|
timeout client 50000
|
|
timeout server 50000
|
|
|
|
listen SMTP-20025
|
|
bind 0.0.0.0:20025
|
|
mode tcp
|
|
option tcplog
|
|
maxconn 2000
|
|
timeout connect 5000
|
|
timeout client 50000
|
|
timeout server 50000
|
|
option tcp-check
|
|
server SMTPS1 192.0.2.1:25 check inter 30000 fastinter 1000
|
|
server SMTPS2_Via_SocksProxy1 192.0.2.2:25 socks4 127.0.0.1:1080 check-via-socks4 check inter 30000 fastinter 1000 backup
|
|
|
|
listen SSL-20080
|
|
bind 0.0.0.0:20080
|
|
mode tcp
|
|
option tcplog
|
|
maxconn 2000
|
|
timeout connect 5000
|
|
timeout client 50000
|
|
timeout server 50000
|
|
option tcp-check
|
|
server HTTPS1_Via_SocksProxy1 192.0.2.1:443 ssl verify none socks4 127.0.0.1:1080 check inter 30000 fastinter 1000
|
|
server HTTPS2 192.0.2.2:443 ssl verify none check inter 30000 fastinter 1000 backup
|
|
|
|
# HAProxy web ui
|
|
listen stats
|
|
bind 0.0.0.0:20936
|
|
mode http
|
|
log global
|
|
|
|
maxconn 10
|
|
timeout client 100s
|
|
timeout server 100s
|
|
timeout connect 100s
|
|
timeout queue 100s
|
|
|
|
stats enable
|
|
stats uri /haproxy?stats
|
|
stats realm HAProxy\ Statistics
|
|
stats admin if TRUE
|
|
stats show-node
|