haproxy 配置

安装

echo 1 > /proc/sys/net/ipv4/ip_forward
echo "deb http://ftp.us.debian.org/debian/ wheezy-backports main" >> /etc/apt/sources.list
apt-get update
apt-get install haproxy -y

配置/etc/haproxy haproxy.cfg
global
ulimit-n 51200

defaults
        log global
        mode    tcp
        option  dontlognull
        timeout connect 1000
        timeout client  150000
        timeout server 150000

frontend ss-in
        bind *:8388
        default_backend ss-out

backend ss-out
        server server1 目标VPS的IP:端口 maxconn 20480

重新加载配置
service haproxy reload

参考文章 https://mark1998.com/ss-relay-on-aliyun/

© 2017, 新之助meow. 原创文章转载请注明: 转载自http://www.xinmeow.com

0.00 avg. rating (0% score) - 0 votes
点赞