Rule-based routing: connections are matched in order
Rule mode lets you route different requests through different outbound connections. The core checks rules in the order they appear in the configuration; the first match determines whether a request goes direct, is rejected, or uses a specified proxy group. Compared with global mode, troubleshooting routing requires one extra check: which rule did the connection match, not just which node is selected on the proxy page? If a domain rule seems ineffective, check the connection page to see whether the app is accessing the root domain, a subdomain, or an IP address. Then check whether a broader rule matched first. The fallback rule usually goes last.
mode: rule
rules:
- DOMAIN,example.org,DIRECT
- MATCH,DIRECT
- Check the matched rule in the connection log before changing rule order.
- Start a new connection after making changes so an existing session doesn't skew the result.
TUN mode: route traffic from apps that ignore system proxy settings
System proxy settings affect apps that honor them. TUN routes traffic through a virtual network interface and system routes, making it useful when a browser is proxied but other apps don't appear in the connection list. First close any other traffic-capture tools, then enable TUN in Settings and confirm system authorization, the virtual interface, and automatic routes are all active. TUN covers more traffic than system proxy settings, but is more likely to conflict with routes or network ranges. If LAN access breaks after enabling it, turn TUN off to compare, then check routes and excluded ranges.
tun:
enable: true
auto-route: true
- Use the same app to start a new connection before and after switching.
- If something breaks, check system authorization and routing separately.
DNS handling: distinguish lookup failures from connection failures
DNS handling determines where the core looks up domain names and how it returns results; it does not replace connection rules. Before changing settings, check whether the log shows a DNS timeout or a connection failure after a successful lookup. Enabling DNS resolution in the configuration requires confirming that requests actually reach that resolver. Browser-based encrypted DNS or the system cache may cause two tests to follow different paths. Establish a baseline with a known-reachable upstream, then adjust domain resolution policies, enhanced mode, or hijacking settings one at a time. Keep a configuration copy you can restore.
dns:
enable: true
enhanced-mode: redir-host
nameserver:
- system
system uses the system resolver and is useful as a baseline.- Confirm the lookup succeeds, then check whether the outbound connection reaches its destination.
Proxy groups: rules select a group, and the group selects an outbound connection
Proxy groups separate the names used in rules from the actual outbound connections, so you can change the route without rewriting every rule. A manual group works well when you need a fixed outbound connection; an automatic group depends on its health-check settings, and a reachable check target does not guarantee that your actual destination is reachable. To troubleshoot, find the matched rule in the connection log and note its group name, then check the current options on the proxy page. If that group references another group, follow the chain to the final outbound connection. After renaming a group, check its rule references too; otherwise, the configuration may appear intact but fail to load.
proxy-groups:
- name: Local Reference
type: select
proxies: [DIRECT, REJECT]
- This example uses built-in outbound options to illustrate manual selection.
- To verify that a service works, check the actual outbound connection used by a new session.
Subscription management: distinguish full configurations from proxy providers
A subscription imported from the client's configuration page may be a complete YAML file. Updating it can replace its rules and proxy groups. A proxy provider in the core is a data source referenced by the configuration; it can update available outbound options independently while leaving local rules intact. If manual changes disappear after an update, check whether you edited the original subscription, a local copy, or a client override. Put changes you need to keep in an override layer supported by the client, then check the effective configuration after updating—not just the success notification.
proxy-providers:
local-set:
type: file
path: ./providers/local.yaml
- This example defines a local provider; a proxy group must reference it before use.
- Hide subscription URLs and account details when sharing screenshots.
External controller: inspect the current runtime state
The external controller uses the core's control interface to view proxy groups, connections, and logs. It may also let you switch groups or close connections. Its purpose differs from the mixed proxy port: the controller manages the core, while the proxy port handles traffic. Compared with reading a subscription file directly, a controller makes it easier to check which configuration and rules are currently active. When setting one up for the first time, bind the interface to the local loopback address and set an access secret for local use if needed. If the panel won't open, check the listening address and port first, then determine whether the issue is browser-related or the core hasn't started.
external-controller: 127.0.0.1:9090
allow-lan: false
- Check the management port and proxy port separately; they are not interchangeable.
- Clients may manage the listening address themselves, so check the effective value first.