Clash — 跨平台智能网络代理工具 Clash — Cross-Platform Intelligent Proxy Tool
基于规则的流量分流,支持多协议、高性能,让网络访问更自由、更安全 Rule-based traffic routing with multi-protocol support and high performance — making network access freer and safer
为什么选择 Clash? Why Choose Clash?
五大核心能力,满足从新手到高级用户的所有需求 Five core capabilities to meet all needs from beginners to advanced users
多协议兼容Multi-Protocol
支持 Shadowsocks、VMess、Trojan、Snell、SOCKS5、HTTP(S)、Wireguard 等多种主流网络代理协议,灵活适应不同网络环境。Supports Shadowsocks, VMess, Trojan, Snell, SOCKS5, HTTP(S), Wireguard and more — flexibly adapting to various network environments.
智能分流Smart Routing
根据动态脚本、域名、IP地址、进程名称等规则自动选择最佳路径,实现国内直连和国外代理分流,提高速度和稳定性。Automatically selects the best path based on dynamic scripts, domain names, IP addresses, and process names — achieving split routing for improved speed and stability.
跨平台支持Cross-Platform
支持 Windows、macOS、Linux、Android、iOS、OpenWrt 等操作系统,确保跨平台兼容与配置同步。Supports Windows, macOS, Linux, Android, iOS, and OpenWrt — ensuring cross-platform compatibility and configuration sync.
安全与隐私Security & Privacy
开源生态便于审计,支持本地化保存配置和日志,优先使用加密传输(TLS等),保障用户隐私与数据安全。Open-source ecosystem enables auditing; configurations and logs are stored locally; prioritizes encrypted transmission (TLS) to safeguard privacy and data security.
高性能稳定运行High Performance
经过优化的 Go 语言编写,并发处理架构确保在复杂网络环境中保持高效、稳定的运行,并支持负载均衡和延迟测试。Written in optimized Go with a concurrent processing architecture — ensuring efficient and stable operation in complex network environments with load balancing and latency testing.
各平台推荐客户端 Recommended Clients by Platform
选择适合您设备的版本,Premium 版提供更强大的高级功能 Select the version for your device — Premium editions offer enhanced advanced features
Linux
Clash for Linux (CLI) / GUI for ClashClash for Linux (CLI) / GUI for Clash
—
查看替代方案View Alternative三步开始使用 Clash Get Started in Three Steps
从下载到启用代理,只需简单三步 From download to proxy activation — just three simple steps
下载安装Download & Install
选择对应系统版本下载并安装,优先使用可信来源,避免安全风险与捆绑软件。Select the version for your system and install it — always use trusted sources to avoid security risks and bundled software.
查看详情 →View Details →导入配置Import Config
通过订阅链接或本地 YAML 文件导入配置,按需启用规则集与策略组,实现精细化流量管理。Import configuration via subscription link or local YAML file, enable rule sets and proxy groups as needed for refined traffic management.
查看详情 →View Details →启用代理Enable Proxy
开启系统代理或服务模式,检查分流是否生效,根据网络环境切换模式与节点,访问测试网站确认代理生效。Enable system proxy or service mode, verify routing is working, switch modes and nodes as needed, and visit a test site to confirm the proxy is active.
查看详情 →View Details →深入探索高级功能 Explore Advanced Features
面向有一定技术基础的用户,了解 Clash 的强大能力 For users with technical background — discover Clash's powerful capabilities
Proxy Groups 策略组 — 智能策略管理Proxy Groups — Intelligent Strategy Management
支持自动化可用性测试(fallback)、负载均衡(load balance)、延迟测试(url-test)等多种策略组模式,确保始终选择最优节点,最大化网络性能与可靠性。Supports automated availability testing (fallback), load balancing, and latency testing (url-test) among multiple proxy group modes — ensuring the optimal node is always selected for maximum network performance and reliability.
Fake-IP DNS — 防污染域名解析Fake-IP DNS — Anti-Pollution Resolution
通过 Fake-IP 机制减少 DNS 污染影响,同时提升网络访问性能,避免因 DNS 泄露导致的访问异常,确保域名解析的准确性与速度。Reduces DNS pollution impact via the Fake-IP mechanism while improving network access performance — preventing access anomalies caused by DNS leaks and ensuring accurate, fast domain resolution.
远程 Providers — 动态配置加载Remote Providers — Dynamic Config Loading
支持远程代理列表的动态加载,无需手动更新配置文件即可获取最新节点信息,大幅简化维护流程,适合频繁变更节点的场景。Supports dynamic loading of remote proxy lists — obtain the latest node information without manually updating configuration files, greatly simplifying maintenance for frequently changing node scenarios.
RESTful API — 可编程控制接口RESTful API — Programmable Control Interface
通过全面的 RESTful API 实现配置的就地更新和自动化管理,支持第三方工具集成,方便开发者构建自定义工作流与监控面板。Achieve in-place configuration updates and automated management through a comprehensive RESTful API — supporting third-party tool integration for developers building custom workflows and monitoring dashboards.
您的数据安全是我们的首要任务 Your Data Security Is Our Priority
开源透明、数据本地化、安全最佳实践 Open-source transparency, data localization, and security best practices
开源生态Open Source Ecosystem
Clash 根据 GPL-3.0 开源许可证发布,代码公开可审计,社区更新活跃,任何人都可以审查代码确保无后门。Clash is released under the GPL-3.0 open-source license — code is publicly auditable with an active community, allowing anyone to review and ensure no backdoors exist.
数据本地化Data Localization
配置与日志尽量保存在本地设备;使用订阅时注意来源可信,避免泄露关键访问凭据,用户始终掌控自己的数据。Configurations and logs are stored locally on your device; ensure subscription sources are trustworthy to avoid leaking critical access credentials — you always control your data.
安全建议Security Recommendations
优先使用加密传输(TLS 等),定期更新客户端与规则集,并对节点服务进行风险评估,确保网络通信始终安全可靠。Prioritize encrypted transmission (TLS), regularly update clients and rule sets, and perform risk assessments on node services to ensure network communication remains secure and reliable.
常见问题解答 Frequently Asked Questions
快速找到您需要的答案,覆盖产品认知、安装使用、配置管理、故障排除、高级配置和版本选择六大类别 Quickly find answers across six categories: product overview, installation, configuration, troubleshooting, advanced setup, and version selection
FAQ 1 · 什么是 Clash?它和 VPN 有什么区别?What is Clash? How does it differ from a VPN?
解答(6步理解):Answer (6-step understanding):
- 定义理解:Clash 是一款基于规则的网络代理工具,运行在网络和应用层,通过 YAML 配置文件定义流量走向。Definition: Clash is a rule-based network proxy tool operating at the network and application layers, defining traffic routing through YAML configuration files.
- 核心差异:传统 VPN 创建全局加密隧道,所有流量都经由 VPN 服务器;Clash 则按域名、IP、应用等规则选择性代理。Key Difference: Traditional VPNs create a global encrypted tunnel routing all traffic through the VPN server; Clash selectively proxies traffic based on domain, IP, and application rules.
- 灵活性:Clash 允许国内网站直连、国外网站走代理,避免 VPN 全局代理带来的速度损失。Flexibility: Clash allows direct connection for domestic sites while proxying international ones, avoiding the speed penalty of VPN global routing.
- 协议支持:Clash 兼容 Shadowsocks、VMess、Trojan 等多种协议,而传统 VPN 通常仅支持单一协议。Protocol Support: Clash is compatible with Shadowsocks, VMess, Trojan, and more, whereas traditional VPNs typically support only a single protocol.
- 适用场景:适合需要精细化流量管理的用户,如开发者、跨境工作者、以及需要访问不同区域服务的用户。Use Cases: Ideal for users needing fine-grained traffic management — developers, cross-border workers, and those accessing region-specific services.
- 总结:VPN 是"全隧道",Clash 是"智能分流器"——更灵活、更高效、更可控。Summary: VPN is a "full tunnel"; Clash is a "smart splitter" — more flexible, efficient, and controllable.
FAQ 2 · 如何在不同平台安装和使用 Clash?How to install and use Clash on different platforms?
解答(6步操作指南):Answer (6-step guide):
- 选择平台:根据您的设备系统(Windows/macOS/Android/iOS/Linux/OpenWrt),从官网平台选择区确定推荐客户端。Select Platform: Based on your device (Windows/macOS/Android/iOS/Linux/OpenWrt), identify the recommended client from the platform selection area.
- 下载客户端:从官方 GitHub Releases 页面或可信来源下载对应安装包,注意核对文件校验值确保完整性。Download Client: Download the installation package from the official GitHub Releases page or trusted sources, verifying checksums for integrity.
- 完成安装:按照各平台标准流程安装——Windows 运行安装程序,macOS 拖入应用文件夹,Android 安装 APK。Complete Installation: Follow standard platform procedures — run the installer on Windows, drag to Applications on macOS, install the APK on Android.
- 获取订阅:从您的节点服务商处获取订阅链接,或准备本地 YAML 配置文件,确保配置内容正确无误。Obtain Subscription: Get a subscription link from your node provider or prepare a local YAML configuration file, ensuring content accuracy.
- 导入配置:在客户端中找到配置导入入口,粘贴订阅链接或选择本地文件,点击更新以加载节点和规则。Import Config: Find the config import option in the client, paste the subscription link or select a local file, and click update to load nodes and rules.
- 启用代理:开启系统代理开关,选择合适节点,访问测试网站(如 google.com)确认代理是否成功生效。Enable Proxy: Turn on the system proxy switch, select a suitable node, and visit a test site (e.g., google.com) to confirm the proxy is working.
FAQ 3 · 什么是订阅链接?如何正确使用?What is a subscription link and how to use it correctly?
解答(6步详解):Answer (6-step explanation):
- 概念说明:订阅链接是一种特殊的 URL 地址,指向一个包含节点列表和规则配置的远程文件,通常由节点服务商提供。Concept: A subscription link is a special URL pointing to a remote file containing node lists and rule configurations, typically provided by node service providers.
- 获取方式:登录您的节点服务商网站,在"订阅"或"客户端配置"页面复制专属订阅链接,注意该链接通常包含认证信息。How to Obtain: Log into your node provider's website, navigate to the "Subscription" or "Client Config" page, and copy your unique subscription link — it usually contains authentication information.
- 粘贴导入:打开 Clash 客户端,找到"配置"或"Profiles"选项,将订阅链接粘贴到 URL 输入框中并保存。Paste & Import: Open your Clash client, find the "Config" or "Profiles" option, paste the subscription link into the URL input field, and save it.
- 自动更新:客户端会定期从该链接拉取最新节点信息,无需手动重复导入,保持节点列表始终最新。Auto-Update: The client periodically fetches the latest node information from this link, eliminating the need for manual re-imports and keeping the node list current.
- 安全提醒:订阅链接包含您的服务权限,切勿公开分享;建议使用 HTTPS 链接以确保传输过程加密。Security Note: Subscription links contain your service credentials — never share them publicly; use HTTPS links to ensure encrypted transmission.
- 故障处理:若订阅更新失败,检查网络连接、链接有效性,或联系服务商确认订阅地址是否变更。Troubleshooting: If subscription update fails, check your network connection and link validity, or contact your provider to confirm whether the subscription address has changed.
FAQ 4 · 为什么我无法连接代理节点?如何排查?Why can't I connect to the proxy node? How to troubleshoot?
解答(6步排查流程):Answer (6-step troubleshooting):
- 检查节点状态:在客户端中查看节点延迟测试结果,若显示超时或失败,说明节点可能已失效或被封锁。Check Node Status: View latency test results in the client — if showing timeout or failure, the node may be invalid or blocked.
- 更新订阅:尝试手动更新订阅以获取最新节点列表,排除因节点信息过期导致的连接失败。Update Subscription: Try manually updating the subscription to get the latest node list, ruling out connection failures caused by outdated node information.
- 检查网络基础:确认设备已正常连接互联网,尝试访问国内网站验证基础网络是否畅通。Check Basic Network: Confirm your device has normal internet access by visiting a domestic website to verify basic connectivity.
- 切换代理模式:在系统代理、TUN 模式之间切换,某些网络环境可能限制特定代理方式。Switch Proxy Mode: Toggle between system proxy and TUN mode — certain network environments may restrict specific proxy methods.
- 检查防火墙/杀毒软件:部分安全软件可能拦截代理流量,尝试暂时关闭后重试连接。Check Firewall/Antivirus: Some security software may block proxy traffic — try temporarily disabling them and reconnecting.
- 查看日志:启用客户端的日志功能,查找具体错误信息,根据提示定位问题根源(如 DNS 解析失败、TLS 握手错误等)。Check Logs: Enable the client's logging feature to find specific error messages and pinpoint the root cause (e.g., DNS resolution failure, TLS handshake error).
FAQ 5 · 如何配置自定义规则实现精细化分流?How to configure custom rules for refined traffic routing?
解答(6步配置指南):Answer (6-step configuration guide):
- 了解规则语法:Clash 使用 YAML 格式定义规则,基本结构为规则类型、匹配条件和目标策略组,如 DOMAIN-SUFFIX,google.com,Proxy。Understand Rule Syntax: Clash uses YAML format for rules — basic structure includes rule type, match condition, and target policy group, e.g., DOMAIN-SUFFIX,google.com,Proxy.
- 规则类型选择:支持 DOMAIN(精确域名)、DOMAIN-SUFFIX(域名后缀)、DOMAIN-KEYWORD(关键词)、IP-CIDR(IP段)、PROCESS-NAME(进程名)等多种匹配方式。Choose Rule Type: Supports DOMAIN (exact), DOMAIN-SUFFIX, DOMAIN-KEYWORD, IP-CIDR, PROCESS-NAME, and more matching methods.
- 编辑配置文件:在客户端的配置编辑器中打开 YAML 文件,找到 rules 部分,按需添加或修改规则条目。Edit Config File: Open the YAML file in the client's config editor, locate the rules section, and add or modify rule entries as needed.
- 设置策略组:为不同规则指定不同的策略组(如 Proxy、Direct、Reject),实现精细化的流量分发控制。Set Policy Groups: Assign different policy groups (e.g., Proxy, Direct, Reject) to different rules for refined traffic distribution control.
- 测试验证:保存配置后,访问对应网站或服务,通过日志面板确认流量是否按预期规则进行分流。Test & Verify: After saving, visit corresponding sites or services and confirm through the log panel that traffic is being routed according to your rules.
- 持续优化:根据实际使用体验不断调整规则,可参考社区分享的规则集模板,逐步完善个性化分流策略。Continuous Optimization: Refine rules based on actual usage experience, reference community-shared rule set templates, and gradually perfect your personalized routing strategy.
FAQ 6 · Clash 开源版和 Premium 版有什么区别?如何选择?What's the difference between Clash Open-Source and Premium editions?
解答(6步对比分析):Answer (6-step comparison):
- 开源版定位:Clash 开源版提供核心代理功能,包括规则分流、多协议支持、基础策略组,适合一般代理需求用户。Open-Source Edition: Provides core proxy features including rule routing, multi-protocol support, and basic policy groups — suitable for general proxy needs.
- Premium 版增强:Premium 版额外提供 TUN 设备支持(可代理非 HTTP 流量)、Wireguard 协议支持、以及更强大的策略组模式。Premium Enhancements: Additionally offers TUN device support (proxying non-HTTP traffic), Wireguard protocol support, and more powerful policy group modes.
- TUN 模式价值:TUN 设备可捕获所有网络流量(包括 UDP),实现真正的全局代理,适合游戏、语音通话等场景。TUN Mode Value: TUN device captures all network traffic (including UDP), achieving true global proxy — ideal for gaming and voice calls.
- 策略组增强:Premium 版支持 fallback(故障转移)、load-balance(负载均衡)、url-test(延迟测试)等高级策略组模式。Enhanced Policy Groups: Premium supports fallback, load-balance, and url-test advanced policy group modes for smarter node selection.
- 选择建议:普通网页浏览和基础代理需求使用开源版即可;需要代理全部流量、使用 Wireguard 或需要高级策略组则选择 Premium 版。Selection Guide: Use the open-source edition for basic web browsing and proxy needs; choose Premium if you need full traffic proxying, Wireguard, or advanced policy groups.
- 获取方式:开源版可从 GitHub 直接下载;Premium 版由各平台客户端(如 CFW、CFA、ClashX Pro)集成提供,通常随 GUI 客户端一同分发。How to Get: The open-source edition is available directly on GitHub; Premium is integrated into platform clients (CFW, CFA, ClashX Pro) and distributed with GUI clients.