强大核心 · 无限可能
高性能代理核心
基于 Go 语言开发,极低资源占用,高效并发处理,吞吐量优异。
多协议支持
Shadowsocks / VMess / Trojan / Snell / SOCKS5 / HTTP 等主流协议。
灵活规则引擎
GEOIP, DOMAIN-SUFFIX, SRC-IP, PROCESS-NAME 精细化分流决策。
策略组与分流
手动/自动/延迟/负载均衡策略组,智能调度,网络体验最优。
RESTful API 控制
外部控制、状态查询,无缝集成第三方仪表板与自动化工具。
跨平台支持
Windows / macOS / Linux / iOS / Android 全覆盖,一处配置随处运行。
常见问题 — 六类核心解答
- 步骤1:访问官网下载区,根据操作系统选择对应安装包(Windows选.exe,macOS选.dmg,Linux获取二进制)。
- 步骤2:下载完成后,Windows运行安装程序;macOS拖入Applications;Linux解压后使用chmod +x赋予执行权限。
- 步骤3:首次启动会自动生成配置文件(config.yaml)于用户目录,通过编辑器或GUI添加代理节点。
- 步骤4:开启系统代理或启用TUN模式,即可让Clash接管设备流量,完成安装部署。
- 步骤1:编辑config.yaml,在rules字段添加规则,格式为“类型,参数,策略”,例:DOMAIN-SUFFIX,google.com,Proxy。
- 步骤2:利用GEOIP区分境内/境外:GEOIP,CN,DIRECT 使国内流量直连,其余走代理。
- 步骤3:结合SRC-IP-CIDR针对特定源IP,或PROCESS-NAME针对应用进行分流。
- 步骤4:规则按顺序匹配,建议精准域名置前,最后使用MATCH,Proxy作为兜底规则。
- 步骤1:在proxy-groups字段定义策略组,类型可选select(手动)、url-test(自动测速)、fallback(故障转移)。
- 步骤2:为策略组添加proxies列表,例如[🇭🇰 HK1, 🇯🇵 JP2, 🇺🇸 US3]实现多节点池。
- 步骤3:url-test配置interval和url参数自动选取最低延迟节点;load-balance负载均衡分发请求。
- 步骤4:在rules中将特定域名或流量指向该策略组,实现无感知最优节点切换。
- 步骤1:通过external-controller开启API,默认监听127.0.0.1:9090,可设置secret鉴权。
- 步骤2:使用GET /configs获取当前配置,PUT /configs重载配置;POST /proxies/:name切换节点。
- 步骤3:API可获取实时流量统计、活动连接,搭配Yacd等面板可视化展示。
- 步骤4:集成到自动化脚本实现动态规则调整,故障自愈及高级运维场景。
- 步骤1:基于Go协程模型,每个连接仅消耗少量内存,并发处理能力远超传统实现。
- 步骤2:启用规则缓存(rule-cache)减少重复匹配开销,提高包转发效率。
- 步骤3:配置接口完全内存操作,无磁盘I/O瓶颈;支持eBPF透明代理降低CPU负载。
- 步骤4:实测万条规则内存占用低于80MB,延时稳定在10ms以内,资源占用极低。
- 步骤1:原生支持Shadowsocks(AEAD)、VMess、Trojan、Snell、SOCKS5/HTTP等主流协议。
- 步骤2:通过outbound插件机制可自定义协议扩展,社区已实现WireGuard出站实验特性。
- 步骤3:开发者只需实现proxy接口,编译自定义版本即可无缝集成新协议。
- 步骤4:未来版本将持续增加轻量协议支持,保持向下兼容与丰富生态。
Clash 采用 MIT 开源协议,欢迎参与代码贡献与社区建设。
Clash — Rule-based Proxy Client
High Performance · Cross-platform · Full Protocol Support
Powerful Core · Infinite Possibilities
High-Performance Core
Built with Go, low resource footprint, high concurrency, excellent throughput.
Multi-Protocol
Shadowsocks / VMess / Trojan / Snell / SOCKS5 / HTTP.
Flexible Rule Engine
GEOIP, DOMAIN-SUFFIX, SRC-IP, PROCESS-NAME granular routing.
Policy Groups & Routing
Select, URL-Test, Fallback, Load-Balance for smart traffic steering.
RESTful API Control
External control, real-time status, seamless dashboard integration.
Cross-Platform
Windows / macOS / Linux / iOS / Android, one config everywhere.
FAQ — Six Core Questions
- Step 1: Visit download section, choose package (Windows .exe, macOS .dmg, Linux binary).
- Step 2: Run installer or extract; macOS drag to Applications; Linux set executable permission.
- Step 3: After first launch, config.yaml is generated. Edit proxies and rules.
- Step 4: Enable system proxy or TUN mode to start routing traffic.
- Step 1: Edit config.yaml, add rules like DOMAIN-SUFFIX,google.com,Proxy.
- Step 2: Use GEOIP for domestic/foreign split: GEOIP,CN,DIRECT keeps local traffic direct.
- Step 3: Combine SRC-IP-CIDR or PROCESS-NAME for specific sources/apps.
- Step 4: Rules are matched in order; end with MATCH,Proxy as default.
- Step 1: Define proxy-groups with types: select, url-test, fallback, load-balance.
- Step 2: Add proxies list inside group: e.g., [HK1, JP2, US3].
- Step 3: url-test auto picks lowest latency; load-balance distributes requests.
- Step 4: Point specific rules to the policy group for automatic optimization.
- Step 1: Enable external-controller (default :9090) with optional secret.
- Step 2: GET /configs to view, PUT /configs to reload; POST /proxies/:name to switch node.
- Step 3: Get traffic stats & connections; integrate with dashboards like Yacd.
- Step 4: Automate dynamic rule switching and fault recovery via API scripts.
- Step 1: Go's goroutine model uses minimal memory per connection, high concurrency.
- Step 2: Enable rule-cache to reduce duplicate matching overhead.
- Step 3: In-memory operations & eBPF support reduce CPU load.
- Step 4: Large rule sets under 80MB memory, sub-10ms latency.
- Step 1: Native support: Shadowsocks(AEAD), VMess, Trojan, Snell, SOCKS5/HTTP.
- Step 2: Outbound plugin mechanism allows custom protocols (experimental WireGuard).
- Step 3: Implement the proxy interface and compile a custom build.
- Step 4: Future updates will add more lightweight protocols while keeping backward compatibility.
Clash is MIT licensed, contributions and community involvement are welcome.