The LEDE Project (“Linux Embedded Development Environment”) is a Linux operating system based on OpenWrt. It is a complete replacement for the vendor-supplied firmware of a wide range of wireless routers and non-network devices.
In this post I’m going to show you how to install Shadowsocks client on a router to pass all traffic through and share it across all connected devices.
First, you need a router with LEDE or OpenWRT installed on. The nominated router need to have at least 32MB (64MB recommended) of RAM and 8MB of flash memory.
I suggest below low cost routers with enough resources.
1. Xiaomi Mi WiFi Mini
2. TP-Link TL-WR842ND v2 or v3
Easy Install Shadowsocks Client
Add OpenWrt-dist depot
Login to your rooter (Default: 192.168.1.1) as root user via a SSH client and run the following command to get architecture:
opkg print-architecture | awk '{print $2}'
- Login to LuCI web interface (Default: 192.168.1.1)
- Go to System->Software->Configuration
- Delete ‘option check_signature 1’ line ->Submit
- Add below lines to ‘Custom feeds’ (Replace {architecture} with your router architecture)
LEDE
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/base/{architecture} src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/luci/
OpenWRT
src/gz openwrt_dist http://openwrt-dist.sourceforge.net/packages/base/{architecture} src/gz openwrt_dist_luci http://openwrt-dist.sourceforge.net/packages/luci/
Install packages
In SSH client run the following commands:
opkg update opkg install shadowsocks-libev opkg install luci-app-shadowsocks
Configure Shadowsocks Client
- Login to LuCI web interface (Default: 192.168.1.1)
- Go to Services->ShadowSocks
- In ‘Servers Manage’ tab add your own server
- In ‘General Settings’ tab choose your server for at least ‘Transparent Proxy’ and ‘Port Forward’->Save & Apply
- Go to Network->DHCP and DNS
- General Settings->Set ‘DNS forwardings’ to 127.0.0.1#5300
- Resolv and Hosts Files->Check ‘Ignore resolve file’->Save & Apply
Congratulations, now you have a working Shadowsocks client on your router!