Skip to content

Routing and DNS

v2rayroot edited this page Jun 14, 2026 · 1 revision

Routing and DNS

Routing Actions

Action Outbound
proxy Proxy
direct Direct
block or reject Reject
Explicit outboundTag Exact supplied tag

Example:

{
  "geositeRules": [
    {"domain": "ads", "action": "block"},
    {"domain": "ir", "action": "direct"}
  ],
  "geoipRules": [
    {"country": "private", "action": "direct"}
  ]
}

Geosite Aliases

Recognized aliases include:

ads, porn, media, anticensorship, vpn, games, dev, ai, malware, phishing, messaging, cn, not-cn, private, win-spy, and win-update.

These names identify routing datasets; the vpn category is unrelated to a TUN/VPN runtime mode.

DNS Configuration

{
  "dnsConfig": {
    "servers": ["1.1.1.1", "8.8.8.8"],
    "strategy": "UseIP"
  }
}

Legacy top-level dnsConfig is normalized to Xray's dns field. When both are present, dnsConfig values take priority during migration.

geositeDomain and geositeDNS can prepend a domain-specific DNS server when a valid geosite asset is available.

Clone this wiki locally