Skip to content

[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, default info) System log verbosity level, in descending order of detail: trace, debug, info, warn, error, off.

    ini
    log-level = info
  • takeover (Enum, default mixed, compatible alias proxy-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 to takeover. See Proxy Interception Modes below.

    ini
    takeover = mixed
  • dns-server (List of DNS resolvers, comma-separated or [item1, item2], default empty list) Global default upstream DNS resolvers; automatically supplements system when empty or when no direct plain upstream is present. Shares upstream resolver syntax with Host, supporting #outbound=<name> to bind an outbound policy or #route to follow routing rules (multiple options separated by &, ;, or ,; system does not support #outbound or #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 = in key=value-like syntax. See DNS Mechanism below for protocol syntax and Bootstrap resolution rules.

    ini
    dns-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, default Ring/<version> (build <build_number>; <platform>)) Sets the User-Agent header 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 0 if the host does not provide a build number.

    ini
    dns-http-user-agent = Resolver/1.0
  • ipv6 (auto or Boolean, default true) 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.

    ini
    ipv6 = true
  • tfo-behaviour (Enum, default auto) Controls the global TCP Fast Open (TFO) policy for physical TCP outbound connections on Apple platforms, combined with each node's tfo setting in Proxy. Available values:

    • auto: Honors each node's tfo setting (enables TFO with system blackhole detection when tfo=true; keeps TFO disabled otherwise)
    • force-enabled: Forces TFO on nodes with tfo=true (bypassing system blackhole protection), without enabling TFO on nodes that do not set tfo=true
    • force-disabled: Globally disables TFO for all nodes, even if a node explicitly sets tfo=true
    ini
    tfo-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, default false, 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-routes no 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, default false, iOS only) Routes Apple Push Notification service (APNs) traffic through the VPN. Requires include-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, default false, iOS only) Routes local network traffic through the VPN. Requires include-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, default false, iOS only) Routes Internet-routable cellular service traffic through the VPN, such as Wi-Fi Calling, IMS, MMS, and Visual Voicemail. Requires include-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, default false, iOS only) Routes network traffic communicating with other devices over USB or Wi-Fi through the VPN. Requires include-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 = false
  • tun-ipv6 (auto or Boolean, default auto) 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 environment
    • true (aliases yes, 1): Enables TUN virtual network interface IPv6 routing
    • false (aliases no, 0): Disables TUN virtual network interface IPv6 routing
    ini
    tun-ipv6 = auto
  • tun-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.

    ini
    tun-included-routes = 192.0.2.0/24, 2001:db8::/32
  • tun-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.

    ini
    tun-excluded-routes = 192.168.0.0/16, 10.0.0.0/8
  • tun-icmp-echo-forwarding (Boolean, default true) Controls whether non-Fake-IP IPv4 ICMP Echo packets are forwarded to physical network interfaces; when disabled, the virtual interface network stack responds locally.

    ini
    tun-icmp-echo-forwarding = true
  • hijack-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]:port format. * matches any IP and defaults to port 53; *:port matches any IPv4 or IPv6 address on the specified port. Wildcard ports are not supported. For example, hijack-dns = *:53 intercepts DNS requests to port 53 at any address. A wildcard IP match skips the remaining address checks; other ports still use exact address rules.

    ini
    hijack-dns = 8.8.8.8:53, [2001:4860:4860::8888]:53
  • always-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.

    ini
    always-real-ip = example.com, *.apple.com
  • dns-reject-behavior (Enum, default empty) Response behavior when a domain query intercepted by the TUN interface matches a pre-matching REJECT rule. See Pre-matching Reject Interception under Inbound Request Interception below. Available values:

    • empty: Returns a NOERROR response code with an empty Answer section
    • zero: IPv4 A queries return 0.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.254 under the default 198.18.0.0/15 subnet); AAAA queries return an empty Answer; packets arriving at the TUN interface are discarded directly
    ini
    dns-reject-behavior = blackhole
  • skip-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.

    ini
    skip-proxy = 127.0.0.1, 192.168.0.0/16, 10.0.0.0/8, 172.16.0.0/12, localhost, *.local
  • force-http-hostname (List of hostnames, comma-separated or [item1, item2], default empty list) Candidates for cleartext HTTP processing, including *:80 by default. Bare hosts use port 80, :0 matches 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.

    ini
    force-http-hostname = example.com, *.internal.net
  • always-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.

    ini
    always-raw-tcp-hostname = bypass.example.com

Connectivity Probing & Management ​

  • proxy-test-url (HTTP/HTTPS URL, default http://captive.apple.com) Global default probe URL for proxy node connectivity and latency testing.

    ini
    proxy-test-url = http://cp.cloudflare.com/generate_204
  • internet-test-url (HTTP/HTTPS URL, default http://captive.apple.com) Health probe URL for direct (DIRECT) outbound connectivity to verify underlying Internet reachability.

    ini
    internet-test-url = http://captive.apple.com
  • test-timeout (Non-negative integer, unit: seconds, unset by default, falls back to 5 seconds) Global timeout limit for proxy node connectivity tests and health checks. Health checks prioritize this field; when unset or set to 0, it falls back to the OUTBOUND_HEALTH_CHECK_TIMEOUT environment variable (default 5 seconds).

    ini
    test-timeout = 5
  • test-url-check-status (Boolean, default false) Treats HTTP 4xx and 5xx responses as speed test failures.

    ini
    test-url-check-status = false
  • mmdb-url (HTTP/HTTPS URL, default built-in resource URL) Download and synchronization URL for the GeoIP offline database.

    ini
    mmdb-url = https://example.com/geoip/Country.mmdb
  • public-http-api-listen (IP:port, unset) Standalone listening address and port for the public HTTP API; disabled when unset. IPv6 addresses use [IP]:port format. Port 0 lets the system assign a port dynamically (see startup logs for the actual address). For interface contracts, see the runtime control API documentation.

    ini
    public-http-api-listen = 0.0.0.0:6171
  • public-http-api-key (Printable ASCII string, unset) Standalone secret key for the public HTTP API; when non-empty, all requests must include Authorization: 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 when public-http-api-listen is configured.

    ini
    public-http-api-key = <SECRET>

Warning: A missing or empty public-http-api-key disables authentication for the public endpoint. Any device able to reach the listening address can read runtime status, adjust policies, and invoke management APIs; binding to 0.0.0.0 or [::] 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.

ini
[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 (alias 0) Enables both TUN virtual network interface and system HTTP/SOCKS proxy settings, applying the global default routing policy.
  • only-tun (alias 1) Enables TUN virtual network interface interception only, leaving system proxy settings untouched, applying the global default routing policy.
  • mixed-no-default (alias 2) 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 (alias 3) Enables TUN virtual network interface only while preserving system proxy settings and the physical default gateway, intercepting only specific route ranges.
  • only-tun-manual (alias 4) Enables TUN virtual network interface only, leaving system proxy settings untouched, with intercepted subnets defined entirely by tun-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:

  1. System Interception & DNS Hijacking:
    • The TUN virtual interface intercepts operating system DNS requests; target DNS physical addresses and ports specified via hijack-dns are forcibly redirected to the local protocol stack.
  2. Pre-matching Reject Interception:
    • Every DNS query first performs matching against REJECT rules flagged with pre-matching before 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 a NOERROR response code with an empty Answer section.
      • zero: IPv4 A queries return 0.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.254 under the default 198.18.0.0/15 subnet); AAAA queries return an empty Answer. Packets arriving at the TUN interface are discarded directly.
    • In blackhole mode, 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, and blackhole address 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.
  3. 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/15 subnet).
    • 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-ip bypass Fake-IP allocation and proceed to the outbound upstream resolution phase to obtain real physical IPs.

Outbound Upstream Resolution ​

The outbound upstream resolution phase forwards requests that miss local mappings or require real IPs to external upstream resolvers:

  1. Upstream Resolver Configuration:
    • dns-server defines the global default upstream DNS resolver list, supporting both top-level comma-separated and [item1, item2] bracketed list syntax. Automatically supplements system (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).
    • Except for system, any upstream supports #outbound=<name> or #route fragment 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 = in key=value-like syntax (e.g., "https://dns.google/dns-query#outbound=Direct&route").
    • On iOS/macOS, system uses DNS from active physical interfaces, excluding virtual tunnels and loopbacks; updates automatically upon network changes without hardcoding current Wi-Fi or cellular DNS addresses.
  2. Resolution Precedence:
    • When dns-server contains encrypted upstreams (DoT, DoH, DoQ) or dispatcher-routed plain upstreams (with #outbound or #route) alongside direct plain resolvers (UDP, TCP, or system without #outbound/#route), the system prioritizes the encrypted or dispatcher-routed upstreams for standard domain queries.
  3. Bootstrap Resolution Rules:
    • When configured upstreams use domain names (e.g., tls://dns.example.com or https://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-server contains any direct UDP, TCP, or system resolver without #outbound or #route, those direct plain resolvers are used as Bootstrap resolvers.
    • No Direct Plain Resolver: If dns-server contains only encrypted upstreams, or if all plain upstreams have #outbound or #route, the system automatically supplements system as 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/#route resolvers bootstrap themselves.

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-server
  • always-real-ip
  • tun-included-routes
  • tun-excluded-routes
  • skip-proxy
  • hijack-dns
  • force-http-hostname
  • always-raw-tcp-hostname
  • suspend-ssids
ini
[General]
skip-proxy = %APPEND% 100.64.0.0/10
dns-server = %INSERT% 10.0.0.53

Configuration Examples ​

Basic Configuration ​

ini
[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