From 4552a94870fd90eafc0a4597c129c36024ead9c2 Mon Sep 17 00:00:00 2001 From: clowwindy Date: Mon, 1 Jul 2013 09:42:43 -0700 Subject: [PATCH] Created configure shadowsocks with supervisor (markdown) --- configure-shadowsocks-with-supervisor.md | 46 ++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 configure-shadowsocks-with-supervisor.md diff --git a/configure-shadowsocks-with-supervisor.md b/configure-shadowsocks-with-supervisor.md new file mode 100644 index 0000000..68fe90f --- /dev/null +++ b/configure-shadowsocks-with-supervisor.md @@ -0,0 +1,46 @@ +Here is an example of running shadowsocks with [supervisor](http://supervisord.org/index.html): + +Edit `/etc/shadowsocks.json` + +``` +{ + "server":"my ip", + "server_port":8388, + "local_port":1080, + "password":"my password", + "timeout":600, + "method":"aes-256-cfb" +} +``` + +Run +``` +apt-get install python-pip python-m2crypto python-gevent supervisor +pip install shadowsocks +pip install superlance +``` + +Edit `/etc/supervisor/conf.d/shadowsocks.conf` + +``` +[program:shadowsocks] +command=ssserver -c /etc/shadowsocks.json +autorestart=true +user=nobody + +[eventlistener:crashmail] +command=/usr/local/bin/crashmail -a -m my@email.com +events=PROCESS_STATE +``` + +Run +``` +supervisorctl reload +``` +Now it's up. + +You can check shadowsocks status: +``` +supervisorctl status +supervisorctl tail shadowsocks +``` \ No newline at end of file