Skip to content
SharX Connect

RoutingProfile JSON schema

The RoutingProfile type in SharXCore encodes JSON with PascalCase keys (see CodingKeys). The decoder also accepts boolean fields as the strings "true" / "false".

The on-disk RoutingProfilesDocument stores an array of profiles; panels and deep links typically ship one profile object.


Fields

JSON key Swift Description
id UUID? If omitted, a new UUID is generated.
Name String Profile display name.
GlobalProxy Bool or string If true, the default catch-all rule uses the proxy outbound; otherwise direct.
RouteOrder String UI/panel hint; the Xray builder orders rules as block → proxy → direct (same idea as template block-proxy-direct).
RemoteDNSType String e.g. DoH; see XrayConfigBuilder.makeDNSServer.
RemoteDNSDomain String DoH: may be a full https://… URL or paired with RemoteDNSIP.
RemoteDNSIP String IP for DoH: https://{ip}/dns-query.
DomesticDNSType String e.g. DoU.
DomesticDNSDomain String
DomesticDNSIP String
Geoipurl String Panel-provided geo URL; usage with UseChunkFiles — see user routing guide.
Geositeurl String Geosite URL.
LastUpdated String Arbitrary panel timestamp string.
DnsHosts [String: String] Static hosts for the dns.hosts block in Xray JSON.
DirectSites [String] Domains/tags for direct (normalized with domain: prefix when needed).
DirectIp [String] IP/CIDR/geoip: entries for direct.
ProxySites [String] Same for the proxy outbound.
ProxyIp [String]
BlockSites [String] For block.
BlockIp [String]
DomainStrategy String Xray routing.domainStrategy; empty → IPIfNonMatch.
FakeDNS Bool or string When true, enables the fakedns section in the generated config.
UseChunkFiles Bool or string When true and geo/geoip.dat + geo/geosite.dat exist in the App Group, the builder injects geoip / geosite paths into the Xray JSON.

Domain matchers: unless the value starts with full:, domain:, regexp:, or geosite:, the client prefixes domain:.


Base64 payload must decode to at most 512 KiB (RoutingAnnounceDecoder.maxDecodedByteCount).


See also

Версия на русском