From 28a8a18b3a4b25796b8dde886001b8296600fa3a Mon Sep 17 00:00:00 2001 From: clowwindy Date: Wed, 28 May 2014 00:35:52 -0700 Subject: [PATCH] Updated Setup a Shadowsocks relay (markdown) --- Setup-a-Shadowsocks-relay.md | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/Setup-a-Shadowsocks-relay.md b/Setup-a-Shadowsocks-relay.md index c96d528..ebfa261 100644 --- a/Setup-a-Shadowsocks-relay.md +++ b/Setup-a-Shadowsocks-relay.md @@ -11,7 +11,37 @@ If you want your client connected to a Japan VPS, but you want a US IP. ### Better version: +For those who need high performance, use haproxy. + Append the following line to `/etc/apt/sources.list` deb http://ftp.us.debian.org/debian/ wheezy-backports main +Run + + apt-get udpate + apt-get install haproxy + +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 *:8388 + default_backend ss-out + +backend ss-out + server server1 US_VPS_IP:8388 maxconn 20480 +``` + +Then run `haproxy -f /etc/haproxy/haproxy.cfg` \ No newline at end of file