Skip to content
A simple Shadowsocks transparent proxy setup script.
Shell
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
LICENSE
README.md update README Aug 19, 2019
archwrt-ss.conf add tls://8.8.8.8 & tls://8.8.4.4 Aug 19, 2019
archwrt-ss.service fix archwrt-ss.service Apr 12, 2019
archwrt-ss.sh remove debug output Aug 19, 2019

README.md

archwrt-ss.sh

A simple Shadowsocks transparent proxy setup script.

Main features

  • GFWList Mode supported
  • Chnroute (Bypass Mainland IP) Mode supported
  • Customized Blacklist/Whitelist supported
  • Game Mode (udp redirection on both OUTPUT chains and PREROUTING chains ) supported

Depends

  • shadowsocks-libev
  • simple-obfs (optional)
  • shadowsocks-v2ray-plugin (optional)
  • dnsmasq
  • ipset
  • iptables
  • bind-tools
  • AdguardTeam/dnsproxy (optional) - PKGBUILD

Usage

$ archwrt-ss.sh --help
Info:
  Contibuted by monlor & edward-p
Usage:
  archwrt-ss.sh {Command} {Option} {Config File}
Commands:
  start | stop | restart | status | config | update
Options:
  gfwlist | bypass | gamemode | global
Config File:
  Specify which config.json to use. by default the script will use the last one used.
Example:
  archwrt-ss.sh start bypass          Start with bypass mode
  archwrt-ss.sh restart gfwlist       Restart with gfwlist mode
  archwrt-ss.sh restart bypass sfo2   Retart with bypass mode using /opt/archwrt-ss/sfo2.json
  archwrt-ss.sh restart sfo2          Retart using /opt/archwrt-ss/sfo2.json
  archwrt-ss.sh start                 Start with default mode [current:gfwlist]
  archwrt-ss.sh config                Generate a config.json to /opt/archwrt-ss/config.json
  archwrt-ss.sh config nyc1           Generate a config.json to /opt/archwrt-ss/nyc1.json
  archwrt-ss.sh update                Update rules

Installation

Install on AUR (Archlinux only)

yay -S archwrt-ss.sh-git

Install manually

$ git clone https://github.com/archwrt/archwrt-ss.sh
$ cd archwrt-ss.sh
$ sudo install -Dm755 archwrt-ss.sh /usr/bin/archwrt-ss.sh
$ sudo install -Dm644 archwrt-ss.conf /opt/archwrt-ss/archwrt-ss.conf
$ sudo install -Dm644 archwrt-ss.service /usr/lib/systemd/system/archwrt-ss.service
$ sudo systemctl daemon-reload

Start

Before using systemctl start archwrt-ss.service, you need a valid config.json for shadowsocks, the following command will start a wizzard for that.

$ sudo archwrt-ss.sh config

When it is done, your config.json will be located at /opt/archwrt-ss/config.json.

It is recommend to check if there's any error in your config.json by running:

$ ss-redir -c /opt/archwrt-ss/config.json

Not yet, you may want to have a look on /opt/archwrt-ss/archwrt-ss.conf. Change some configs if you like.

Now you can start by

$ sudo systemctl start archwrt-ss.service

For auto start

systemctl enable archwrt-ss.service

Customized Blacklist/Whitelist

  • blacklist: by default, located at /opt/archwrt-ss/blacklist.txt
  • whitelist: by default, located at /opt/archwrt-ss/whitelist.txt

comment with # is supported

IP/NET/Domains suported, one line each, for example:

...
# This is a comment
127.0.0.1 #ip
127.0.0.0/24 #net
example.com #domain
...
You can’t perform that action at this time.