Importable templates for OneXray's current Custom Routing editor, including its Local DNS setting. These are not server subscriptions or complete Raw JSON configurations. Add your own servers separately.
| Template | Routing behavior | Local DNS address |
|---|---|---|
| Mainland China | Private networks, Apple domains and mainland China domains/IPs connect directly; other traffic uses the VPN. | 223.5.5.5 |
| Iran | Domains in the Iran dataset, private IPs and Iranian IPs connect directly; other traffic uses the VPN. | 5.200.200.200 |
| Russia | Domains/IPs on the Russian blocking lists use the VPN; remaining IPs connect directly. | 9.9.9.9 |
Each template requests one entry node. Change the entry count in the editor to use two or three. The templates do not select servers or configure a final exit.
- Download the JSON for Mainland China, Iran or Russia. Alternatively, copy the complete JSON content, not the download URL.
- On Connect, open Traffic method and select New custom route under Custom Routing.
- Choose Import file or Read clipboard in the editor. OneXray downloads the custom Geodata declared by the template; internet access is needed.
- Review the name, rules, entry count and Local DNS address, then Save.
- Select the saved route in Traffic method, choose your servers and connect.
OneXray supports up to three custom routes with unique names. At the limit, import into an existing route to replace its content or delete an unused route first. Do not use the server or Raw JSON import flow for these templates.
- Only the local/direct DNS address is stored. Proxy DNS remains
8.8.8.8, managed by OneXray. TUN DNS settings are independent. - Local DNS domain matches are derived from rules whose action is
direct. IP, port and network conditions do not select a local DNS resolver. The local server is not a general fallback. - Russia has no direct-domain rule, so its saved
9.9.9.9address is not used until you add one. Domain lookups use proxy DNS; the old general Quad9 fallback is no longer part of this template. IPIfNonMatchresolves an unmatched domain and checks the rules again using the resulting IPs. Russia's last direct rule covers0.0.0.0/0and::/0, rather than all TCP/UDP traffic, so blocked IPs can still be checked after resolution. If resolution yields no IP, this last rule cannot match.- Unmatched traffic follows Xray's default: the first entry outbound. Explicit
VPN rules use the
proxybalancer. Different condition types in one rule are ANDed; values within one type are alternatives.
Custom filenames and HTTPS download URLs are included in geodata.assets.
Do not add these datasets manually before importing.
| Template | File | Source |
|---|---|---|
| Mainland China | EnhancedGeoSite.dat |
Loyalsoldier Geosite |
| Mainland China | EnhancedGeoIP.dat |
Loyalsoldier GeoIP |
| Iran | IranGeoSite.dat |
Iran hosted domains |
| Russia | RussiaGeoSite.dat |
Russia Geosite |
| Russia | RussiaGeoIP.dat |
Russia GeoIP |
Iran also uses OneXray's default geoip.dat for PRIVATE and IR; default data
is not included in the manifest. A custom filename collision is rejected, not
overwritten. To reuse an installed matching dataset, remove that asset from the
import manifest and keep its rule references unchanged. Otherwise, rename both
the asset and all corresponding ext: references before importing. Do not
delete datasets needed by another route.
After import, OneXray removes the manifest from stored routing JSON and includes the required custom dependencies again when exporting.
name: a unique display name of 1–32 characters in shared/imported JSON.dns.servers: one object withtag: "app-dns-direct"andaddressonly.outbounds: one to three empty objects, such as[{}]or[{}, {}, {}].routing:domainStrategy: "IPIfNonMatch"and orderedrules.geodata.assets: optional import dependencies, each withfileandurl.
Rules use ruleTag for their name and support domain, ip, port and
network. Each rule selects exactly one action: balancerTag: "proxy",
outboundTag: "direct" or outboundTag: "block".
Do not include real nodes, direct/block outbound definitions, inboundTag,
type, DNS domain lists/query strategies, or runtime balancer definitions.
OneXray generates runtime dependencies and validates the configuration through
libXray. Full Xray configurations belong in Raw JSON instead.