Rules and Networking Quick Reference

Clash
Glossary

Start with clients, cores, and proxy protocols, then build up to rule-based routing, DNS, subscription configuration, and TUN traffic interception. Each entry explains what the term means, where it appears, and which configuration boundaries matter.

CATEGORY INDEX

Find Concepts by Configuration Stage

Terms are grouped in the order they typically appear in practice. Start with cores and clients when configuring for the first time; jump to the relevant category when troubleshooting rules, resolution, or traffic interception.

01 / RUNTIME

Cores and Clients

The client handles the interface and system integration, while the proxy core handles connections and traffic processing. Separating these layers helps identify whether an update, compatibility issue, or runtime error belongs to one layer or the other.

Clash
CLASH ECOSYSTEM

Clash is a network proxy tool ecosystem centered on rule matching, policy groups, and support for multiple proxy protocols. In everyday usage, Clash may refer to the original core or broadly to graphical clients built on compatible cores.

When reading documentation, first confirm whether it discusses the core, configuration format, or a specific client. Similar names do not mean identical interfaces, update channels, or feature support.

mihomo
CORE / CLASH META

mihomo is a proxy core developed from Clash Meta. It supports common Clash configuration structures and adds more protocols, rule types, DNS options, and traffic interception capabilities. Some clients label the mihomo core directly in their settings.

Whether a feature works depends not only on a switch in the client interface, but also on the core version and supported configuration syntax. When migrating an older configuration, check extension fields and rule-set syntax carefully.

Client
GUI CLIENT

A client is the graphical interface and system integration layer around a proxy core. It typically imports subscriptions, switches policy groups, changes proxy modes, shows logs, and controls startup behavior. System interception differs across Windows, macOS, and Android clients.

A client is not a node service and does not automatically generate usable nodes. Choose one based on the operating system, core type, TUN support, and maintenance status.

Proxy Core
PROXY CORE

The proxy core reads configuration, establishes proxy connections, handles DNS, matches rules, and forwards traffic. Whether it continues running after the graphical client closes depends on the core process and background service.

Protocol handshakes, rule matches, and listening-port errors in logs usually originate in the core layer. If the client interface looks normal but connections fail, check both the core status and runtime logs.

02 / PROTOCOL

Proxy Protocols

The protocol determines how the client connects to a proxy server. Protocol names, server parameters, and local proxy ports belong to different layers and should not be confused when importing configuration.

HTTP Proxy
HTTP PROXY

HTTP proxy is one way for an application to connect to a local Clash listening port, commonly used by browsers, terminal tools, and developer software. For HTTPS websites, the application usually creates a tunnel with CONNECT and completes encrypted communication inside it.

This describes the connection from an application to the local proxy entry point; it does not mean the remote node also uses HTTP. Only applications that read system proxy settings or support manual proxy configuration will actively use this entry point.

SOCKS5
SOCKS VERSION 5

SOCKS5 is a general-purpose proxy protocol that forwards connections for many TCP-based applications and can also support UDP. It is generally more versatile than an entry point designed only for web requests.

SOCKS5 does not itself encrypt data between the local application and the proxy port. When configuring software, distinguish the local SOCKS5 listening port from the protocol used by a remote node in a subscription.

Shadowsocks
SS

Shadowsocks is an encrypted proxy protocol. Node configuration usually includes a server address, port, password, and encryption method; these fields must match the server.

When import fails or a connection times out, first confirm that the node parameters are complete, then check local network access and server reachability. Supported encryption methods may differ between cores.

Trojan
TLS-BASED PROXY

Trojan is a proxy protocol based on TLS transport characteristics. Common settings include the server address, port, password, and server name. Certificate validation, system time, and domain resolution all affect the connection.

When a TLS handshake fails, repeatedly switching nodes is not enough. Check the server name, certificate chain, system time, and possible interference from the network between the client and server.

03 / ROUTING

Rules and Policy Groups

Rules determine what category a connection belongs to; policy groups determine which exit carries it. Troubleshoot routing layer by layer by checking rule order, the matched result, and the selected policy group.

Advanced Routing
RULE ROUTING

Rule-based routing assigns connections to specified policy groups based on domains, destination IPs, processes, network types, or rule sets. It determines which traffic uses which exit rather than merely toggling the proxy on or off.

Rules are usually matched from top to bottom. Once a connection matches a valid rule, matching stops. A rule with an overly broad scope placed too early can hide more precise rules below it.

Policy Group
PROXY-GROUP

A policy group combines nodes, direct exits, or other policies and defines how the final exit is selected. Common types include manual selection, automatic health checks, failover, and load balancing.

After a rule matches a policy group, the actual connection still depends on the group’s current selection. If a website uses the wrong route, check both which group the rule points to and what that group currently selects.

DOMAIN-SUFFIX
DOMAIN RULE

DOMAIN-SUFFIX matches requests by domain suffix. For example, a suffix rule for a root domain will usually also cover its subdomains.

This rule type works well for routing by website or service domain, provided the core can obtain the domain associated with the connection. A domain rule may not match when only a destination IP is available.

IP-CIDR
ADDRESS RANGE

IP-CIDR matches an IPv4 range using CIDR notation; IPv6 generally uses the corresponding IP-CIDR6 rule. It is suitable for LAN addresses, fixed server ranges, or known service networks.

When a rule must resolve a domain before checking the destination IP, the DNS lookup process may add overhead. An overly broad network range can also include unrelated destinations in the same policy.

MATCH
FINAL FALLBACK

MATCH is the final fallback in a rule list, receiving connections that match none of the preceding rules. It is usually placed at the end and points to a proxy, direct connection, or selectable policy group.

If MATCH appears in the middle, later rules will never get a chance to match. To analyze an unknown destination, first inspect the fallback policy, then check whether a more precise rule is missing.

04 / RESOLUTION

Networking and DNS

DNS does more than convert domains into addresses. It also affects whether domain rules match, which destination server is selected, and whether queries follow the intended path.

DNS
DOMAIN NAME SYSTEM

DNS converts domain names into connectable IP addresses. Clash can use system DNS or configure resolvers, fallback resolvers, and different resolution strategies for different domains.

A webpage failing to load does not necessarily mean the proxy node is faulty. Resolution may have failed, the result may be stale, or the request may have taken an unexpected DNS path. Verify domain resolution and the destination connection separately.

Fake-IP
ENHANCED DNS MODE

Fake-IP mode first returns a reserved address to the application and stores a mapping between that address and the original domain inside the core. When the application connects to the address, the core can restore the domain and apply domain rules accurately.

This mode helps centralize DNS and connection interception, but some LAN devices, specialized applications, or real-address-dependent scenarios may need to be added to a filter list. Misconfiguration often appears as failed LAN service discovery or connectivity issues in specific applications.

Redir-Host
REAL-IP DNS MODE

Redir-Host mode generally returns the real DNS result to the application, then uses the domain and destination address together for routing during connection setup. Its main difference from Fake-IP is that the application receives the actual address.

This approach is more straightforward for scenarios that depend on real IPs, but domain retention and rule matching can be affected by the system, connection method, and sniffing settings. After switching modes, retest DNS caching and rule matches.

DNS Leak
DNS PATH MISMATCH

A DNS leak occurs when some domain queries do not follow the intended resolution path and are handled by the system network, a browser’s built-in resolver, or another DNS service. It usually indicates incomplete interception or an application using its own resolver.

Check the client’s DNS configuration, system proxy and TUN status, the browser’s secure DNS setting, and whether IPv4 and IPv6 are using different paths. Changing nodes alone usually cannot fix a resolution-path problem.

GeoIP
IP GEOLOCATION

GeoIP matches rules by the region associated with an IP address, commonly sending addresses from a particular region to a direct connection or specified policy. It relies on a local or remote database and does not perform a real-time physical-location lookup for every address.

Address ownership changes, and databases can contain errors. If regional routing behaves unexpectedly, check the database update time and use logs to confirm the actual destination IP.

Latency
LATENCY

Latency is the time from a probe sent by the client to the response being received, usually measured in milliseconds. A client’s result applies only to the tested address, test method, and network conditions at that time.

Low latency does not mean high download speed and cannot alone prove that a node is stable. Also check packet loss, handshake success rate, sustained connection performance, and real access to the target website.

05 / CONFIG

Subscriptions and Configuration

A subscription URL, a single-node link, and a complete YAML file are different configuration sources. Confirm the data type before importing to reduce format incompatibility and update failures.

Subscription
SUBSCRIPTION URL

A subscription updates nodes, policy groups, and rules through a remote URL. The client usually saves the URL and downloads the configuration again manually or on a schedule.

If a subscription update fails, check that the URL is complete, authentication requirements are met, the network can reach it, and the response uses a format supported by the client. Updating a subscription may overwrite the portions it manages in the current configuration.

Node
PROXY NODE

A node is a set of parameters used by the proxy core to connect to a remote server, usually including the protocol, server address, port, authentication details, and transport options. The node name is only a display label and says nothing about route quality.

A node can fail because its parameters are outdated, the server is unreachable, the protocol is incompatible, or the local network imposes restrictions. Use core logs to determine whether the failure occurred during resolution, connection, handshake, or authentication.

YAML
CONFIG FORMAT

YAML is a common text format for Clash configuration, using indentation to express object and list hierarchy. Spaces, colon placement, list markers, and quotation marks all affect parsing.

Use spaces rather than tabs when editing, and keep indentation consistent at each level. When the client reports a parsing failure, inspect the reported line and nearby lines for indentation errors, unclosed quotes, and misspelled fields.

Proxy Provider
PROXY-PROVIDERS

Proxy Provider loads a group of nodes from a separate file or remote URL for use by multiple policy groups. It separates node sources from the main configuration and reduces duplicate maintenance.

A Provider usually includes a source URL, update interval, cache path, and health-check settings. If loading fails, check the remote format, cache-directory permissions, and whether the policy groups reference the correct name.

06 / TRAFFIC CAPTURE

System Proxies and TUN

A system proxy relies on applications actively reading proxy settings, while TUN intercepts more traffic at the virtual network interface layer. They differ in scope, permission requirements, and troubleshooting methods.

System Proxy
SYSTEM PROXY

A system proxy points the operating system’s HTTP, HTTPS, or SOCKS proxy address to Clash’s local listening port. Browsers and most desktop applications that follow system settings send traffic through it.

Applications that ignore system proxy settings, some games, and certain command-line tools may not be intercepted. Restore the system proxy state before quitting the client to avoid leaving the system pointed at a stopped local port.

TUN Mode
VIRTUAL NETWORK INTERFACE

TUN mode uses a virtual network interface to intercept system traffic, then lets the core decide whether to connect directly or use a proxy. It suits applications that do not support system proxies, use non-HTTP traffic, or require broader interception.

Enabling it usually requires system permissions and may conflict with other VPNs, virtual adapters, security software, or routing settings. When troubleshooting lost connectivity, first confirm that the TUN device, routes, and DNS interception were created successfully.

Mixed Port
MIXED-PORT

Mixed Port is a local listening port that accepts both HTTP proxy and SOCKS5 connections. Applications can connect to the same port using whichever method they support, reducing the need to remember separate ports.

It is only a local entry point and does not determine which node ultimately carries the traffic. A port conflict, firewall restriction, or incorrect address in the application can all prevent a connection to the local proxy.

Routing Table
ROUTING TABLE

A routing table is the set of operating-system rules used to decide which network interface should carry a packet and which next hop it should use. TUN mode usually adds or adjusts routes so target traffic enters the virtual interface.

Incorrect routes can make the LAN unreachable, create forwarding loops, or interrupt all connections. When multiple VPN tools are running, check whether they are competing for the default route.

Bypass Addresses
BYPASS RANGE

Bypass addresses are destinations excluded from the proxy listener or TUN forwarding path, commonly including loopback addresses, LAN ranges, gateways, and required system services. Proper settings keep printers, router dashboards, and local shares accessible.

An overly broad bypass range lets traffic that should be routed leave directly; one that is too narrow can disrupt LAN communication. After changing it, test local devices, public websites, and the target application separately.