A patch script for OpenWrt routers running podkop that configures split-routing:
- Russian domains (
.ru,.рф,.su+ major.comRussian services) → go direct - Everything else → routed through your VLESS tunnel
podkop stores community_lists as a UCI option instead of list, but internally uses config_list_foreach which silently skips option entries. This means the community list ruleset is never loaded into sing-box, breaking all routing. This patch fixes that and sets up proper split-routing.
- OpenWrt with podkop installed
- Your VLESS outbound configured in LuCI → Services → Podkop (server, UUID, TLS/REALITY settings)
# Copy script to the router
scp apply_patch.sh root@192.168.1.1:/tmp/
# SSH into the router and run
ssh root@192.168.1.1
sh /tmp/apply_patch.sh-
Creates
/etc/podkop/russia_domains.txt— Russian TLD suffixes (.ru,.рф,.su) plus explicitly listed major Russian.com/.netservices (VK, Yandex, Sber, Tinkoff, Ozon, etc.) -
Fixes UCI
community_liststype — changesoption community_lists 'russia_inside'tolist community_lists 'russia_inside'so podkop'sconfig_list_foreachactually reads it -
Adds a
russia_directexclusion section in podkop pointing to the domains file -
Creates
/usr/bin/podkop_fix.sh— rewrites sing-box's DNS and route rules on every podkop start:- Russian domains → real DNS → real IPs → not intercepted by tproxy → direct
- All other domains → FakeIP catch-all → tproxy → sing-box → VLESS tunnel
-
Patches
/usr/bin/podkopto call the fix script before sing-box launches
vk.com → real DNS (87.240.x.x) → not tproxied → DIRECT
yandex.ru → real DNS (5.255.x.x) → not tproxied → DIRECT
youtube.com → FakeIP (198.18.0.x) → tproxy → VLESS tunnel
google.com → FakeIP (198.18.0.x) → tproxy → VLESS tunnel
Only traffic to 198.18.0.0/15 (FakeIP range) is intercepted by nft and redirected to sing-box's tproxy port. Russian domains get real IPs that fall outside this range, so they bypass the tunnel entirely.
echo "example.ru" >> /etc/podkop/russia_domains.txt
service podkop restartThe .ru TLD suffix already covers millions of Russian sites. Add entries only for Russian services on non-.ru domains.
# Russian site → should return a real IP (e.g. 87.240.x.x), not 198.18.x.x
nslookup vk.com 127.0.0.42
# Foreign site → should return a FakeIP (198.18.x.x)
nslookup youtube.com 127.0.0.42
# Tunnel check → should return your VPS IP, not your ISP IP
curl https://ifconfig.me