Routing and split tunnel
Two tools decide where traffic goes. Rules work on the server: they block a connection, let it leave from this server, or send it through an exit. The split tunnel works on the client’s phone or computer: Iranian sites skip the VPN altogether and use the client’s own connection. The Routing page is hidden until you turn on Selling and operator tools in Settings → Panel.
Rules are checked from top to bottom, and the first rule that matches decides. Traffic that matches no rule follows its inbound’s route. A rule is checked once for each connection, so it costs nothing for each packet. A rule’s Action is Block, which rejects the connection, Direct, or a route through one of your exits. Direct leaves from this server instead of the inbound’s exit, so websites see this server’s address even when that exit would hide it.
- Open Routing and press Add rule.
- Start from a preset with Start from a preset, or fill the fields yourself. The presets block private networks, BitTorrent, ads, adult sites, QUIC and outgoing mail, send Iran, China or Russia direct, and send AI, Google or streaming sites through WARP, as in AI via WARP. That last kind needs a WARP or exit outbound first, see Exits.
- Under Inbounds choose which inbounds the rule covers. The default is all of them.
- Set what to match. Destination IPs takes IPs, CIDRs,
geoip:irfor a country, andgeoip:private. Destination domains takes domains, each including its subdomains:irmatches every .ir site, and lists such asgeosite:ircome from a geo assets source. Network is TCP, UDP or any, and Ports takes values such as443and8000-9000. The BitTorrent switch matches its handshakes, trackers and DHT, and can only block. - Choose the Action and press Create.
A rule matches when its IPs or its domains match, and its network, ports and inbounds must match too. Only IPv4 is routed, because clients get IPv4 addresses: an IPv6 address in a rule is refused.
A rule with no conditions applies to all traffic of every client. The panel says so and asks you to confirm, because a stray empty Block cuts everyone off.
Drag a rule by its handle, or use the arrows, to change its order. A new install has Block private networks and Block BitTorrent on, and Iran direct as a ready example that is off. Default rules puts those back and removes the others. Rules as text adds many rules at once, one a line, and Show my rules as text copies yours to another panel:
block geosite:category-ads-alldirect geoip:ir iroutbound:WARP openai.com chatgpt.comblock udp 443 # no QUICA domain rule needs the panel’s DNS service, because the panel learns the domain’s addresses from clients’ lookups, see DNS. A Block rule with only domains answers “no such domain” instead.
Geo assets
Section titled “Geo assets”geoip: lists for a country are downloaded the first time a rule uses them. The Geo assets card adds more: turn on a source (Chocolate4U · Iran, Loyalsoldier or runetfreedom · Russia) to use its geoip: and geosite: lists. Update automatically is set to daily, every 24 hours, by default, and Update now refreshes a source at once. The top of the page shows each country list that your rules use, with its number of ranges, “downloading…” or “download failed”.
Split tunnel
Section titled “Split tunnel”Edit an inbound and turn on Iranian sites skip the VPN: Inbounds → Edit inbound → Iranian sites skip the VPN. Iranian IP ranges and private networks then go straight through the client’s own internet, with their own address, and everything else goes through the VPN. It works through the client’s config, which lists every range except the Iranian ones, so it applies only while Client allowed IPs sends everything through the VPN.
Precision sets the largest prefix length included in the split (smaller sub-blocks stay inside the VPN so nothing foreign skips it): Balanced, the default, keeps blocks up to /20 (in the panel’s hint, about 89% of Iranian addresses in a ~25 KB config). Light keeps blocks up to /18 (~77% in ~10 KB). Exact lists every block down to /32 (~160 KB, slow to import on some phones). These percentages vary with the current country list; what the config does not list still goes through the VPN.
- WireGuard apps route by IP, so a .ir site hosted abroad still uses the VPN.
- QR codes carry the full-VPN config, because the split does not fit in one. The downloaded config file has the split, and so do the lists for apps that route by rules, such as sing-box and Clash.
- While a country list is still downloading, configs fall back to the full VPN.
- Changing the split leaves configs already handed out working, but sending all traffic through the VPN. Subscription links update by themselves, and the others must be sent again.
Use Direct rules when traffic should still reach the VPN server and leave from it, for example to skip an inbound’s exit for some sites: websites then see this server’s address. Use the split tunnel when Iranian sites should not use the VPN at all.
What can go wrong
Section titled “What can go wrong”- A rule seems to do nothing. A rule above it matched first, so check the order. A domain rule also needs the DNS service to run, and a client that sends its DNS around the panel is not seen.
- A rule points at an exit that is gone. The panel warns and skips the rule, so that traffic follows its inbound’s route, which can be this server’s own address.
- A rule points at an exit that is not up yet (Tor or Psiphon still installing, the exit switched off, a local SOCKS not running). The panel warns on Routing: those sites fail until the exit is up; they are not sent direct (kill switch).
- “BitTorrent blocking is not available on this kernel”. The kernel lacks the iptables string match the block needs.
- Everyone lost their connection. A rule with no conditions and the Block action matches all traffic. Edit or delete it.