VXVX Docs

Geo

GeoConfig — domain, IP, and app sets

Geographic data sets are defined in ServerConfig.geo (GeoConfig). Schema definition: protos/proto/vx/geo/geo.proto.

Atomic sets (atomic*) hold domains, IPs, or app IDs directly. Great sets (great*) combine other sets via inNames / exNames. Names must be unique within each category for both great and atomic sets.

Router and DNS reference sets by name via domainTags, dstIpTags, srcIpTags, and appTags. For client UI details, see Sets.

GeoConfig

greatDomainSets

Composite domain sets (include / exclude other sets)

atomicDomainSets

Atomic domain sets (inline domains, geosite, Clash rules, remote files, etc.)

greatIpSets

Great IP sets

atomicIpSets

Atomic IP sets

appSets

Application sets

Names must be unique within each category (greatDomainSets and atomicDomainSets cannot share a name; same for IP sets).

Domain

A single domain matching rule. Defined in protos/proto/vx/common/geo/geo.proto.

Used in router geoDomains, DNS geoDomains, and AtomicDomainSetConfig domains.

type
Domain.Type

Matching mode:

  • Plain: Substring match (keyword)
  • Regex: Regular expression match
  • RootDomain: Root domain and its subdomains (suffix match)
  • Full: Exact full hostname match
value
string

Domain or pattern to match

CIDR

A single IP network segment. Defined in protos/proto/vx/common/geo/geo.proto.

Used in AtomicIPSetConfig cidrs.

ip
bytes

IP address, 4 bytes (IPv4) or 16 bytes (IPv6). Usually base64-encoded in ProtoJSON.

prefix
uint32

Network prefix length (CIDR mask bits, e.g. 24 for /24)

AtomicDomainSetConfig

Atomic domain set. domains, geosite, geosites, clashFiles, and remoteGeoFiles can be combined.

name
string

Set name, referenced by domainTags

domains

Inline Domain list

geosite

Load domains from a single geosite configuration

geosites

Load domains from multiple geosite configurations (can be used alongside geosite)

useBloomFilter
bool

Enable a bloom filter for large sets to reduce memory usage (common on iOS). Has about a 1% false positive rate.

clashFiles
string[]

Clash-format rule file paths from which domain rules are extracted

inverse
bool

Inverse match: matches when the domain is not in this set's sources

remoteGeoFiles

Remote geo files downloaded periodically over HTTPS (see GeoRemoteFile)

GeositeConfig

Load domains from geosite.dat (or compatible format) by category code.

codes
string[]

Geosite category codes (e.g. cn, gfw, private)

attributes
string[]

Further filter loaded domains by Domain.attribute.key (case-insensitive)

filepath
string

Local geosite.dat path

remoteUrl
string

HTTPS URL for remote geosite.dat; refreshed on schedule via refreshCron. Downloaded to filepath

refreshCron
string

5-field cron (minute hour day month weekday). Empty means fetch only on startup / reload

AtomicIPSetConfig

Atomic IP set. cidrs, geoip, clashFiles, and remoteGeoFiles can be combined.

name
string

Set name, referenced by dstIpTags, srcIpTags, and ipTags

cidrs

Inline CIDR list

geoip

Load CIDRs from a geoip file by country/region code

inverse
bool

Inverse match: matches when the IP is not in this set's sources

clashFiles
string[]

Clash-format rule file paths from which IP / CIDR rules are extracted

remoteGeoFiles

Remote geo files downloaded on schedule

GeoIPConfig

Load IP ranges from geoip.dat (or compatible format) by code.

codes
string[]

GeoIP category / country codes (e.g. cn, private)

filepath
string

Local geoip.dat path

remoteUrl
string

HTTPS URL for remote geoip.dat

refreshCron
string

5-field cron. Empty means fetch only on startup / reload

GreatDomainSetConfig

Great domain set that does not hold domains directly; it references other atomic or great domain sets.

Matching logic: check exNames first (a hit means no match), then check inNames (a hit on any means match).

name
string

Composite set name

oppositeName
string

Paired opposite set name. See opposite set behavior in Sets

inNames
string[]

Include domains from these sets (match if any hit)

exNames
string[]

Exclude domains from these sets (no match if any hit)

Do not include this set's own name in inNames or exNames.

GreatIPSetConfig

Great IP set; same logic as GreatDomainSetConfig, but for IPs.

name
string

Composite set name

oppositeName
string

Paired opposite set name

inNames
string[]

Include addresses from these IP sets

exNames
string[]

Exclude addresses from these IP sets

AppSetConfig

Application set used by router appTags.

name
string

Set name

appIds

List of AppId

clashFiles
string[]

Clash-format rule files from which AppId rules are extracted

AppId

A single application ID matching rule. Defined in protos/proto/vx/router/router.proto.

type
AppId.Type

Matching mode:

  • Keyword: Substring match
  • Prefix: Prefix match
  • Exact: Exact match
value
string

Application package name or ID string (converted to lowercase when matching)

GeoRemoteFile

Scheduled download configuration for remote geo data files, used in AtomicDomainSetConfig.remoteGeoFiles and AtomicIPSetConfig.remoteGeoFiles.

filepath
string

Local path to write after download

sourceUrl
string

HTTPS download URL

refreshCron
string

5-field cron (minute hour day month weekday). Empty means fetch once on startup / reload only

Example

Atomic domain set + composite set + router reference:

{
  "geo": {
    "atomicDomainSets": [
      {
        "name": "gfw",
        "geosite": {
          "filepath": "geosite.dat",
          "codes": ["gfw"]
        }
      },
      {
        "name": "custom-direct",
        "domains": [
          { "type": "Full", "value": "example.com" }
        ]
      }
    ],
    "greatDomainSets": [
      {
        "name": "proxy-domains",
        "inNames": ["gfw"],
        "exNames": ["custom-direct"]
      }
    ]
  },
  "router": {
    "rules": [
      {
        "domainTags": ["proxy-domains"],
        "matchAll": true,
        "outboundTag": "proxy"
      }
    ]
  }
}
  • RouterdomainTags, dstIpTags, geoDomains, appTags
  • DNSdomainTags, ipTags
  • Sets — Set types and composition logic in the client

Comments