Skip to content

Additional node config

Previously called "Custom Config"

This page (Nodes Manager → Other ActionAdditional Node Config) lets you maintain named, reusable cases (schemes) for six kinds of config:

  • DNS
  • Route
  • Outbound
  • Inbound
  • Domain blocking
  • Protocol blocking

Each field on this page holds an array of cases, not a single config. On every node's edit page you then pick, per field, which case that node should use from a dropdown — instead of every node sharing one global JSON, or editing raw JSON per node.

This is an advanced setting best suited for larger deployments that need different unlock/block/routing behavior per node or per group of nodes. If you're new to it, start by using one field (e.g. only DNS, or only domain blocking) before combining several.

How to use it

  1. Open Additional Node Config and fill in a case array for the field(s) you need (JSON format, see below).
  2. Save.
  3. Open the node's edit page, pick the case you want from the matching dropdown (e.g. "DNS Case", "Domain Blocking Case"), and save the node.

Case format

Every case-list field takes an array where each item has:

  • id — unique within that field, can be a number or a string
  • name — shown in the dropdown on the node edit page
  • one content field, whose name depends on the type (see below)
json
[
  { "id": "1", "name": "Case name 1", "<content field>": "..." },
  { "id": "2", "name": "Case name 2", "<content field>": "..." }
]

id only needs to be unique within its own field — the DNS list and the Route list can both use id: "1" without conflicting.

Saving is validated: every case needs a non-empty, unique id and name, and the content field must have the right JSON type (object for DNS/Route, array for Inbound/Outbound/domain/protocol). If a case is missing a required field, or the JSON isn't valid, the save is rejected with an error describing which field failed.


DNS case

Field: DNS Config JSON. Content field: dns (object — a full Xray DNS config).

json
[
  {
    "id": "1",
    "name": "Default DNS",
    "dns": {
      "servers": [
        "1.1.1.1",
        "8.8.8.8",
        {
          "address": "223.5.5.5",
          "port": 53,
          "domains": ["geosite:cn"]
        }
      ]
    }
  }
]

Route case

Field: Route Config JSON. Content field: routes (object — a full Xray routing config).

json
[
  {
    "id": "1",
    "name": "Block high-risk ports",
    "routes": {
      "domainStrategy": "AsIs",
      "rules": [
        {
          "type": "field",
          "network": "tcp,udp",
          "port": "22,23,3389,3306,6379,27017",
          "outboundTag": "blocked_port"
        }
      ]
    }
  }
]

Outbound case

Field: Outbound Config JSON. Content field: outbounds (array — full Xray outbounds config). This example pairs with the Route case above, sending the blocked_port tag to a blackhole:

json
[
  {
    "id": "1",
    "name": "Blackhole for blocked ports",
    "outbounds": [
      { "protocol": "freedom", "tag": "direct" },
      { "protocol": "blackhole", "tag": "blocked_port" }
    ]
  }
]

Inbound case

Field: Inbound Config JSON. Content field: inbounds (array). On XrayR, selecting this case entirely replaces the auto-generated inbound config with the one you provide. This is an advanced option most nodes don't need.

json
[
  {
    "id": "1",
    "name": "Custom inbound example",
    "inbounds": [
      {
        "port": 443,
        "protocol": "vmess",
        "settings": { "clients": [] },
        "sniffing": { "enabled": true, "destOverride": ["http", "tls"] },
        "streamSettings": { "network": "tcp" },
        "tag": "proxy"
      }
    ]
  }
]

Domain blocking case

Field: Domain Blocking Settings. Content field: domain (array of strings — domain names or regular expressions only; geosite/geoip are not supported).

json
[
  {
    "id": "1",
    "name": "Block social media",
    "domain": [
      "youtube.com",
      "regexp:(.*\\.||)(weibo|douban|douyin)\\.(cn|com|com\\.cn|net)"
    ]
  }
]

Protocol blocking case

Field: Protocol Blocking Settings. Content field: protocol (array of strings). Xray currently only recognizes four values: http, tls, quic, bittorrent.

json
[
  {
    "id": "1",
    "name": "Block BitTorrent",
    "protocol": ["bittorrent"]
  }
]

Network Setting JSON (no case support)

Network Setting JSON on this page works differently: it's a single global value, not a case list. It's only used as a default — when a node's own Network Setting JSON field is left empty, the node falls back to this value. If the node has its own value, that value is used instead.

Notes

  • DNS, Route, Outbound, and Inbound cases currently only take effect on the XrayR backend. XrayR pulls them at roughly 60x its node report interval (with the default 60-second report interval, that's about once an hour). After changing which case a node uses, save the node, then restart it so the new config applies immediately.
  • Route and Outbound cases also work on the v2node backend (modified fork), on the same pull interval — restart the node after switching cases for it to take effect right away.
  • DNS, domain blocking, and protocol blocking cases are delivered to the XrayR, v2node, and unified backends together with the node's normal config fetch, so no restart is needed. Of the three, domain blocking is also supported on soga — soga does not support DNS or protocol blocking cases.