Clash Configuration Reference

Clash Terminology Guide: Proxies, Rules, DNS, and Configuration Fields

A clear breakdown of easily confused configuration terms. Use it to verify concepts before importing a subscription, matching rules, or changing TUN or DNS settings.

29 common terms 5 content categories For beginners and configuration troubleshooting
01 · CONNECTION

Proxy protocols

First distinguish the configuration source, the server entry, and the local proxy interface. They often appear on the same page but serve different purposes.

Subscription

A subscription is usually a remote configuration URL that clients use to retrieve nodes, proxy groups, rules, and DNS settings. Updating it reloads content published by the provider, so locally edited sections may be overwritten.

If a subscription link will not import, first check that the URL is complete and still valid, and that the response uses a configuration format supported by the client. A subscription is not a node; nodes are just one part of its contents.

Proxy protocols
Node

A node is a proxy server entry available for connection, usually containing a server address, port, protocol, authentication details, and transport parameters. After a node is selected, the core establishes the connection using those settings.

A node name is only a label for identification and says nothing by itself about actual speed. Connection quality is also affected by the local network, server load, route distance, and destination website.

Proxy protocols
Latency

Latency is the time a test request takes from being sent to receiving a response, usually measured in milliseconds. A lower value means the test target responded faster at that moment, but does not guarantee higher download speeds.

Client latency tests depend on the test address, timeout, and current network conditions. Compare nodes using the same test method, then judge them by real-world access as well.

Proxy protocols
HTTP proxy

An HTTP proxy receives application requests through a local listening port, after which the client determines how to handle the connection. Browsers and many apps that follow system proxy settings can use this interface directly.

When only the system proxy is enabled, command-line tools, games, and some background services that ignore system settings may bypass the client. Set a proxy for those apps individually or use TUN mode instead.

Proxy protocols
SOCKS5

SOCKS5 is a general-purpose proxy interface that can carry multiple types of connections and supports username-and-password authentication. Some developer tools, download clients, and command-line programs provide a separate SOCKS5 setting.

Enter the client's local listening address and SOCKS port. Whether DNS queries are also sent through the proxy depends on the application's implementation and the address format used.

Proxy protocols
02 · RUNTIME

Cores and clients

The graphical interface makes settings easy to manage, while the core handles connections. Understanding this division makes startup failures and feature differences easier to troubleshoot.

mihomo

mihomo is a proxy core evolved from Clash Meta. It reads configuration, establishes protocol connections, matches rules, handles DNS, and intercepts TUN traffic. Many modern graphical clients use it as their underlying runtime component.

The client UI version and the mihomo core version are separate concepts. When a new field is unrecognized or a feature is unavailable, check whether both the GUI client and the core support that configuration.

Cores and clients
Clash core

The Clash core is the program that performs proxy operations, listens on local ports, and handles connections according to the configuration. Running the core alone usually requires specifying a configuration file and working directory from the command line.

The core is not a complete client. Subscription management, menu-bar icons, system proxy controls, and log viewing are generally provided by the outer GUI client.

Cores and clients
GUI client

A GUI client is a graphical management program for importing subscriptions, selecting policies, switching modes, and viewing logs. It translates user actions into configuration or control commands the core can understand.

Even when different clients use the same core, their layouts, default parameters, and system integration may differ. Before following a tutorial, confirm its client name and target platform.

Cores and clients
Clash Plus

Clash Plus is a graphical client for multiple popular platforms. It can import subscriptions, manage proxy groups, and adjust basic network settings. It belongs to the client interface layer; the selected core still handles the actual traffic.

When used across platforms, menu layouts adapt to each operating system's interaction model. Configuration concepts are largely the same, but system proxy, background operation, and permission settings must be handled per platform.

Cores and clients
Provider

Provider is a configuration mechanism that loads a set of content from a local file or remote URL, commonly a proxy collection or rule collection. The main configuration keeps only the reference, while individual entries can be updated independently.

This separation suits larger configurations and lets multiple proxy groups reuse the same nodes. If a Provider update fails, check the reference URL, file path, update interval, and content format.

Cores and clients
03 · ROUTING

Rules and routing

The proxy mode determines the overall handling method; rules determine where each connection goes. Rules are usually matched from top to bottom, with the first match taking effect.

Rule mode

Rule mode matches each connection against the rule list in order, then sends it through a proxy, directly, or rejects it according to the matched policy. It suits everyday use by giving different websites and apps different paths.

Rule order matters. A broad rule placed too early can prevent later, more specific rules from taking effect. When troubleshooting routing, check the matched rule and final policy in the logs first.

Rules and routing
Global mode

Global mode sends most connections intercepted by the client through the currently selected proxy policy. Fine-grained rules in the configuration generally do not participate in everyday routing decisions.

It is useful for briefly testing whether a node works or determining whether rules are causing a problem. For long-term use, still watch for LAN traffic, system services, and connections that should not use a proxy.

Rules and routing
Direct mode

Direct mode sends intercepted connections straight to their destinations without using proxy nodes. It is often used to temporarily restore the local network path or determine whether a problem is related to the proxy route.

Switching to Direct does not necessarily stop the client: local ports, DNS, or TUN may still be running. To stop interception completely, turn off the relevant option or exit the program.

Rules and routing
Rule Provider

Rule Provider stores a set of rules in a separate file or remote URL, which the main configuration references by name. It shortens the main configuration and allows frequently used rule sets to be updated independently.

The rule set's behavior type must match its content format, such as domain, IP-CIDR, or classical rules. If the types do not match, the file may download successfully but still fail to match as expected.

Rules and routing
GeoIP

GeoIP matches the geographic association of a destination IP in a database and is commonly used to route connections by country or region. It matches address data, not the language used by a webpage.

If the database is not updated for a long time, newly assigned or reclassified IPs may be categorized incorrectly. When geographic rules behave unexpectedly, check the database update time and download source.

Rules and routing
GeoSite

GeoSite is a domain-rule database organized by purpose or affiliation. It can match groups of media, search, messaging, and common service domains. It classifies domains, unlike GeoIP, which evaluates address location.

A website may use multiple third-party domains, so one category may not cover every request. During troubleshooting, use connection logs to add more specific domain rules.

Rules and routing
Proxy group

A proxy group organizes multiple nodes, direct policies, or other proxy groups for use by rules. Common behaviors include manual selection, health-check selection, failover, and load distribution.

Rules usually match a proxy group name rather than the final node name. The actual route depends on which member the group has selected at that time.

Rules and routing
04 · NETWORK

DNS and networking

DNS translates domain names into addresses, while TUN expands the scope of traffic interception. They affect each other and are key areas to check when connections behave unexpectedly.

DNS

DNS is the basic network service that translates domain names into IP addresses. Clash can intercept domain queries and choose a local resolver, remote resolver, or encrypted DNS according to its configuration.

If a webpage will not open but its IP address works directly, the problem may be in name resolution. Check whether system DNS, client DNS, and the browser's secure DNS are creating separate paths.

DNS and networking
Fake-IP

Fake-IP mode first returns a reserved address for the domain. When the application connects, the core restores the domain and applies the rules. This preserves domain information and avoids resolving the real address before matching.

Some LAN services, games, and applications that depend on real addresses may not work well this way. For compatibility issues, add specific domains to the filter list instead of changing the entire DNS configuration.

DNS and networking
Redir-Host

Redir-Host resolves the destination domain to its real IP first, then handles the connection and rules. Its behavior is closer to traditional DNS and is easier for some applications that depend on real addresses to handle.

Because real resolution happens earlier, the DNS path and result directly affect subsequent routing. After switching modes, old caches may remain active for a while; clear system and client caches if necessary.

DNS and networking
DNS leak

A DNS leak occurs when domain queries bypass the expected resolution path and are handled directly by the system, browser, or another network component. This often happens when multiple DNS features are enabled or an app specifies its own resolver.

Check system DNS, browser secure DNS, the client's listening port, and TUN DNS hijacking settings layer by layer. The goal is a consistent query path, not several overlapping resolution schemes.

DNS and networking
DoH

DoH stands for DNS over HTTPS. It sends domain queries over an HTTPS connection and can reduce the chance of traditional plaintext DNS being read or modified in transit.

The DoH service itself needs a working network connection, so its domain resolution and access route must work first. Misconfiguration can cause circular resolution or prevent connection during startup.

DNS and networking
TUN mode

TUN mode intercepts traffic at the network layer through a virtual network interface, including apps, command-line programs, and some games that ignore system proxy settings. Its coverage is usually broader than system proxy mode alone.

System permissions may be required, along with routing, DNS hijacking, and LAN access configuration. If the network goes down, first check that the virtual interface was created correctly, then inspect the stack type and routes.

DNS and networking
05 · CONFIG

Configuration fields

Clash configurations usually use YAML. Check indentation first, then field hierarchy, and finally name references. This is more effective than trying to interpret an error character by character.

YAML

YAML is a common data format for Clash configurations and uses indentation to express field hierarchy. It is sensitive to spaces, colons, and list markers; tabs or misaligned indentation can cause parsing failures.

Keep indentation consistent at the same level when editing configuration, and avoid changing node names casually. If a name contains special characters, wrapping it in quotes is usually safer.

Configuration fields
port

port sets the local listening port for the HTTP proxy. When an app enables an HTTP proxy, it typically connects to the loopback address and this port.

If another program is using the port, the core may fail to start listening. After changing it, update the system proxy and any apps configured manually.

Configuration fields
mixed-port

mixed-port is a mixed listening port that accepts both HTTP and SOCKS connections. Applications can connect to the same port according to the proxy type they support.

It reduces the number of local ports, but does not change the protocol used by the remote node. If multiple listening ports are configured, make sure their values do not conflict.

Configuration fields
proxies

proxies stores static node definitions written directly in the main configuration. Each entry typically includes a name, server address, port, protocol, and authentication parameters.

Proxy groups reference these entries by node name, so renaming one also requires updating the relevant groups. For many nodes, use a Proxy Provider to move them into a separate file.

Configuration fields
proxy-groups

proxy-groups defines proxy groups, including their names, behavior types, and optional members. Rules typically send traffic to a group, which then selects the final node.

Group members can be nodes, built-in policies, or another proxy group. Referenced names must match exactly; otherwise the core may report that the proxy or policy cannot be found.

Configuration fields
rules

rules stores routing conditions and target policies from top to bottom. Usually, specific domains and special services come first, broader category rules follow, and a final fallback rule comes last.

Once a connection matches an earlier rule, later rules are normally not evaluated. If a new rule has no effect, check whether a broader condition earlier in the list catches it first.

Configuration fields