使用haproxy做端口转发 ubuntu系统 - 安装haproxy ``` apt-get install -y haproxy ``` - 修改配置文件 /etc/haproxy/haproxy.cfg ``` global ulimit-n 51200 defaults log global mode tcp option dontlognull contimeout 1000 clitimeout 150000 srvtimeout 150000 frontend ss-in bind *:8080 default_backend ss-out backend ss-out server server1 104.243.28.87:8085 maxconn 20480 ``` - 启动进程 ``` service haproxy start ``` - 如果还不行,直接 ``` ./haproxy -f /etc/haproxy/haproxy.cfg ``` 来自 大脸猫 写于 2019-05-06 10:45 -- 更新于2020-10-19 13:06 -- 0 条评论