Awesome
Shadowsocks for Asuswrt-Merlin New Gen
shadowsocks-asuswrt-merlin will install shadowsocks-libev
and v2ray-plugin
on your Asuswrt-Merlin New Gen(version 382.xx and higher) based router, tested on NETGEAR R7000 and ASUS RT-AC86U.
For server side set up, you can easily install shadowsocks server and v2ray-plugin with docker by https://github.com/Acris/docker-shadowsocks-libev.
Getting Started
Prerequisites
- Asuswrt-Merlin New Gen(version 382.xx and higher) based router
- Entware must be installed, you can find installation documents on https://github.com/RMerl/asuswrt-merlin.ng/wiki/Entware
- JFFS partition should be enabled
- ca-certificates should be installed for HTTPS support
- git and git-http should be installed
- wget-ssl should be installed
Make sure you have installed all prerequisites software and utils, you can install it by:
opkg update
opkg upgrade
opkg install ca-certificates git-http wget-ssl
Installation
shadowsocks-asuswrt-merlin is installed by running the following commands in your terminal:
sh -c "$(wget https://fastly.jsdelivr.net/gh/Acris/shadowsocks-asuswrt-merlin@master/tools/install.sh -O -)"
Configuration
Configure shadowsocks
The sample shadowsocks configuration file location is: /opt/share/ss-merlin/etc/shadowsocks/config.sample.json
, ensure local_address
is set to 0.0.0.0
.
We highly recommend to enable v2ray-plugin
on your server side. You can set up your server in several command with: https://github.com/Acris/docker-shadowsocks-libev.
If you want to enable UDP support, you should set mode
from tcp_only
to tcp_and_udp
.
For configuration file documents, you can go to: https://github.com/shadowsocks/shadowsocks-libev/blob/master/doc/shadowsocks-libev.asciidoc#config-file
# Copy and edit the shadowsocks configuration file
cd /opt/share/ss-merlin/etc/shadowsocks
cp config.sample.json config.json
vi config.json
Configure shadowsocks-asuswrt-merlin
The sample shadowsocks-asuswrt-merlin configuration file location is: /opt/share/ss-merlin/etc/ss-merlin.sample.conf
. Currently, shadowsocks-asuswrt-merlin support three mode:
- 0: GFW list.
- 1: Bypass mainland China.
- 2: Global mode.
You can also enable or disable UDP support to change udp=0
or udp=1
, ensure your server side support UDP and set "mode": "tcp_and_udp"
in shadowsocks configuration file.
# Copy and edit the shadowsocks-asuswrt-merlin configuration file
cd /opt/share/ss-merlin/etc
cp ss-merlin.sample.conf ss-merlin.conf
vi ss-merlin.conf
Configure which LAN IP will pass transparent proxy by edit lan_ips
, you can assign a LAN IP like 192.169.1.125 means only this device can pass transparent proxy.
And you can change the default DNS server for Chinese IPs by modifying china_dns_ip
.
Then, start the service:
# Start the service
ss-merlin start
Usage
admin@R7000:/tmp/home/root# ss-merlin
Usage: ss-merlin start|stop|restart|status|upgrade|uninstall
Custom user rules
# Block domain
## Add domain to this file if you want to block it.
vi /opt/share/ss-merlin/rules/user_domain_name_blocklist.txt
# Force pass proxy
## You can add domain to this file if you want to force the domain pass proxy.
vi /opt/share/ss-merlin/rules/user_domain_name_gfwlist.txt
# Domain whitelist
## You can add domain to this file if you need the domain bypass proxy.
vi /opt/share/ss-merlin/rules/user_domain_name_whitelist.txt
# IP whitelist
## You can add IP address to this file if you need the IP bypass proxy.
vi /opt/share/ss-merlin/rules/user_ip_whitelist.txt
# IP gfwlist
## You can add IP address to this file if you want to force the IP pass proxy.
vi /opt/share/ss-merlin/rules/user_ip_gfwlist.txt
# Then, restart the service
ss-merlin restart
Credits
Thanks for the following awesome projects ❤️
- shadowsocks-libev
- v2ray-plugin
- asuswrt-merlin.ng
- Entware
- asuswrt-merlin-transparent-proxy
- unbound
- dnsmasq-china-list
- gfwlist
- gfwlist2dnsmasq
- ss-tproxy
- oh-my-zsh
- And much more.
Thanks
<a href="https://jb.gg/OpenSource?from=shadowsocks-asuswrt-merlin"> <img alt="JetBrains" src="https://www.jetbrains.com/company/brand/img/jetbrains_logo.png" width="100"> </a>License
The MIT License (MIT)
Copyright (c) 2016 Billy Zheng
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.