Configuration reference · Field definitions · Runtime behavior

Clash Configuration Docs Reference and Advanced Topics

Browse Clash and Mihomo configuration references covering subscription imports, proxy modes, routing rules, DNS, TUN, services, and security. Examples and concept guides make it easier to find the right setup or troubleshooting path.

Introduction

4 documents

Configuration

7 documents

Proxy Protocols

14 documents
Proxy Protocols

HTTP / HTTPS Outbound Proxy

Configure HTTP outbound proxies in the Clash ecosystem using current Mihomo fields, including CONNECT tunnels, proxy authentication, HTTPS upstreams, and certificate verification.

Read Document
Proxy Protocols

SOCKS5 Outbound Proxy

Configure SOCKS5 outbound proxies in the Clash ecosystem using current Mihomo fields, including TCP CONNECT, UDP Associate, authentication, and TLS wrapping.

Read Document
Proxy Protocols

Shadowsocks (SS)

Configure Shadowsocks outbound proxies in the Clash ecosystem using current Mihomo fields, including ciphers, UDP over TCP, and plugin transports.

Read Document
Proxy Protocols

ShadowsocksR (SSR)

Configure ShadowsocksR outbound proxies in the Clash ecosystem using current Mihomo fields, including stream ciphers, Protocol, Obfs, and compatibility limits for legacy nodes.

Read Document
Proxy Protocols

VMess

Configure VMess outbound proxies in the Clash ecosystem using current Mihomo fields, and verify the user ID, protocol version, encryption, UDP, transport, and TLS parameters.

Read Document
Proxy Protocols

VLESS

Configure VLESS outbound proxies in the Clash ecosystem using current Mihomo fields, with clear distinctions between UUID, Vision, VLESS Encryption, Reality, UDP, and transport settings.

Read Document
Proxy Protocols

Trojan

Configure Trojan outbound proxies in the Clash ecosystem using current Mihomo fields, and verify passwords, mandatory TLS, SNI, certificates, Reality, UDP, and transport settings.

Read Document
Proxy Protocols

Snell

Configure Snell outbound proxies in the Clash ecosystem using current Mihomo fields. Verify psk, version, udp, obfs-opts, and smux, then use the minimal YAML and authentication checks to diagnose compatibility issues.

Read Document
Proxy Protocols

AnyTLS

Configure AnyTLS in Clash with current Mihomo fields: password, sni, client fingerprint, idle-session, and TLS checks, plus minimal YAML and handshake troubleshooting.

Read Document
Proxy Protocols

Hysteria

Configure Hysteria 1.x outbound proxies in the Clash ecosystem using current Mihomo fields, including authentication, transport modes, bandwidth, port hopping, and QUIC parameters.

Read Document
Proxy Protocols

Hysteria2

Configure Hysteria2 outbound proxies in the Clash ecosystem using current Mihomo fields, including authentication, port hopping, obfuscation, congestion control, and Realm parameters.

Read Document
Proxy Protocols

TUIC

Configure TUIC outbound proxies in the Clash ecosystem using current Mihomo fields. Distinguish v4 from v5 authentication and verify TLS, QUIC, UDP relay, and connection parameters.

Read Document
Proxy Protocols

WireGuard

Configure WireGuard outbound proxies in the Clash ecosystem using current Mihomo fields, including the local interface, Peer, Allowed IPs, MTU, and remote DNS.

Read Document
Proxy Protocols

Transport Configuration

Use current Mihomo fields to connect Clash VMess, VLESS, and Trojan entries with the correct network, matching opts, TLS settings, and protocol boundaries.

Read Document

Premium

9 documents
Premium

Introduction to Premium

Compare Clash Premium with the open-source core and review TUN, eBPF, Rule Providers, Script, userspace WireGuard, the profiling engine, and how these features were distributed.

Read Document
Premium

Feature: TUN Device

Learn how Clash Premium TUN captures TCP, UDP, and ICMP, and verify auto-route, auto-redir, system/gvisor, DNS hijacking, and operating-system limitations.

Read Document
Premium

Feature: eBPF Redirect to TUN

Configure eBPF redirect-to-tun on Linux, check kernel dependencies and known limits, and understand conflicts with tun.auto-route and Tailscaled plus the available fallback.

Read Document
Premium

Feature: Rule Providers

Load rule-providers locally or remotely, verify behavior, url, interval, path, and RULE-SET, and distinguish domain, ipcidr, and classical formats.

Read Document
Premium

Feature: Script

Use Python3 main(ctx, metadata) in Script mode to control rule matching, including resolve_ip, geoip, rule_providers, and IP-resolution requirements.

Read Document
Premium

Feature: Script Shortcuts

Define Script Shortcuts in Clash Premium Rule mode, compare Expr with Starlark, and review common variables, functions, and no-resolve usage.

Read Document
Premium

Feature: Userspace WireGuard

Build a Clash Premium userspace WireGuard node using private-key, public-key, preshared-key, remote DNS, MTU, UDP, and address fields.

Read Document
Premium

Feature: Profiling Engine

Use the Clash Premium profiling engine's tracing switch and output when regular logs cannot explain a runtime bottleneck, and verify where performance sampling is enabled.

Read Document
Premium

Experimental Features

Understand where and how to enable and verify experimental Clash features. Because support may change by core version, confirm compatibility in a reversible environment before deployment.

Read Document

Runtime

1 documents

Advanced Usage

3 documents