Clash — 规则化代理工具 Clash — Rule-Based Proxy Tool
跨平台规则化代理工具,让网络流量尽在掌控。支持多协议兼容、智能规则分流、透明代理, 覆盖 Windows、macOS、Linux、Android、iOS 等全平台。
A cross-platform rule-based proxy tool that puts network traffic under your control. Multi-protocol support, intelligent rule routing, transparent proxy, available on all major platforms.
选择您的平台
Choose Your Platform
为您的设备选择推荐的 Clash 客户端,所有下载均来自官方渠道
Select the recommended Clash client for your device. All downloads from official sources.
核心特性
Core Features
Clash 提供八大核心能力,满足从新手到极客的全部需求
Eight core capabilities to meet all needs from beginners to power users.
三步快速上手
Get Started in 3 Steps
从下载到使用,只需三步即可开启您的 Clash 之旅
From download to usage — just three steps to start your Clash journey.
客户端对比
Client Comparison
帮助您理解不同 Clash 客户端之间的差异,做出明智选择
Understand the differences between Clash clients and make an informed choice.
| 客户端Client | 平台Platform | 维护状态Status | 内核版本Kernel | 推荐场景Best For |
|---|---|---|---|---|
| Clash Verge Rev | Windows / macOS / Linux | 活跃维护Active | Clash Meta | 🌟 首选推荐,界面现代🌟 Top recommendation |
| ClashX / ClashX Pro | macOS | 活跃维护Active | Clash Premium | macOS 原生体验Native macOS experience |
| Clash Meta for Android | Android | 活跃维护Active | Clash Meta | 🌟 Android 首选🌟 Best for Android |
| Stash | iOS | 活跃维护Active | Clash Premium | iOS 首选 Clash 客户端Top iOS Clash client |
| Clash for Windows | Windows | 已停更Discontinued | Clash Premium | 经典版,不再推荐Legacy, not recommended |
| OpenClash | OpenWrt | 活跃维护Active | Clash / Meta | 路由器部署首选Best for routers |
工作原理
How It Works
了解 Clash 的流量处理流程与核心工作模式
Understand Clash's traffic flow and core operating modes.
常见问题
Frequently Asked Questions
6 大类常见问题,分步骤为您详细解答
6 categories of common questions with step-by-step answers.
❶ Clash 是什么?与传统 VPN 有什么区别? ❶ What is Clash? How does it differ from traditional VPNs? ▾
- 了解 Clash 的本质:Clash 是一个基于规则的代理工具,运行在网络和应用层。与 VPN 不同,它不是创建全局加密隧道,而是根据您预设的规则对流量进行精细化路由控制。每个网络请求都会经过规则引擎匹配,然后决定走代理还是直连。
- 理解传统 VPN 的工作方式:传统 VPN 会在系统层面创建一个虚拟网络接口,将所有流量无差别地通过加密隧道发送到 VPN 服务器。这种方式虽然简单,但缺乏灵活性——您无法对特定网站或应用单独指定不同的网络路径。
- 对比核心差异:Clash 的最大优势在于"按规则分流"——您可以为不同域名、IP 地址段甚至特定应用程序分别指定不同的代理策略,而 VPN 只能全有或全无。这意味着您可以同时访问国内直连网站和国外代理内容,互不干扰。
- 明确适用场景:Clash 更适合需要精细化流量控制的用户,比如开发者、跨境工作者以及对网络有高度自定义需求的人群。而传统 VPN 更适合只需要简单全局加密隧道的场景。两者可以互补使用,并非完全替代关系。
- Understand Clash: Clash is a rule-based proxy tool operating at the network and application layers. Unlike VPNs, it doesn't create a global encrypted tunnel; instead, it routes traffic based on your preset rules with fine-grained control.
- How traditional VPNs work: Traditional VPNs create a virtual network interface and indiscriminately route all traffic through an encrypted tunnel to the VPN server — simple but lacking flexibility.
- Key difference: Clash's "rule-based routing" allows you to set different proxy strategies for different domains, IP ranges, or even specific apps. VPNs are all-or-nothing by comparison.
- Use cases: Clash is ideal for users needing granular traffic control — developers, cross-border workers, and power users. Traditional VPNs suit simpler global-tunnel needs. Both can complement each other.
❷ 如何选择合适的 Clash 客户端? ❷ How to choose the right Clash client? ▾
- 确定操作系统平台:首先明确您使用的设备系统——Windows、macOS、Linux、Android、iOS 还是 OpenWrt 路由器。不同平台有各自适配最佳的客户端,选择对应平台的版本是第一步。
- 查看维护状态:优先选择仍在活跃维护的客户端(如 Clash Verge Rev、Clash Meta for Android),避免使用已停更的版本(如 Clash for Windows 原版)。活跃维护的客户端通常支持更新的协议和更及时的安全修复。
- 对比内核版本:不同客户端使用不同的 Clash 内核(Clash Premium、Clash Meta 等)。Clash Meta 内核功能更丰富,支持更多新协议;Clash Premium 则更稳定成熟。根据您的协议需求选择对应内核的客户端。
- 评估功能特性:查看客户端是否支持您需要的功能——TUN 模式、订阅管理、规则集自动更新、流量统计等。例如 Clash Verge Rev 界面现代、功能全面,ClashX 则提供原生 macOS 体验。
- 从官方渠道下载:确定客户端后,务必从 GitHub 官方仓库或官方网站下载,核对 SHA256 校验码,避免下载到被篡改的版本。切勿使用来源不明的第三方下载站。
- Identify your OS: Determine your device's operating system — each platform has optimized clients. This is your first decision point.
- Check maintenance status: Prioritize actively maintained clients (e.g., Clash Verge Rev) over discontinued ones. Active clients support newer protocols and security patches.
- Compare kernel versions: Different clients use different kernels (Clash Premium vs. Clash Meta). Meta offers more features and protocols; Premium is more stable and mature.
- Evaluate features: Check for TUN mode, subscription management, auto-updating rule sets, traffic stats, etc. Choose based on your specific needs.
- Download from official sources only: Always use GitHub official releases or the official website. Verify SHA256 checksums and avoid third-party download sites.
❸ 订阅链接是什么?如何正确使用? ❸ What is a subscription link and how to use it? ▾
- 理解订阅链接的概念:订阅链接是一个远程 URL 地址,指向一份包含代理节点列表和规则配置的文件。通过订阅链接,您可以自动获取最新的节点信息和配置更新,无需手动编辑 YAML 文件。这是 Clash 生态中最便捷的配置管理方式。
- 获取可靠的订阅链接:订阅链接通常由代理服务提供商提供,也可能来自自建的配置托管服务。请确保链接来源可信,使用 HTTPS 协议传输,避免中间人攻击导致配置被篡改。
- 在客户端中导入订阅:打开 Clash 客户端,找到"配置"或"Profiles"页面,点击"添加订阅"或"从 URL 导入",将订阅链接粘贴到输入框中。客户端会自动下载并解析配置内容。
- 配置自动更新策略:大多数客户端支持设置订阅的自动更新间隔(如每 24 小时更新一次)。建议开启自动更新,确保节点列表和规则集始终保持最新状态,避免因节点失效导致连接中断。
- 验证节点可用性:导入订阅后,使用客户端的延迟测试功能检查各节点的连通性和延迟。根据测试结果选择合适的节点,并设置故障转移策略组以提升稳定性。
- What is a subscription link: A remote URL pointing to a file containing proxy node lists and rule configurations. It enables automatic updates without manual YAML editing — the most convenient config method in the Clash ecosystem.
- Get a reliable link: Subscription links are typically provided by proxy service providers. Ensure the source is trusted and uses HTTPS to prevent tampering via MITM attacks.
- Import into your client: Open your Clash client, navigate to "Config" or "Profiles", click "Add Subscription" or "Import from URL", and paste the link. The client will download and parse the configuration automatically.
- Set auto-update: Most clients support auto-update intervals (e.g., every 24 hours). Enable this to keep node lists and rule sets current, avoiding disruptions from expired nodes.
- Verify node availability: After importing, use the latency test feature to check connectivity. Select optimal nodes and configure fallback groups for improved stability.
❹ Clash 是否免费?如何保证使用安全? ❹ Is Clash free? How to ensure safe usage? ▾
- 了解 Clash 的免费性质:Clash 核心及其主流客户端均为开源软件,基于 GPL-3.0 许可证发布,完全免费使用。您无需为 Clash 软件本身支付任何费用。但请注意,代理节点服务通常由第三方提供商运营,可能需要单独付费。
- 从官方渠道获取软件:务必从 GitHub 官方仓库或官方网站下载 Clash 客户端。核对下载页面的 SHA256 校验码,确保文件未被篡改。第三方下载站可能捆绑恶意软件或植入后门,存在严重安全风险。
- 验证下载文件完整性:下载完成后,使用系统自带的工具(如 Windows 的 certutil、macOS/Linux 的 shasum)计算文件哈希值,与官方公布的校验码进行比对。任何不匹配都意味着文件可能已被修改,请勿使用。
- 安全配置建议:避免在公开网络环境下明文传输配置文件;使用 HTTPS 订阅链接;定期更新客户端版本以获取安全补丁;不要随意导入来源不明的配置或规则集;启用客户端的日志脱敏功能以保护隐私。
- Clash is free: Clash core and mainstream clients are open-source under GPL-3.0 and completely free. However, proxy node services from third-party providers may require separate payment.
- Download from official sources: Always use GitHub official releases or the official website. Verify SHA256 checksums. Third-party download sites may bundle malware — a serious security risk.
- Verify file integrity: After downloading, compute the file hash using built-in tools (certutil on Windows, shasum on macOS/Linux) and compare it with the official checksum. Any mismatch indicates tampering — do not use the file.
- Security best practices: Avoid transmitting configs in plaintext over public networks; use HTTPS subscription links; update clients regularly for security patches; never import untrusted configs or rule sets; enable log sanitization for privacy.
❺ iOS 上有 Clash 吗?如何使用? ❺ Is Clash available on iOS? How to use it? ▾
- 了解 iOS 平台的限制:由于 Apple 的审核政策,iOS 平台上没有名为"Clash"的官方应用。但有多款基于 Clash 内核的第三方客户端可供选择,它们在功能上与 Clash 高度兼容,支持相同的配置格式和代理协议。
- 选择 Stash 或 Shadowrocket:Stash 是 iOS 上功能最强的 Clash 兼容客户端,支持 Clash Premium 内核和完整的规则配置;Shadowrocket 则是更轻量的替代方案,用户基数庞大,稳定性经过充分验证。两者均可在 App Store 购买下载。
- 从 App Store 购买并安装:打开 App Store,搜索"Stash"或"Shadowrocket",完成购买后自动安装到您的 iPhone 或 iPad。注意甄别正版应用,避免下载到仿冒品。购买是一次性费用,后续更新免费。
- 导入配置或订阅:安装完成后,您可以通过多种方式导入配置——直接粘贴订阅链接、扫描二维码、从文件应用导入 YAML 配置、或通过 iCloud 同步。Stash 对 Clash 配置的兼容性更好,支持更多高级特性。
- 启用代理并验证:在 iOS 设置中允许应用添加 VPN 配置,然后回到客户端开启代理开关。首次使用时会弹出权限确认对话框,点击"允许"即可。开启后访问测试网站验证代理是否生效。
- iOS limitations: Due to Apple's review policies, there's no app named "Clash" on iOS. However, several Clash-kernel-based third-party clients offer high compatibility with the same config formats and protocols.
- Choose Stash or Shadowrocket: Stash is the most feature-rich Clash-compatible iOS client with full rule config support. Shadowrocket is a lighter alternative with a large user base and proven stability. Both are on the App Store.
- Purchase and install: Search "Stash" or "Shadowrocket" on the App Store, complete the one-time purchase, and install. Verify you're downloading the genuine app — beware of imitations.
- Import config or subscription: After installation, import config via subscription link, QR code scan, YAML file from the Files app, or iCloud sync. Stash offers better Clash config compatibility with more advanced features.
- Enable and verify: Allow the app to add a VPN configuration in iOS Settings, then toggle the proxy switch in the app. Confirm the permission dialog when prompted. Visit a test site to verify the proxy is active.
❻ 如何排查 Clash 连接问题? ❻ How to troubleshoot Clash connection issues? ▾
- 检查基本网络连接:首先确认设备已正常连接到互联网。关闭 Clash 后尝试访问常用网站,排除设备本身网络故障的可能性。如果基础网络不通,Clash 也无法正常工作——这是最常被忽略的排查步骤。
- 验证配置文件语法:YAML 配置对缩进和格式非常敏感。使用在线 YAML 验证工具检查配置文件是否有语法错误。常见的错误包括缩进不一致、冒号后缺少空格、重复的键名等。即使是一个空格的问题也可能导致配置解析失败。
- 查看客户端日志:打开 Clash 客户端的日志面板,观察实时输出。日志中会明确标注错误类型——DNS 解析失败、TLS 握手超时、认证被拒等。根据日志中的具体错误信息,可以快速定位问题根源并进行针对性修复。
- 测试节点连通性:使用客户端内置的延迟测试功能逐一检测各代理节点是否可达。如果所有节点均超时,可能是订阅链接失效或网络环境发生变化。尝试手动添加一个已知可用的测试节点来排除配置问题。
- 检查规则匹配情况:确认目标域名是否被正确的规则匹配到预期的代理组。可以在日志中搜索目标域名,查看实际匹配的规则和路由路径。如果规则匹配结果与预期不符,需要调整规则顺序或修正规则表达式。
- 尝试切换工作模式:如果规则模式出现问题,可临时切换到全局模式测试代理节点本身是否正常工作。若全局模式正常但规则模式异常,则问题出在规则配置上;若全局模式也失败,则问题在节点或网络层面,需进一步排查。
- Check basic connectivity: Ensure your device is connected to the internet. Disable Clash and try accessing common websites to rule out device-level network issues. This is the most overlooked troubleshooting step.
- Validate YAML syntax: YAML configs are sensitive to indentation and formatting. Use an online YAML validator to check for syntax errors — inconsistent indentation, missing spaces after colons, or duplicate keys are common culprits.
- Check client logs: Open the Clash client's log panel and observe real-time output. Logs clearly indicate error types — DNS failures, TLS timeouts, authentication rejections, etc. Use these specific messages to pinpoint the root cause.
- Test node connectivity: Use the built-in latency test to check each proxy node. If all nodes time out, the subscription may be expired or the network environment has changed. Try adding a known-good test node manually.
- Verify rule matching: Confirm that target domains are matched to the expected proxy groups. Search logs for the domain and check the actual rule and routing path. Adjust rule order or fix regex patterns if results don't match expectations.
- Switch operating modes: Temporarily switch to Global mode to test if the proxy node works. If Global works but Rule mode doesn't, the issue is in your rules. If both fail, the problem is at the node or network level requiring further investigation.