/ansible-shadowsocks

Ansible role for Shadowsocks. create 100 Shadowsocks instances in 20 mins

Primary LanguageShell

Ansible Role: Shadowsocks

Build Status

Install Shadowsocks via Ansible.

Features

  • Install or upgrade Shadowsocks Python version easily
  • Tuning sysctl automatically for better performance
  • Detect tcp_fastopen support
  • Support init startup script

Requirements

This role requires Ansible 1.6 or higher and platform requirements are listed in the metadata file.

Dependencies

None

Example Playbooks

Install shadowsocks with custom location (default: /etc/shadowsocks):

- hosts: servers
  roles:
    - { role: sparanoid.shadowsocks, shadowsocks_home: /home/sparanoid/shadowsocks }

Install shadowsocks with different encryption (default: aes-256-cfb):

- hosts: servers
  roles:
    - { role: sparanoid.shadowsocks, shadowsocks_config_encryption_method: salsa20 }

Install shadowsocks with different server port (default: 443):

- hosts: servers
  roles:
    - { role: sparanoid.shadowsocks, shadowsocks_config_server_port: 9999 }

Install shadowsocks without tuning sysctl (default: shadowsocks_sysctl_tweak: true):

- hosts: servers
  roles:
    - { role: sparanoid.shadowsocks, shadowsocks_sysctl_tweak: false }

Install shadowsocks using custom specified password (default: apn!proxy!ss!ftw!):

- hosts: servers
  roles:
    - { role: sparanoid.shadowsocks, shadowsocks_password: "myFancy@Passwd!" }

Install shadowsocks with multiple user support:

- hosts: servers
  roles:
    - { role: tr4sk.shadowsocks, shadowsocks_user: "True" }

You can also define password in command line:

$ ansible-playbook shadowsocks-servers.yml --extra-vars "shadowsocks_password=myFancy@Passwd!"

Todos

  • init.d script
  • Tuning sysctl support
  • Detect tcp_fastopen
  • Multiple users support
  • Systemd script
  • Distro support
    • EL
      • Better init.d script for 7
    • Debian
    • Ubuntu

License

GPLv3

Author Information

Tunghsiao Liu

Updated

Tr4sK