Skip to content

Commit

Permalink
Merge pull request ftao#88 from vmlinz/develop
Browse files Browse the repository at this point in the history
shadowsocks multiport configuration
  • Loading branch information
ftao committed Jul 23, 2015
2 parents 5374890 + 6f89fda commit 936b9c6
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
10 changes: 10 additions & 0 deletions host_vars/ss_server_multiport.example.com
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---

shadowsocks_servers:

multiport:
port_password:
38838: "ssserver-very-long-password-38838"
38839: "ssserver-very-long-password-38839"
38840: "ssserver-very-long-password-38840"
enable_udp: true
6 changes: 5 additions & 1 deletion roles/ss-server/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,12 @@ enable_udp: true #enable udp
port : 5351
password: "ssserver-very-long-password-876410482"
method: "aes-256-cfb"
timeout: "100"
port_password: #port password dictionary
5351 : "ssserver-very-long-password-876410482"
5352 : "ssserver-very-long-password-876410482"

shadowsocks_provider: "libev"

shadowsocks_enable_multiport: false #enable multiple port config, only possible for python shadowsocks implementation
shadowsocks_tune_system: true
shadowsocks_change_tcp_congestion_control: false
6 changes: 5 additions & 1 deletion roles/ss-server/templates/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
{
"server" : "0.0.0.0",
{% if shadowsocks_enable_multiport and (shadowsocks_provider=="python") %}
"port_password" : {{ port_password | to_nice_json }},
{% else %}
"server_port" : {{ port }},
"password" : "{{ password }}",
{% endif %}
"method": "{{ method }}",
"timeout": 10
"timeout": "{{ timeout }}"
}
4 changes: 0 additions & 4 deletions roles/ss-server/templates/ss-server.supervisor.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,3 @@ stderr_logfile = /var/log/supervisor/%(program_name)s_error.log
stdout_logfile = /var/log/supervisor/%(program_name)s.log
autostart=true
autorestart=true




13 changes: 13 additions & 0 deletions shadowsocks-multiport.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
- hosts: shadowsocks-multiport

roles:
- common

- role: ss-server
name: "multiport"
port_password: "{{ shadowsocks_servers.multiport.port_password }}"
enable_udp: "{{ shadowsocks_servers.multiport.enable_udp }}"
shadowsocks_provider: "python"
shadowsocks_enable_multiport: true

0 comments on commit 936b9c6

Please sign in to comment.