Other configuration
This page explains the parameters of the [general] section of the configuration file.
bypass-tun
Traffic on an iOS device reaches Loon in one of two ways: HTTP Proxy or TUN (think of it as a virtual network interface). bypass-tun concerns TUN. Anything listed here — IP ranges or domains — is handed back to the system instead of being processed by Loon.
bypass-tun = 192.168.0.0/16,localhost,*.localskip-proxy
Similar to the above, but for HTTP Proxy. Anything listed here is not forwarded to Loon and is left to the system.
skip-proxy = 192.168.0.0/16dns-server
UDP DNS servers, separated by commas. system means the system DNS.
dns-server = system,1.1.1.1doh-server
DNS-over-HTTPS servers, separated by commas.
doh-server = https://doh.dns.apple.com/dns-querydoq-server
DNS-over-QUIC servers, separated by commas, default port 784.
doh-server = quic://example.com, quic://example2.comdoh3-server
DNS-over-HTTP3 servers, separated by commas.
doh3-server = h3://223.6.6.6/dns-queryipv6
Whether IPv6 requests are allowed. When enabled, DNS AAAA records are queried and IPv6 addresses are preferred.
ipv6 = trueallow-wifi-access
Whether LAN clients may use Loon as their proxy.
allow-wifi-access = truewifi-access-http-port
The HTTP proxy port exposed to the LAN once LAN access is enabled.
wifi-access-http-port = 8899wifi-access-socks5-port
The SOCKS5 proxy port exposed to the LAN once LAN access is enabled.
wifi-access-socks5-port = 8898proxy-test-url
The URL used for benchmarking. Used whenever a policy group does not define its own test URL.
proxy-test-url = http://cp.cloudflare.com/generate_204internet-test-url
The URL used to check whether the network is reachable. Use a URL that can be reached directly.
internet-test-url = http://wifi.vivo.com.cn/generate_204test-timeout
Timeout in seconds when benchmarking a node.
test-timeout = 5switch-node-after-failure-times
How many consecutive connection failures trigger a node switch. Defaults to 3.
switch-node-after-failure-times = 2resource-parser
URL of a subscription resource parser. The Sub-Store parser is recommended.
resource-parser = https://github.com/sub-store-org/Sub-Store/releases/latest/download/sub-store-parser.loon.min.jsssid-trigger
Changes the traffic mode when a particular Wi-Fi network is joined. "loon-wifi5g":DIRECT means direct mode on the loon-wifi5g network, "cellular":PROXY means proxy mode on cellular, and "default":RULE is the mode used otherwise.
ssid-trigger = "loon-wifi5g":DIRECT,"cellular":PROXY,"default":RULEreal-ip
Some apps resolve DNS themselves and then connect by IP, which makes domain based rules impossible to match. Loon solves this with FakeIP: those DNS requests are intercepted and answered with a fake IP, and when a request arrives for that fake IP the original domain is restored. Occasionally the system caches one of those fake IPs, so after Loon is turned off a request may still be sent to it. For such domains, real-ip makes Loon answer with the real address instead.
real-ip = *.apple.com,*.icloud.cominterface-mode
Which network interface carries the traffic. Four modes are available:
Auto— chosen by the systemCellular— prefer cellular when both Wi-Fi and cellular are availablePerformace— use the faster interface when both are availableBalance— share the load between both interfaces
interface-mode = Performaceforce-http-engine-hosts
Some apps issue HTTP over raw TCP, and that traffic goes through TUN. For performance Loon only decodes such HTTP requests on port 80 by default. If requests use another port, list the domain or port here so Loon decodes them.
# :8080 decodes every request on port 8080; 0 means every port
# a wildcard domain decodes that domain on all ports
force-http-engine-hosts = *.baid.com,:8080disable-udp-ports
Disables UDP on the listed ports.
disable-udp-ports = 443,80disable-stun
Disables STUN UDP traffic. Enabling it closes the WebRTC IP leak.
disable-stun = truegeoip-url
Custom URL for the GeoIP database.
