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
atomicDomainSetsAtomic domain sets (inline domains, geosite, Clash rules, remote files, etc.)
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.
typeMatching mode:
Plain: Substring match (keyword)Regex: Regular expression matchRootDomain: Root domain and its subdomains (suffix match)Full: Exact full hostname match
valueDomain or pattern to match
CIDR
A single IP network segment. Defined in protos/proto/vx/common/geo/geo.proto.
Used in AtomicIPSetConfig cidrs.
ipIP address, 4 bytes (IPv4) or 16 bytes (IPv6). Usually base64-encoded in ProtoJSON.
prefixNetwork prefix length (CIDR mask bits, e.g. 24 for /24)
AtomicDomainSetConfig
Atomic domain set. domains, geosite, geosites, clashFiles, and remoteGeoFiles can be combined.
nameSet name, referenced by domainTags
geositesLoad domains from multiple geosite configurations (can be used alongside geosite)
useBloomFilterEnable a bloom filter for large sets to reduce memory usage (common on iOS). Has about a 1% false positive rate.
clashFilesClash-format rule file paths from which domain rules are extracted
inverseInverse match: matches when the domain is not in this set's sources
remoteGeoFilesRemote geo files downloaded periodically over HTTPS (see GeoRemoteFile)
GeositeConfig
Load domains from geosite.dat (or compatible format) by category code.
codesGeosite category codes (e.g. cn, gfw, private)
attributesFurther filter loaded domains by Domain.attribute.key (case-insensitive)
filepathLocal geosite.dat path
remoteUrlHTTPS URL for remote geosite.dat; refreshed on schedule via refreshCron. Downloaded to filepath
refreshCron5-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.
nameSet name, referenced by dstIpTags, srcIpTags, and ipTags
inverseInverse match: matches when the IP is not in this set's sources
clashFilesClash-format rule file paths from which IP / CIDR rules are extracted
GeoIPConfig
Load IP ranges from geoip.dat (or compatible format) by code.
codesGeoIP category / country codes (e.g. cn, private)
filepathLocal geoip.dat path
remoteUrlHTTPS URL for remote geoip.dat
refreshCron5-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).
nameComposite set name
inNamesInclude domains from these sets (match if any hit)
exNamesExclude 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.
nameComposite set name
oppositeNamePaired opposite set name
inNamesInclude addresses from these IP sets
exNamesExclude addresses from these IP sets
AppSetConfig
Application set used by router appTags.
nameSet name
clashFilesClash-format rule files from which AppId rules are extracted
AppId
A single application ID matching rule. Defined in protos/proto/vx/router/router.proto.
typeMatching mode:
Keyword: Substring matchPrefix: Prefix matchExact: Exact match
valueApplication 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.
filepathLocal path to write after download
sourceUrlHTTPS download URL
refreshCron5-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"
}
]
}
}