[General] General Settings
This section configures global operational parameters, local traffic interception, DNS resolution mechanisms, and direct connectivity probing.
Field Reference
General & Core Parameters
log-level(Enum, defaultinfo) System log verbosity level, in descending order of detail:trace,debug,info,warn,error,off.inilog-level = infotakeover(Enum, defaultmixed, compatible aliasproxy-model) System traffic interception and routing allocation mode:mixed/0,only-tun/1,mixed-no-default/2,only-tun-no-default/3,only-tun-manual/4; formatted output normalizes totakeover. See Proxy Interception Modes below.initakeover = mixeddns-server(List of DNS resolvers, comma-separated or[item1, item2], default empty list) Global default upstream DNS resolvers; automatically supplementssystemwhen empty or when no direct plain upstream is present. Shares upstream resolver syntax with Host, supporting#outbound=<name>to bind an outbound policy or#routeto follow routing rules (multiple options separated by&,;, or,;systemdoes not support#outboundor#route). Supports both top-level comma-separated and[...]bracketed list syntax; wrap elements in double quotes if they contain,, quotes, brackets, whitespace followed by#/;, or=inkey=value-like syntax. See DNS Mechanism below for protocol syntax and Bootstrap resolution rules.inidns-server = 223.5.5.5, 119.29.29.29, https://dns.alidns.com/dns-query dns-server = [system, "https://dns.google/dns-query#outbound=Direct&route", 1.1.1.1]dns-http-user-agent(Non-empty string, defaultRing/<version> (build <build_number>; <platform>)) Sets theUser-Agentheader for DoH2 / DoH3 requests, applying to both global DNS and DoH upstreams configured in[Host]; takes effect upon reloading configuration. When omitted, Ring uses its default UA, e.g.,Ring/1.2.3 (build 42; macOS). Only printable ASCII characters are allowed; empty values or newlines are rejected.Internal HTTP requests for subscriptions, rule sets, and resource downloads always use the default UA and cannot be overridden by this option. The default UA does not contain device identifiers or library dependency details; uses
0if the host does not provide a build number.inidns-http-user-agent = Resolver/1.0ipv6(autoor Boolean, defaulttrue) Controls standard DNS resolution and literal IPv6 destinations in local HTTP and SOCKS proxies. When disabled, standard lookups use IPv4, HTTP returns 403, SOCKS5 CONNECT returns a policy denial, and SOCKS5 UDP drops the affected datagrams. Domain names can still be resolved by a remote proxy. In auto mode the proxy listeners follow system IPv6 availability.iniipv6 = truetfo-behaviour(Enum, defaultauto) Controls the global TCP Fast Open (TFO) policy for physical TCP outbound connections on Apple platforms, combined with each node'stfosetting in Proxy. Available values:auto: Honors each node'stfosetting (enables TFO with system blackhole detection whentfo=true; keeps TFO disabled otherwise)force-enabled: Forces TFO on nodes withtfo=true(bypassing system blackhole protection), without enabling TFO on nodes that do not settfo=trueforce-disabled: Globally disables TFO for all nodes, even if a node explicitly setstfo=true
initfo-behaviour = auto
Local Traffic Interception & Inbound Routing
suspend-ssids(List of SSID names, comma-separated or[item1, item2], default empty list, Apple clients only) Specifies Wi-Fi network names where the VPN should not intercept traffic, disconnected by iOS On-Demand connection rules. When leaving these networks, the VPN automatically reconnects when an application initiates network traffic. Names are matched exactly and case-sensitively;*and?are treated as literal characters and not expanded; wrap names containing spaces, commas, or special characters in double quotes. Follows standard list replacement,%APPEND%, and%INSERT%merging rules with plugins; an empty list clears all SSID exceptions.ini[General] suspend-ssids = ASUS, ASUS-5G, "Office Wi-Fi"Upon connection, a non-empty list enables system On-Demand VPN: remaining disconnected on matching networks, and connecting on-demand elsewhere. Adding exceptions takes effect on the next connection. Manually stopping the VPN disables On-Demand connection and prevents automatic resumption until connecting again or enabling Always On. Updating the list in configuration or returning to the foreground synchronizes exceptions with the system without altering the On-Demand enabled state. Tunnel reconstruction involves system scheduling overhead and does not guarantee zero latency; networks sharing an SSID share the same rules.
SSID exceptions manage system On-Demand behavior, whereas the following include-* options control the interception scope of an established VPN tunnel.
include-all-networks(Boolean, defaultfalse, iOS only) Instructs the system to route most network traffic through the VPN, including connections initiated by apps bound to physical interfaces; essential system services remain exempt. When enabled,tun-excluded-routesno longer dictates system bypass scope; local networks and system services are handled by platform-specific exceptions. Changes take effect after disconnecting and reconnecting the VPN in the app; system on-demand reconnects preserve the last saved scope. Enabling may impact local network services, inter-device communications, and connectivity during network handover.include-apns(Boolean, defaultfalse, iOS only) Routes Apple Push Notification service (APNs) traffic through the VPN. Requiresinclude-all-networks=true; otherwise configuration validation fails. Intercepted APNs traffic follows normal routing rules and is not guaranteed to route via proxy outbounds. Unavailability of VPN or outbound proxies may delay push notifications and iMessage.include-local-networks(Boolean, defaultfalse, iOS only) Routes local network traffic through the VPN. Requiresinclude-all-networks=true. Enabling may disrupt AirPlay, AirDrop, CarPlay, and other local network services; when disabled, default system bypass for local networks is retained.include-cellular-services(Boolean, defaultfalse, iOS only) Routes Internet-routable cellular service traffic through the VPN, such as Wi-Fi Calling, IMS, MMS, and Visual Voicemail. Requiresinclude-all-networks=true. Carrier traffic routed directly into cellular internal networks is always excluded by the system; enabling may impact voice calls and messaging services.include-device-communication(Boolean, defaultfalse, iOS only) Routes network traffic communicating with other devices over USB or Wi-Fi through the VPN. Requiresinclude-all-networks=true. Enabling may interrupt communication between Xcode and development devices; system-mandated exclusions for paired devices continue to bypass the VPN.The merged configuration (main profile and plugins) must satisfy all above dependencies; the following settings are applied when reconnecting the VPN from the app:
ini[General] include-all-networks = true include-apns = true include-local-networks = false include-cellular-services = false include-device-communication = falsetun-ipv6(autoor Boolean, defaultauto) TUN virtual network interface IPv6 routing mode (case-insensitive). The Apple Network Extension reapplies its settings when the physical network changes. Auto mode updates IPv6 addressing, routes, and packet admission together. Available values:auto: Automatically evaluates availability based on the current network environmenttrue(aliasesyes,1): Enables TUN virtual network interface IPv6 routingfalse(aliasesno,0): Disables TUN virtual network interface IPv6 routing
initun-ipv6 = autotun-included-routes(List of CIDRs, comma-separated or[item1, item2], default empty list) Destination IPv4/IPv6 CIDR ranges explicitly routed to and intercepted by the TUN interface.initun-included-routes = 192.0.2.0/24, 2001:db8::/32tun-excluded-routes(List of CIDRs, comma-separated or[item1, item2], default empty list) Destination IPv4/IPv6 CIDR ranges that bypass the TUN interface and route directly through physical network interfaces.initun-excluded-routes = 192.168.0.0/16, 10.0.0.0/8tun-icmp-echo-forwarding(Boolean, defaulttrue) Controls whether non-Fake-IP IPv4 ICMP Echo packets are forwarded to physical network interfaces; when disabled, the virtual interface network stack responds locally.initun-icmp-echo-forwarding = truehijack-dns(List of addresses, comma-separated or[item1, item2], default empty list) Target DNS addresses and ports (IP:port) forcibly redirected to the local protocol stack for processing; IPv6 addresses must use[IP]:portformat.*matches any IP and defaults to port 53;*:portmatches any IPv4 or IPv6 address on the specified port. Wildcard ports are not supported. For example,hijack-dns = *:53intercepts DNS requests to port 53 at any address. A wildcard IP match skips the remaining address checks; other ports still use exact address rules.inihijack-dns = 8.8.8.8:53, [2001:4860:4860::8888]:53always-real-ip(List of domain names, comma-separated or[item1, item2], default empty list) Fake-IP filter list; matching domains bypass Fake-IP allocation and are resolved via real upstream resolvers to return physical IPs.inialways-real-ip = example.com, *.apple.comdns-reject-behavior(Enum, defaultempty) Response behavior when a domain query intercepted by the TUN interface matches a pre-matchingREJECTrule. See Pre-matching Reject Interception under Inbound Request Interception below. Available values:empty: Returns aNOERRORresponse code with an empty Answer sectionzero: IPv4 A queries return0.0.0.0; IPv6 AAAA queries return::blackhole: IPv4 A queries return the highest address of the Fake-IP subnet (e.g.,198.19.255.254under the default198.18.0.0/15subnet); AAAA queries return an empty Answer; packets arriving at the TUN interface are discarded directly
inidns-reject-behavior = blackholeskip-proxy(List of hosts, comma-separated or[item1, item2], default empty list) List of hosts (domains, IPs, or CIDR blocks) exempt from proxy interception, passing traffic directly to the physical network.iniskip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.localforce-http-hostname(List of hostnames, comma-separated or[item1, item2], default empty list) Candidates for cleartext HTTP processing, including*:80by default. Bare hosts use port 80,:0matches any port, and a-prefix excludes a target. Only ports 80 and 443 trigger active inspection; entries for other ports do not trigger reads. Only HTTP already identified at ingress enters the HTTP engine; this setting does not decrypt TLS.iniforce-http-hostname = example.com, *.internal.netalways-raw-tcp-hostname(List of hostnames, comma-separated or[item1, item2], default empty list) Hosts forwarded as raw TCP without active protocol inspection, HTTP takeover, or MITM. This list takes priority over default inspection on ports 80 and 443 and HTTP/MITM takeover lists. Bare hosts match all ports; wildcards, explicit ports, and-exclusions are supported. Normal routing rules still apply.inialways-raw-tcp-hostname = bypass.example.com
Connectivity Probing & Management
proxy-test-url(HTTP/HTTPS URL, defaulthttp://captive.apple.com) Global default probe URL for proxy node connectivity and latency testing.iniproxy-test-url = http://cp.cloudflare.com/generate_204internet-test-url(HTTP/HTTPS URL, defaulthttp://captive.apple.com) Health probe URL for direct (DIRECT) outbound connectivity to verify underlying Internet reachability.iniinternet-test-url = http://captive.apple.comtest-timeout(Non-negative integer, unit: seconds, unset by default, falls back to5seconds) Global timeout limit for proxy node connectivity tests and health checks. Health checks prioritize this field; when unset or set to0, it falls back to theOUTBOUND_HEALTH_CHECK_TIMEOUTenvironment variable (default 5 seconds).initest-timeout = 5test-url-check-status(Boolean, defaultfalse) Treats HTTP4xxand5xxresponses as speed test failures.initest-url-check-status = falsemmdb-url(HTTP/HTTPS URL, default built-in resource URL) Download and synchronization URL for the GeoIP offline database.inimmdb-url = https://example.com/geoip/Country.mmdbpublic-http-api-listen(IP:port, unset) Standalone listening address and port for the public HTTP API; disabled when unset. IPv6 addresses use[IP]:portformat. Port0lets the system assign a port dynamically (see startup logs for the actual address). For interface contracts, see the runtime control API documentation.inipublic-http-api-listen = 0.0.0.0:6171public-http-api-key(Printable ASCII string, unset) Standalone secret key for the public HTTP API; when non-empty, all requests must includeAuthorization: Bearer <SECRET>. A bare empty assignment (public-http-api-key =) is parsed as unset, while quoted""is parsed as an empty string; both leave authentication disabled on the public endpoint. When set, only printable ASCII characters (0x20–0x7E) are allowed; non-ASCII or control characters fail configuration validation whenpublic-http-api-listenis configured.inipublic-http-api-key = <SECRET>
Warning: A missing or empty
public-http-api-keydisables authentication for the public endpoint. Any device able to reach the listening address can read runtime status, adjust policies, and invoke management APIs; binding to0.0.0.0or[::]exposes the API across all reachable network interfaces. A non-empty secret key should be configured whenever access control is required.
The public endpoint is loaded, switched, and updated upon configuration reloads with the active profile. Removing the listen configuration closes the public endpoint. Changing the key or listening address terminates SSE sessions on the previous endpoint. Listen failures (such as port conflicts) only log errors without blocking configuration application or the internal API; retried upon subsequent profile applications. The internal API always listens independently on 127.0.0.1 with its own randomized port and secret, unaffected by public endpoint settings.
[General]
public-http-api-listen = 0.0.0.0:6171
public-http-api-key = <SECRET>Proxy Interception Modes
takeover determines how the client intercepts operating system traffic and manages routing tables:
mixed(alias0) Enables both TUN virtual network interface and system HTTP/SOCKS proxy settings, applying the global default routing policy.only-tun(alias1) Enables TUN virtual network interface interception only, leaving system proxy settings untouched, applying the global default routing policy.mixed-no-default(alias2) Enables both TUN virtual network interface and system proxy settings while preserving the physical default gateway, intercepting only specific route ranges.only-tun-no-default(alias3) Enables TUN virtual network interface only while preserving system proxy settings and the physical default gateway, intercepting only specific route ranges.only-tun-manual(alias4) Enables TUN virtual network interface only, leaving system proxy settings untouched, with intercepted subnets defined entirely bytun-included-routes.
DNS Mechanism
The DNS pipeline is divided into two distinct phases: Inbound Request Interception and Outbound Upstream Resolution.
Inbound Request Interception
The inbound request interception phase captures DNS queries initiated by the operating system or applications, performing local interception or address mapping:
- System Interception & DNS Hijacking:
- The TUN virtual interface intercepts operating system DNS requests; target DNS physical addresses and ports specified via
hijack-dnsare forcibly redirected to the local protocol stack.
- The TUN virtual interface intercepts operating system DNS requests; target DNS physical addresses and ports specified via
- Pre-matching Reject Interception:
- Every DNS query first performs matching against
REJECTrules flagged withpre-matchingbefore allocating or reusing a Fake-IP, or querying upstream resolvers. Existing or restored persistent Fake-IP mappings do not bypass current rules. - Upon matching a pre-matching reject rule, the response is returned according to
dns-reject-behavior:empty: Returns aNOERRORresponse code with an empty Answer section.zero: IPv4 A queries return0.0.0.0; IPv6 AAAA queries return::.blackhole: IPv4 A queries return the highest address of the Fake-IP subnet (e.g.,198.19.255.254under the default198.18.0.0/15subnet); AAAA queries return an empty Answer. Packets arriving at the TUN interface are discarded directly.
- In
blackholemode, the TUN interface discards packets destined for the blackhole IP at the network layer; TCP sends no RST/ACK responses, and UDP does not establish session state. - Standard Fake-IP,
zero, andblackholeaddress records are returned with a TTL of 1 second; empty Answer responses contain no address records or TTL. - Reject responses are not written to Fake-IP mappings. When a DOMAIN-SET updates, subsequent queries evaluate against current contents; standard mappings are retained for reverse lookups and reuse.
- Every DNS query first performs matching against
- Fake-IP Address Allocation & Filter List:
- In default mode, queries are assigned a virtual IP from the Fake-IP pool (default
198.18.0.0/15subnet). - The last address of the subnet is reserved as a blackhole, with standard allocation capped at the last address minus one; persistent recovery only loads mappings within the standard allocation range. The blackhole address is calculated from the configured IP range and always resides within intercepted subnet routes.
- Filter List (Fake-IP Filter): Domains configured in
always-real-ipbypass Fake-IP allocation and proceed to the outbound upstream resolution phase to obtain real physical IPs.
- In default mode, queries are assigned a virtual IP from the Fake-IP pool (default
Outbound Upstream Resolution
The outbound upstream resolution phase forwards requests that miss local mappings or require real IPs to external upstream resolvers:
- Upstream Resolver Configuration:
dns-serverdefines the global default upstream DNS resolver list, supporting both top-level comma-separated and[item1, item2]bracketed list syntax. Automatically supplementssystem(the default resolver assigned to the active physical network interface) when empty or when no direct plain upstream is present.- Supported upstream transport protocols and format specifications:
- System Default (
system): Inherits DNS resolvers assigned to the active physical network interface. - Standard UDP (
IP,IP:port,udp://IP[:port]): Standard UDP resolution, default port 53. - Standard TCP (
tcp://IP[:port]): Standard TCP resolution, default port 53. - DNS over TLS / DoT (
tls://host[:port]): Encrypted TLS channel, default port 853. - DNS over QUIC / DoQ (
quic://host[:port]): QUIC transport, default port 853. - DNS over HTTPS / DoH (
https://host/path): DoH transport, auto-negotiating HTTP/2 or HTTP/3. - HTTP/2 DoH (
h2://host/path): DoH transport enforced via HTTP/2. - HTTP/3 DoH (
h3://host/path): DoH transport enforced via HTTP/3 (over QUIC).
- System Default (
- Except for
system, any upstream supports#outbound=<name>or#routefragment options (multiple options separated by&,;, or,), matching the upstream routing options in Host. Wrap elements in double quotes if they contain,, quotes, brackets, whitespace followed by#/;, or=inkey=value-like syntax (e.g.,"https://dns.google/dns-query#outbound=Direct&route"). - On iOS/macOS,
systemuses DNS from active physical interfaces, excluding virtual tunnels and loopbacks; updates automatically upon network changes without hardcoding current Wi-Fi or cellular DNS addresses.
- Resolution Precedence:
- When
dns-servercontains encrypted upstreams (DoT, DoH, DoQ) or dispatcher-routed plain upstreams (with#outboundor#route) alongside direct plain resolvers (UDP, TCP, orsystemwithout#outbound/#route), the system prioritizes the encrypted or dispatcher-routed upstreams for standard domain queries.
- When
- Bootstrap Resolution Rules:
- When configured upstreams use domain names (e.g.,
tls://dns.example.comorhttps://dns.example.com/dns-query), the system must first resolve the physical IP of that domain via a direct plain resolver (Bootstrap DNS). If an upstream is configured directly with a physical IP, no Bootstrap resolution is needed. - Configured Direct Plain Resolver: If
dns-servercontains any direct UDP, TCP, orsystemresolver without#outboundor#route, those direct plain resolvers are used as Bootstrap resolvers. - No Direct Plain Resolver: If
dns-servercontains only encrypted upstreams, or if all plain upstreams have#outboundor#route, the system automatically supplementssystemas the Bootstrap resolver. - Bootstrap Scope: Bootstrap resolvers are used solely to resolve domain names of upstreams (and as fallback when no prioritized upstream is configured), never letting
#outbound/#routeresolvers bootstrap themselves.
- When configured upstreams use domain names (e.g.,
Merging Rules
When used with Plugin, single scalar keys in [General] are overwritten by higher-priority plugins; the following 9 list keys support key-level %APPEND% and %INSERT% list merging directives (replacing the list by default when no directive is given):
dns-serveralways-real-iptun-included-routestun-excluded-routesskip-proxyhijack-dnsforce-http-hostnamealways-raw-tcp-hostnamesuspend-ssids
[General]
skip-proxy = %APPEND% 100.64.0.0/10
dns-server = %INSERT% 10.0.0.53Configuration Examples
Basic Configuration
[General]
log-level = info
takeover = mixed
ipv6 = true
tfo-behaviour = auto
dns-server = 223.5.5.5, 119.29.29.29, https://dns.alidns.com/dns-query
dns-reject-behavior = blackhole
tun-ipv6 = auto
skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
# Proxy node connectivity and latency testing
proxy-test-url = http://cp.cloudflare.com/generate_204
# Direct outbound connectivity health probing
internet-test-url = http://captive.apple.com
test-timeout = 5
test-url-check-status = false