This tutorial assumes the server runs Debian 8.

First, install HAProxy.

apt install haproxy

Then, Edit /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 *:LOCAL_PORT
    default_backend ss-out

backend ss-out
    server server1 TARGET_IP:TARGET_PORT maxconn 20480

Finally, restart HAProxy.

systemctl restart haproxy.

Reference: https://github.com/shadowsocks/shadowsocks/wiki/Setup-a-Shadowsocks-relay

Setup a shadowsocks relay using HAProxy

Leave a Reply

Your email address will not be published. Required fields are marked *