Repository navigation
v0.1.9
OpenWrt node client for the shadow9 WireGuard hub.
Install it on an OpenWrt 24.10.x or 25.12.x router:
release="$(. /etc/openwrt_release; echo "$DISTRIB_RELEASE")"
machine="$(uname -m)"
case "$machine" in
x86_64) ipk_arch=x86_64; apk_arch=x86-64 ;;
aarch64) ipk_arch=aarch64_generic; apk_arch=armsr-armv8 ;;
mips*) ipk_arch=mipsel_24kc; apk_arch=ramips-mt7621 ;;
*) echo "No shadow9 package matches $machine"; exit 1 ;;
esac
case "$release" in
24.10.*) file="shadow9-node_0.1.9-r1_${ipk_arch}.ipk"; package=ipk ;;
25.12.*) file="shadow9-node-0.1.9-r1_${apk_arch}.apk"; package=apk ;;
*) echo "No shadow9 package matches OpenWrt $release"; exit 1 ;;
esac
base="https://github.com/regix1/shadow9-manager/releases/download/v0.1.9"
wget -O "/tmp/$file" "$base/$file"
wget -O /tmp/SHA256SUMS "$base/SHA256SUMS"
checksum="$(grep -F " $file" /tmp/SHA256SUMS)" || {
echo "SHA256SUMS has no entry for $file"
exit 1
}
(cd /tmp && printf '%s\n' "$checksum" | sha256sum -c -) || exit 1
case "$package" in
ipk) opkg install "/tmp/$file" ;;
apk) apk add --allow-untrusted "/tmp/$file" ;;
esacReplace the hub address, token, and advertised LAN, then join:
shadow9-node join -hub http://<hub>:8081 -token <token> -advertise 192.168.1.0/24PBR creates and manages the pbr_wg0 internet-routing table; normal WAN
traffic is unchanged until a policy selects wg0. Add -site-only for only the
tunnel and advertised sites. Policy mode verifies that pbr is installed before
changing UCI.
Two changes break existing joins. Policy mode is IPv4 only, so an IPv6 tunnel
now has to join with -site-only. A -table <id> pin is no longer accepted and
fails the join, because PBR picks that ID itself; drop the flag and, on a node
that was pinned, issue a new token and join again with --keep-key.
shadow9-node uninstall removes only Shadow9-owned UCI sections; other
WireGuard interfaces and PBR policies are left unchanged.