Repository navigation
Home en
OpenSocks is an independent open-source OpenWrt client for the Transocks China return-route service, with LuCI management and Android/iOS remote control. A Transocks account is required for server access; this project is not an official Transocks client.
echo 'src/gz opensocks https://rel.n4t.su/opkg' >> /etc/opkg/customfeeds.conf
opkg update
opkg install opensocks-minimal luci-app-opensocksThe approximately 1.8KB opensocks-minimal launcher downloads, verifies, and expands the daemon into /tmp. It restores OpenSocks automatically after reboots without reinstallation.
For devices with enough storage:
opkg install opensocks luci-app-opensocksThe full and minimal packages conflict and must not be installed together.
Download the minimal or full daemon IPK plus luci-app-opensocks from OpenSocks Releases, copy them to /tmp, then run:
opkg update
opkg install /tmp/opensocks-minimal_0.2.0-1_all.ipk
opkg install /tmp/luci-app-opensocks_0.2.0-1_all.ipk
/etc/init.d/opensocks enable
/etc/init.d/opensocks start- Open
http://ROUTER/cgi-bin/luci/admin/services/opensocks. - Open Account and log in with a Transocks email/username and password.
- Open Servers, select the China server you want to use, and connect to Transocks.
- Under “Overview → One-tap network setup”, select Smart China Routing or Full China Routing and apply that mode to the OpenWrt network. You can switch modes later under “Settings → Routing mode”.
- Smart China routing: Chinese video, social, payment, shopping, music, and domestic-game services use the selected Transocks China line. X, YouTube, Google, overseas sites, and traffic not classified as Chinese continue through the router's original WAN. This is the recommended mode when only Chinese services need a return-to-China route.
- Full China routing: all public TCP and UDP from LAN/Wi-Fi clients use the selected Transocks China line. X, YouTube, Google, and every other public destination therefore use a Chinese exit and may be affected by Chinese network restrictions. Router management, local devices, and private network addresses remain local.
- Servers: automatic latency measurement and sorting; active VIP accounts hide Free servers.
- Persistent selection: the chosen server remains fixed across restarts.
- Traffic: live upload/download, persistent totals, and per-service rankings.
- Tests: exit region, carrier, IP, ASN, IP health, Ookla China, and SpeedTest.cn.
- Recovery: sessions, route mode, transparent rules, and the selected server recover after restarts.
The Android APK is available from the latest release. Install the iOS app through TestFlight.
- Open “OpenSocks → Mobile app” in LuCI.
- Obtain the router URL and pairing token shown on that page.
- Enter the displayed router URL and pairing token in the app.
- The app can then manage connections, servers, routing, traffic, tests, and the account.
For access away from home, connect to the router through Tailscale or a similar VPN first. On iPhone, the app language can be selected under Settings → OpenSocks → Language.
opkg update
opkg upgrade opensocks-minimal luci-app-opensocks
logread -e opensocks
wget -qO- http://127.0.0.1:9091/status