🔓 开源 · GPL-3.0
🔓 Open Source · GPL-3.0
Clash — 跨平台规则代理,让流量控制更自由
Clash — Cross-Platform Rule-Based Proxy for Smarter Traffic Control
支持多协议、智能分流、跨平台兼容的开源网络代理工具,以规则驱动流量路由,告别传统全局 VPN 的笨重模式。
An open-source network proxy tool supporting multi-protocol, intelligent traffic splitting, and cross-platform compatibility — rule-driven routing that replaces bulky traditional VPNs.
核心特性
Core Features
六大核心能力,精准掌控每一缕流量
Six Core Capabilities for Precise Traffic Management
Clash 以规则引擎为核心,提供远超传统代理工具的网络流量精细化控制能力。
Clash is built around a powerful rule engine, offering granular traffic control far beyond traditional proxy tools.
🔌
多协议兼容
Multi-Protocol Support
全面支持 Shadowsocks(R)、VMess、Trojan、Snell、SOCKS5、HTTP(S)、WireGuard 等主流代理协议,一站式覆盖各类网络环境。
Full support for Shadowsocks(R), VMess, Trojan, Snell, SOCKS5, HTTP(S), WireGuard and more — covering diverse network environments in one tool.
🧠
智能分流
Intelligent Traffic Splitting
基于规则自动选择最佳路径,支持国内直连、国外代理分流,兼顾访问速度与网络稳定性,让代理无缝融入日常使用。
Automatically selects optimal routes based on rules — direct connection for local traffic, proxy for international — balancing speed and stability seamlessly.
💻
跨平台支持
Cross-Platform
覆盖 Windows、macOS、Linux、Android、iOS、OpenWrt 等主流操作系统,一处配置,多端通用。
Covers Windows, macOS, Linux, Android, iOS, and OpenWrt — one configuration works across all major platforms.
⚙️
策略组管理
Strategy Group Management
支持 fallback(可用性测试)、load-balance(负载均衡)、url-test(延迟测试)等自动化策略,智能切换最优节点。
Supports fallback, load-balance, and url-test auto strategies — intelligently switching to the best available node without manual intervention.
🌐
透明代理
Transparent Proxy
使用自动路由表管理 Redirect TCP 和 TProxy TCP/UDP(Premium 功能),实现网关级透明代理,无需逐台设备配置。
Uses automatic routing tables to manage Redirect TCP and TProxy TCP/UDP (Premium feature), enabling gateway-level transparent proxying without per-device setup.
🛡️
Fake-IP DNS
Fake-IP DNS
通过 Fake-IP 机制有效减少 DNS 污染影响,提升网络性能与解析准确度,优化整体代理体验。
Effectively mitigates DNS pollution through the Fake-IP mechanism, improving network performance and resolution accuracy for a smoother proxy experience.
快速上手
Quick Start
三步开始,轻松掌控网络流量
Three Steps to Take Control of Your Network Traffic
无需复杂配置,跟随以下步骤即可完成首次设置,开启智能代理体验。
No complex setup required — follow these steps to complete your first configuration and start enjoying intelligent proxying.
1
下载安装
Download & Install
选择对应系统版本下载并安装客户端,优先使用可信来源(如 GitHub 官方仓库或应用商店),确保软件完整性。
Choose the version for your OS and install from trusted sources (e.g., official GitHub repositories or app stores) to ensure software integrity.
📥 选择平台 →
📥 Select Platform →
2
导入配置
Import Configuration
通过订阅链接或本地 YAML 文件导入配置,按需启用规则集与策略组,客户端将自动解析并加载节点信息。
Import configuration via a subscription link or local YAML file, then enable rule sets and strategy groups as needed — the client auto-parses and loads node info.
📖 配置指南 →
📖 Config Guide →
3
启用代理
Enable Proxy
开启系统代理或服务模式,检查分流是否生效,根据网络环境灵活切换模式与节点,访问测试网站确认代理正常工作。
Enable system proxy or service mode, verify traffic splitting is working, and switch modes/nodes based on your network environment — test with a check site to confirm.
🔍 验证方法 →
🔍 Verification →
隐私与安全
Privacy & Security
开源透明,你的数据你做主
Open Source & Transparent — Your Data, Your Rules
Clash 始终坚持开源理念,代码可审计,数据本地化,让每一位用户都能安心使用。
Clash remains committed to open-source principles — auditable code and localized data ensure peace of mind for every user.
🔓
开源生态
Open Source Ecosystem
Clash 核心基于 GPL-3.0 开源许可证发布,建议优先选择公开可审计、更新活跃的实现与发布渠道,确保代码透明。
Clash core is released under the GPL-3.0 license. We recommend prioritizing publicly auditable, actively maintained implementations and distribution channels.
💾
数据本地化
Data Localization
配置与日志尽量保存在本地设备;使用订阅时注意来源可信度,避免通过不可信渠道泄露关键访问凭据与个人信息。
Configurations and logs are stored locally on your device. When using subscriptions, verify source trustworthiness to avoid leaking credentials and personal data.
🛡️
安全建议
Security Recommendations
优先使用加密传输协议(如 TLS)、定期更新客户端与规则集,并对节点服务进行风险评估,确保端到端通信安全。
Always use encrypted transport protocols (e.g., TLS), regularly update clients and rule sets, and perform risk assessments on node services for end-to-end security.
FAQ
常见问题解答
Frequently Asked Questions
以下是我们最常收到的问题,希望能帮助您快速了解 Clash。
Here are the most common questions we receive — we hope they help you quickly understand Clash.
Clash 是什么?它和 VPN 有什么区别?
What is Clash? How does it differ from a VPN?
Clash 是一款基于规则的网络代理工具,与传统 VPN 有本质区别。以下是详细对比:
- 工作原理不同:Clash 按规则匹配流量,对不同域名、IP、应用分别指定策略组或节点,实现精细化控制;传统 VPN 则创建全局加密隧道,将所有流量无差别地路由到远程服务器。
- 分流能力:Clash 支持国内直连、国外代理分流,可同时访问本地网络和代理网络,互不干扰;VPN 通常是全隧道模式,开启后所有流量都经过 VPN 服务器。
- 灵活度:Clash 的规则引擎允许用户自定义数千条规则,基于域名后缀、IP 段、应用进程名等条件匹配;VPN 缺乏这种细粒度控制能力。
- 性能优化:Clash 的智能分流可减少不必要的代理开销,直连流量不受影响;VPN 全局隧道可能拖慢本地网络访问速度。
- 多协议兼容:Clash 原生支持多种代理协议并可混合使用;大多数 VPN 仅支持单一协议。
- 适用场景:Clash 更适合需要精细化流量管理的用户;VPN 更适合需要全面加密所有流量的场景。两者可在特定场景下互补使用。
Clash is a rule-based network proxy tool fundamentally different from traditional VPNs. Here's a detailed comparison:
- Working Principle: Clash matches traffic by rules, assigning different strategy groups or nodes to specific domains, IPs, and applications for granular control; traditional VPNs create a global encrypted tunnel routing all traffic indiscriminately.
- Traffic Splitting: Clash supports direct connection for local traffic and proxy for international traffic simultaneously; VPNs typically route everything through the remote server in full-tunnel mode.
- Flexibility: Clash's rule engine allows thousands of custom rules matching by domain suffix, IP ranges, and process names; VPNs lack this fine-grained control.
- Performance: Clash's intelligent splitting reduces unnecessary proxy overhead; VPN global tunneling may slow down local network access.
- Multi-Protocol: Clash natively supports multiple proxy protocols that can be mixed; most VPNs only support a single protocol.
- Use Cases: Clash suits users needing refined traffic management; VPNs are better for scenarios requiring full-traffic encryption. They can complement each other in specific situations.
如何开始使用 Clash?
How do I start using Clash?
开始使用 Clash 只需几个简单步骤:
- 选择合适的客户端:根据您的操作系统(Windows、macOS、Linux、Android、iOS 或 OpenWrt)选择社区推荐的客户端版本,优先从 GitHub 官方仓库或可信应用商店下载。
- 安装客户端:下载完成后按照常规方式安装,Windows 用户运行安装程序,macOS 用户拖入应用文件夹,移动端用户通过应用商店安装。
- 准备配置文件:获取一份 YAML 格式的 Clash 配置文件,或从您的节点服务商获取订阅链接。配置文件包含代理节点、规则集和策略组定义。
- 导入配置:在客户端中找到配置导入入口,粘贴订阅链接或导入本地 YAML 文件,客户端会自动解析并加载所有节点和规则。
- 选择策略与节点:根据您的需求选择合适的策略组和节点,例如选择"自动选择"让客户端自动测试并切换最优节点。
- 开启系统代理:点击"开启系统代理"或"设置为系统代理",然后访问一个测试网站(如 IP 检测页面)确认代理是否生效,分流规则是否按预期工作。
Getting started with Clash takes just a few simple steps:
- Choose the Right Client: Select a community-recommended client for your OS (Windows, macOS, Linux, Android, iOS, or OpenWrt), prioritizing downloads from official GitHub repositories or trusted app stores.
- Install the Client: Install as usual — run the installer on Windows, drag to the Applications folder on macOS, or install via the app store on mobile devices.
- Prepare Configuration: Obtain a YAML-format Clash configuration file or a subscription link from your node service provider. The config contains proxy nodes, rule sets, and strategy group definitions.
- Import Configuration: Find the import option in your client, paste the subscription link or import the local YAML file — the client auto-parses and loads all nodes and rules.
- Select Strategy & Node: Choose an appropriate strategy group and node based on your needs; for example, select "Auto Select" to let the client test and switch to the optimal node automatically.
- Enable System Proxy: Click "Enable System Proxy" or equivalent, then visit a test website (e.g., an IP check page) to confirm the proxy is working and traffic rules are functioning as expected.
什么是订阅链接?如何使用?
What is a subscription link and how do I use it?
订阅链接是节点服务商提供的一种便捷配置更新方式:
- 定义:订阅链接是一个包含加密或编码后的节点列表与规则配置的 URL 地址,由节点服务商生成并提供给用户使用。
- 获取方式:从您信任的节点服务商处获取订阅链接,通常位于服务商网站的用户面板或服务详情页面中。
- 导入方法:打开 Clash 客户端,找到"配置"或"订阅"管理入口,粘贴订阅链接并点击更新,客户端会自动下载并解析配置。
- 自动更新优势:订阅链接支持定期自动更新,当服务商增减节点或调整规则时,客户端可一键同步最新配置,大幅减少手动维护成本。
- 安全提醒:请仅使用来自可信来源的订阅链接,避免将包含个人凭据的链接分享给他人,防止节点资源被滥用或泄露隐私信息。
A subscription link is a convenient configuration update method provided by node service providers:
- Definition: A subscription link is a URL containing an encrypted or encoded node list and rule configuration, generated by the service provider for users.
- How to Obtain: Get the subscription link from your trusted node service provider, usually found in the user dashboard or service details page on their website.
- How to Import: Open your Clash client, find the "Configuration" or "Subscription" management section, paste the link, and click update — the client auto-downloads and parses the configuration.
- Auto-Update Benefit: Subscription links support periodic auto-updates; when providers add/remove nodes or adjust rules, you can sync the latest config with one click, greatly reducing manual maintenance.
- Security Note: Only use subscription links from trusted sources. Never share links containing personal credentials to prevent resource abuse or privacy leaks.
Clash 安全吗?
Is Clash safe?
Clash 在安全性方面有多重保障:
- 代码开源可审计:Clash 核心代码基于 GPL-3.0 许可证在 GitHub 上完全公开,全球开发者均可审查代码,任何安全问题都会被社区迅速发现和修复。
- 数据本地化存储:配置文件和运行日志默认保存在您的本地设备上,不会自动上传到任何远程服务器,您对数据拥有完全控制权。
- 加密传输支持:Clash 兼容的代理协议(如 Shadowsocks、VMess、Trojan、WireGuard)均支持强加密传输,有效保护网络通信内容不被窃听。
- 社区驱动的安全生态:活跃的开源社区持续维护和更新各衍生客户端,安全补丁响应迅速。建议用户始终从官方渠道下载、定期更新客户端版本,并对节点服务进行风险评估。
Clash offers multiple layers of security assurance:
- Open Source & Auditable: Clash core code is fully public on GitHub under the GPL-3.0 license. Global developers can audit the code, and any security issues are quickly discovered and fixed by the community.
- Local Data Storage: Configuration files and runtime logs are stored locally on your device by default and are never automatically uploaded to remote servers — you have full data control.
- Encrypted Transport: Clash-compatible proxy protocols (Shadowsocks, VMess, Trojan, WireGuard) all support strong encryption, effectively protecting network communication from eavesdropping.
- Community-Driven Security: An active open-source community continuously maintains and updates derivative clients with rapid security patch response. Always download from official channels, keep clients updated, and assess node service risks.
Clash 支持哪些协议?
What protocols does Clash support?
Clash 拥有业界最广泛的协议兼容性:
- Shadowsocks / ShadowsocksR:最经典的轻量级加密代理协议,延迟低、速度快,适合大多数日常代理场景,社区生态成熟。
- VMess:由 V2Ray 项目提出的协议,支持更复杂的加密方式和传输伪装,抗干扰能力强,适合对隐蔽性要求较高的用户。
- Trojan:将代理流量伪装成标准的 HTTPS 流量,难以被防火墙识别和阻断,是目前最流行的伪装型协议之一。
- Snell:由 Surge 团队开发的专用协议,针对高延迟网络环境优化,提供稳定高效的传输体验。
- SOCKS5 / HTTP(S):通用标准代理协议,兼容性极佳,几乎所有支持代理的应用程序都可以直接使用。
- WireGuard:新一代高性能 VPN 协议,以内核级运行效率和现代加密算法著称,Clash Premium 版本提供支持。
Clash offers the industry's broadest protocol compatibility:
- Shadowsocks / ShadowsocksR: The classic lightweight encrypted proxy protocol with low latency and high speed, suitable for most daily proxy scenarios with a mature ecosystem.
- VMess: A protocol from the V2Ray project supporting complex encryption and transport obfuscation with strong anti-censorship capabilities for users needing higher stealth.
- Trojan: Disguises proxy traffic as standard HTTPS, making it difficult for firewalls to identify and block — one of the most popular obfuscation protocols today.
- Snell: A specialized protocol developed by the Surge team, optimized for high-latency network environments, providing a stable and efficient transmission experience.
- SOCKS5 / HTTP(S): Universal standard proxy protocols with excellent compatibility — almost all proxy-capable applications can use them directly.
- WireGuard: A next-generation high-performance VPN protocol known for kernel-level efficiency and modern encryption algorithms, supported in Clash Premium.
如何在不同平台选择合适的客户端?
How do I choose the right client for different platforms?
选择客户端时需综合考虑平台特性、使用习惯和维护活跃度:
- Windows 用户:推荐 Clash Verge Rev(基于 Rust + Tauri,界面现代、性能优异)或 Clash for Windows(经典稳定,新手友好),两者均支持完整的规则与策略配置。
- macOS 用户:ClashX Pro 是 Mac 上使用最广泛的客户端,原生菜单栏集成体验流畅;Stash 则提供更现代的 UI 和更丰富的功能扩展。
- Android 用户:Clash for Android 和 ClashMeta 都是优秀选择,支持完整的订阅管理、规则编辑和策略切换功能,Google Play 可直接下载。
- iOS 用户:Stash 和 Shadowrocket 是 iOS 平台 Clash 规则的最佳实现,通过 App Store 获取,支持丰富的规则集和策略组管理。
- Linux 用户:Clash Verge Rev 提供跨平台 GUI 支持,命令行版 Clash 核心则适合服务器或无桌面环境下的自动化部署。
- OpenWrt 路由器用户:OpenClash 是专为路由器环境设计的客户端,提供完整的 LuCI Web 管理界面,支持网关级透明代理,适合全家设备共享代理网络。
Choose a client based on platform characteristics, usage habits, and maintenance activity:
- Windows Users: Clash Verge Rev (Rust + Tauri, modern UI, excellent performance) or Clash for Windows (classic, stable, beginner-friendly) — both support full rule and strategy configuration.
- macOS Users: ClashX Pro is the most widely used Mac client with smooth native menu bar integration; Stash offers a more modern UI and richer feature extensions.
- Android Users: Both Clash for Android and ClashMeta are excellent choices with full subscription management, rule editing, and strategy switching — available on Google Play.
- iOS Users: Stash and Shadowrocket are the best Clash rule implementations for iOS, available via the App Store with rich rule set and strategy group management.
- Linux Users: Clash Verge Rev provides cross-platform GUI support, while the CLI Clash core suits server or headless environments for automated deployment.
- OpenWrt Router Users: OpenClash is purpose-built for router environments with a complete LuCI web interface, supporting gateway-level transparent proxy for whole-home network sharing.