Skip to content
On this page
On this page

Provider routing, DNS and geo

For providers2.2.02.1.0Updated

Wrabbit has no routing policy of its own: by default all traffic goes into the tunnel. You set the route — with rules in the Xray JSON template or with a Happ profile in the routing header. Below: which method applies to which servers, how to send Russian services direct, and what the client changes in your template.

#Where the route comes from

Exactly one source of provider rules applies to each server. Which one depends on how the server arrived in the subscription. The user's own rule sets always sit on top (Routing).

Server arrived asWhose rules applyLicenseWho gets it this way
Full Xray JSON (Wrabbit rule with XRAY_JSON or <sub_url>/json)routing and dns of your template — as isnot needed: it is your template2.2.0 via the Wrabbit rule
Links vless://, vmess://, trojan://, ss://, hysteria2://The Happ profile from this subscription's routing headerrouting2.1.0 (Fallback Base64), other panels, subscriptions without JSON

#Russian services direct: the Xray JSON template2.2.0

A typical task: Russian sites and banks go direct, everything else through the VPN. For 2.2.0 this is done in the XRAY_JSON template that Remnawave serves through the Wrabbit rule. Any Remnawave version works; the same template also works in Happ and v2rayNG.

  1. #Turn on routeOnly on the template inbound

    The client takes sniffing from the first client inbound of the template (socks, http, mixed or tun). With routeOnly: true the sniffed domain is used only by domain rules while the connection goes to the original IP, so IP rules also match HTTPS. With routeOnly: false the destination is replaced by the domain, and IP rules only see connections without a domain.

  2. #Set DNS with UseIPv4

    queryStrategy: UseIPv4 restricts the built-in resolver to IPv4. It answers AAAA queries over UDP or TCP locally with NOERROR and no addresses. These queries will be absent from the upstream DNS log. This also applies to names whose connections would match a direct rule. IPv6 routing still applies: apps can connect to a known IPv6 address if the selected outbound supports it. For AAAA-only names, set UseIP explicitly in a full Xray JSON profile if the required outbounds support IPv6. Russian domains can use a Russian resolver.

  3. #Add direct rules before the catch-all

    Put the rules right after the private-networks rule, before the final “everything else” rule. Explicit domain: entries and CIDRs are the most reliable: they do not depend on geo files and their limits on the phone.

    Remnawave → Subscription Templates → XRAY_JSON (fragments)JSON
    {
      "inbounds": [
        {
          "tag": "socks", "protocol": "socks", "port": 10808, "listen": "127.0.0.1",
          "settings": { "udp": true },
          "sniffing": { "enabled": true, "destOverride": ["http", "tls", "quic"], "routeOnly": true }
        }
      ],
      "dns": {
        "servers": [
          { "address": "https://dns.google/dns-query" },
          { "address": "https://common.dot.dns.yandex.net/dns-query",
            "domains": ["domain:ru", "domain:xn--p1ai", "domain:yandex.net", "domain:vk.com"] }
        ],
        "queryStrategy": "UseIPv4"
      },
      "routing": {
        "rules": [
          { "type": "field", "outboundTag": "direct",
            "domain": ["domain:ru", "domain:xn--p1ai", "domain:yandex.net", "domain:vk.com", "domain:ozon.com"] },
          { "type": "field", "outboundTag": "direct",
            "ip": ["77.88.0.0/18", "87.250.224.0/19"] }
        ]
      }
    }
    

    The domains and networks are an example; use your own list. If the shared XRAY_JSON template is also served to other clients and Wrabbit needs its own, name it in the Wrabbit rule with the subscriptionTemplate field (Remnawave 2.7.4+).

  4. #Check

    Request the subscription the way 2.2.0 does and make sure the direct rules, routeOnly: true and UseIPv4 are there. The request takes an HWID slot — remove the device from the test user afterwards.

    Terminalbash
    curl -sS -o /tmp/wrabbit-sub.json -A 'Wrabbit/2.2.0' \
      -H 'x-hwid: wrabbit-test-0001' -H 'Cache-Control: no-cache' \
      'https://YOUR-DOMAIN/<SHORT_UUID>'
    
    jq '.[0].routing.rules, .[0].inbounds[0].sniffing, .[0].dns.queryStrategy' /tmp/wrabbit-sub.json
    

    On a phone with the VPN on, open a Russian and a foreign service that show your IP: the Russian one should show your home address. If a geo-code rule was cut, the log shows it.

#What the client changes in the template

The template runs as is, like in Happ: outbounds, balancers (leastLoad, leastPing, random, roundRobin, fallbackTag), observatory and burstObservatory, dialerProxy, routing.rules and dns. remnawave.injectHosts is expanded by the panel itself (2.6.3+). The client adds no rules, CDN exceptions or split DNS of its own. It only:

  • replaces inbounds with its own password-protected socks-in on 127.0.0.1; client inbound tags in rules are rewritten to it;
  • puts the user's rule sets at the start of the rules: block → direct → via VPN. “Via VPN” is the template catch-all if it leads to a proxy, otherwise the first proxy outbound or balancer;
  • replaces a fallbackTag that points to another balancer with the first outbound of that balancer's pool and writes a warning to the log;
  • intercepts app DNS (port 53, UDP and TCP) into the core DNS module. A template with its own dns uses that DNS. A template without dns gets a minimal 1.1.1.1/1.0.0.1 cache with UseIPv4 and no split DNS: queries follow the template’s tunnel rules;
  • for full Xray JSON, when the client generates dns-out, builds 503 and 504 return an empty answer for types other than A/AAAA. MX, TXT and SRV forwarding was added during development of build 505 and is included in candidate 550. These queries go to the original resolver over TCP through a validated proxy. If the client cannot select a suitable outbound, it returns SERVFAIL. HTTPS/SVCB, PTR and other types outside this list still get an empty answer. An existing template outbound tagged dns-out keeps its own rules;
  • copies sniffing from the template's client inbound; with no inbound or no sniffing it sets routeOnly: true. The sniffing-enable directive applies on top;
  • always sets domainStrategy: AsIs: IPIfNonMatch would resolve every unmatched domain, and the VPN extension's memory on iPhone is limited;
  • checks geo codes (below). If a “→ proxy” rule was cut and the catch-all goes direct, the catch-all is switched to the proxy — blocked traffic does not leak past the VPN.

Provider network directives — fragmentation, mux, exclude-routes, dns-from-json-enable, sniffing-enable — also apply to full JSON. They are listed in the directives reference.

Ping, balancers and decoys: which outbound the client treats as the working one

The connection always uses your whole JSON. But the ping in the list and the Auto checks measure one “main” outbound — the preferred outbound. If the entry has a decoy, the ping may measure it and show red while the tunnel works.

Selection order: routing.balancers[].fallbackTag → tag proxy-wl* or *-wl-* → non-decoy if the pool has *decoy* → the catch-all rule's pool (a rule without domain, ip and port) → the target of the other routing.rules (outboundTag or balancerTag) → the balancer.selector pool → transport cluster (when TLS and Reality are mixed) → tag proxy → the first proxy outbound.

  • The most reliable signal is routing.balancers[].fallbackTag set to the working outbound.
  • Mark a decoy in its tag (for example proxy-decoy-1) or give it a different transport from the working path.
  • For a balancer, the ping checks up to four outbounds of the pool. The Auto row has no number of its own.
  • dialerProxy chains and fragmentation are honoured by the ping too.
  • For leastLoad with burstObservatory, open a new TCP connection after a scheduled probe. An existing connection stays on its selected outbound. Check that subjectSelector covers the pool’s tags. Probe interval and sample count (sampling) affect failover time. A completed HTTP exchange counts as transport success even if it returns 503.
  • If the HTTP probe passes while the outbound drops UDP, route the affected UDP traffic through a proxy you have verified. Place the rule with network: udp and the proxy’s outboundTag before the catch-all leastLoad rule. Keep existing blocking, bypass and destination rules above it. Scope the rule to the affected addresses or ports if needed. Matching flows stay on that outbound. After updating the template, test fresh TCP and UDP sessions separately.

#Servers from links: the Happ profilerouting

Servers from links follow the Happ profile of their subscription — the same one Happ applies. Subscription A's profile does not apply to subscription B's servers or to servers added one by one. The user can turn the subscription's rule set off — then the profile and its DNS are not applied.

  1. #Build the profile

    The easiest way is the builder at routing.happ.su. A minimal profile:

    Happ profileJSON
    {
      "Name": "RU direct",
      "DirectSites": ["domain:ru", "domain:xn--p1ai", "domain:vk.com"],
      "DirectIp": ["77.88.0.0/18", "87.250.224.0/19"],
      "ProxySites": [],
      "BlockSites": []
    }
    

    The client drops references to external files ext: and ext-domain:; it keeps geosite: and geoip: and resolves them with geo files.

  2. #Serve the profile in the routing header

    The value is a Happ link with the profile in base64. The header wins over a happ://routing/… line in the body.

    Subscription response headerHTTP
    routing: happ://routing/onadd/<BASE64_PROFILE>
    

    Remnawave 3.x

    There is no separate field: when upgrading to 3.0 the panel moved “Happ routing” into customResponseHeaders, and the routing line goes to every client. Add a new profile there too.

    Remnawave 2.7–2.8

    The panel serves the Subscription Settings → Happ Routing field to Happ only: Wrabbit will not get it. Duplicate the same routing: happ://routing/… line in customResponseHeaders (and in squads' responseHeaders if set: in 2.x a squad replaces the whole set).

  3. #Check the license

    The profile is applied only with a license that includes the routing feature. In 2.2.0 open Subscription check: Routing should have a check mark, and there should be no “Unverified directives” row. How to get a license — License.

How the client reads profile fields
Profile fieldWhat the client does
BlockSites / BlockIp→ block
DirectSites / DirectIp→ direct
ProxySites / ProxyIp→ via the server
DomesticDNS… / RemoteDNS…split DNS: DirectSites are resolved by the domestic DNS, everything else by the remote one, via the server
DnsHostsdns.hosts
Geoipurl / Geositeurlthis subscription's geo files
DomainStrategyignored — always AsIs
  • Rule order: app DNS → core DNS module; private networks and Apple (17.0.0.0/8) — direct; the user's rule sets (block → direct → via VPN); the subscription profile (block → direct → via VPN); everything else — via the server.
  • A profile without DNS fields gets one resolver, 1.1.1.1, via the server. The client has no “home” domains, QUIC blocking or CDN exceptions of its own.

#Turn the profile offrouting

With a header or a body line. The profile is then not applied to the subscription's servers: no rules, no DNS, no networks past the tunnel. For routing-enable only 1 or true turns it on; any other non-empty value turns it off. A link works too: routing: happ://routing/off; 2.2.0 also accepts plain routing: off.

Subscription response headerHTTP
routing-enable: 0

#Profile by link with auto-update2.2.0routing

Like autorouting in INCY: the profile is fetched from an https link (it wins over the routing header), loaded at once and then every routing-geo-update-interval hours, or once a day without it. Limits: https only, up to 512 KB, up to 30 s; the profile passes the same check as a profile from a link — no catch-all rules, negations or overly wide networks. On failure the previous profile stays, and the next try is no sooner than 30 minutes later.

Subscription response headersHTTP
autorouting: https://YOUR-DOMAIN/routing/profile.json
routing-geo-update-interval: 24
DirectIp past the tunnel at the iOS level: restrictions

Explicit IPv4 CIDRs from DirectIp (profile and user, up to 80) are routed past the tunnel at the iOS level — that traffic never enters the tunnel. Geo codes stay core rules.

  • Each network is no wider than /8, and all together no more than four /8: otherwise the profile would turn the VPN off while showing “connected”.
  • Networks that cover the tunnel's system DNS, the tunnel's own address or FakeDNS pools (for example 172.16.0.0/12) are not routed past the tunnel: a core rule sends them direct.
  • Networks that overlap explicit CIDRs from BlockIp and ProxyIp are not routed past the tunnel.
  • Domain rules do not work at the iOS level: a domain the user sends via the VPN goes direct if its IP is in the profile's DirectIp.
  • Under Kill Switch iOS ignores routes past the tunnel: the first core rule sends the same list direct, for app traffic only.

#Geo files and limits on the phone

  • 2.2.0 Each subscription has its own geo files from its profile (Geoipurl / Geositeurl, as in Happ). Deleting the subscription deletes them.
  • A server's geoip: and geosite: codes resolve with its subscription's files, otherwise with the shared default set (geoip — runetfreedom, geosite — v2fly). If the code is not there either, the rule is cut with a log entry and the tunnel keeps working.
  • Profile files live as long as the profile sets them: if the routing feature is gone, the profile is turned off or the provider removes Geoipurl, the file is deleted and the default set resolves the codes.
  • 2.2.0 routing-geo-update-interval (hours, routing) — profile files are re-downloaded on schedule: checked when the app opens, and a scheduled refresh of the same address never runs over cellular. Without the directive a file is downloaded once until its address changes.
VPN extension memory limits on iPhone and iPad
WhatLimitWhat happens above it
One geoip: code1 MiBreplaced by the default set or cut
One geosite: code512 KiBreplaced by the default set or cut
All distinct geoip: codes2 MiBthe extra ones are cut
All distinct geosite: codes1 MiBthe extra ones are cut

geoip:ru (about 400 KB) and geosite:category-ru (about 24 KB) fit the limits. Heavy codes — for example geosite:ru-blocked (about 1.6 MB) or “fat” builds of geosite:category-ads-all — are cut on the phone. If a rule is critical, write explicit domain: entries and CIDRs.

#2.2.0 and 2.1.0

What2.2.02.1.0
How servers arrive from RemnawaveFull JSON via the Wrabbit ruleLinks via Fallback Base64, plus the app fetches <sub>/json itself: template outbounds and balancers apply to hosts with the same name
Whose rules applyThe XRAY_JSON templateThe routing profile instead of the template's domain/ip rules; without a profile, the template rules from /json (with routeOnly: false)
routing-enable: 0yesyes
autorouting, routing-geo-update-intervalyesno
Profile geo filesper subscriptionshared: files of the first subscription with Geoipurl/Geositeurl

While 2.1.0 is in the App Store, keep the routing profile in customResponseHeaders — its subscribers need it. The setup order for both versions is in Remnawave setup.

Updated November 27, 2026 · Found a mistake? →