HAProxy 参考资料
安装参考资料:https://www.jianshu.com/p/d436a3e73d2f
开启代理后解包参考资料:https://www.jianshu.com/p/d6b1031f1ff8
文件名:haproxy.cfg
#haproxy 配置示例
global
maxconn 1500
#nbproc 1
daemon
defaults
mode tcp
retries 3
option abortonclose
maxconn 32000
timeout connect 300000ms
timeout client 300000ms
timeout server 300000ms
log 127.0.0.1 local0 err
###
#监听局域网的192.168.1.17机子的默认远程端口
##
#listen win_17
#bind 0.0.0.0:20001 #绑定IP:端口
#mode tcp #模式
#server s1 192.168.20.176:8081 weight 1 maxconn 2000 inter 60s #被监听服务器
#server s1 192.168.20.239 weight 1 maxconn 2000 inter 60s #被监听服务器
#server s1 192.168.20.239:20001 weight 1 maxconn 32 inter 60s send-proxy-v2 #被监听服务器
frontend http-in
bind *:20001
default_backend servers
backend servers
#server server1 192.168.20.239:10012 maxconn 32 send-proxy-v2
server server1 192.168.20.239:10012 maxconn 32
使用以下命令运行:
haproxy.exe -f haproxy.cfg -d