博文

目前显示的是 七月, 2017的博文

Using Haproxy + shadowsocks (ha + ss) to setup multi ss backend and load balance

*Install haproxy > sudo apt-get install haproxy *Configure haproxy >vim /etc/haproxy/haproxy.cfg global     ulimit-n 51200     log /dev/log local0     log /dev/log local1 notice     chroot /var/lib/haproxy     pidfile /var/run/haproxy.pid     user haproxy     group haproxy     daemon defaults     log global     mode tcp     option dontlognull     timeout connect 5000       timeout client 50000     timeout server 50000 frontend ss-in     mode tcp       bind $Your_IP:8002     default_backend shadowsocks backend shadowsocks     mode tcp       balance roundrobin         server ss1 $Your_SS_IP1:$Your_SS_PORT1 maxconn 20480         server ss2 $Your_SS_IP2:$Your_SS_PORT2 maxconn 20480 --The haproxy only allows the remote ss servers with the same password. As here haproxy is only providing the function like a load balancing switch. It's like a multi channel valve which does NOT provide any shadowsocks protocol level function

Setup shadowsocks in Ubuntu 16.04 server [client & server]

1.  Setup Server *Install shadowsocks > apt-get install shadowsocks *Configure config file in /etc/shadowsocks/config.json {     "server":"Your server ip",     "server_port":your server port,     "local_address": "127.0.0.1",     "local_port":1080,     "password":"You Password",     "timeout":300,     "method":"aes-256-cfb",     "fast_open": false,     "workers": 1 } *Restart service > sudo /etc/init.d/shadowsocks restart 2. Setup Client *Install shadowsocks client >sudo apt-get install python-pip >sudo pip install shadowsocks *Create config file in /etc/shadowsocks.conf.json {     "server":"Your server ip",     "server_port":your server port,     "local_address":"your local ip",     "local_port":your local port,     "pas