From b8f4a6b806ecaf157cb5e4f822c7a5c2d34bdf09 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 24 Jun 2018 17:08:54 +0800 Subject: shadowsocks: Support multiple instances (share with others) Add the "shadowsocks" rc script that allows multiple instances (based on the uwsgi rc script). Update the role and vars to setup two shadowsocks instances. --- roles/shadowsocks/templates/config.json.j2 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'roles/shadowsocks/templates') diff --git a/roles/shadowsocks/templates/config.json.j2 b/roles/shadowsocks/templates/config.json.j2 index 73d3ef9..5e9ff0c 100644 --- a/roles/shadowsocks/templates/config.json.j2 +++ b/roles/shadowsocks/templates/config.json.j2 @@ -1,11 +1,11 @@ { "server": ["::0", "0.0.0.0"], - "server_port": {{ shadowsocks.port }}, - "password": "{{ shadowsocks.password }}", + "server_port": {{ profile.port }}, + "password": "{{ profile.password }}", "method": "{{ shadowsocks.method }}", - "timeout": 600, - "fast_open": true, - "reuse_port": true, - "no_delay": true, - "user": "nobody" + "timeout": {{ shadowsocks.timeout }}, + "fast_open": {{ shadowsocks.fast_open | to_json }}, + "reuse_port": {{ shadowsocks.reuse_port | to_json }}, + "no_delay": {{ shadowsocks.no_delay | to_json }}, + "user": "{{ shadowsocks.user }}" } -- cgit v1.2.2