🚀 开源跨平台代理工具 🚀 Open-Source Cross-Platform Proxy

Clash —— 基于规则的跨平台网络代理工具 Clash — Rule-Based Cross-Platform Network Proxy

支持多协议、智能分流,为每一位用户改善互联网体验 Multi-protocol support with intelligent routing — enhancing internet experience for everyone

为什么选择 Clash? Why Choose Clash?

四大核心能力,重新定义网络代理体验 Four core capabilities redefining the proxy experience

多协议兼容Multi-Protocol

支持 VMess、Trojan、Shadowsocks 等多种主流代理协议,灵活适应不同网络环境,满足各类代理需求。Supports VMess, Trojan, Shadowsocks, and more — adaptable to diverse network environments.

智能分流Smart Routing

根据规则自动选择最佳路径,实现国内直连和国外代理分流,提升访问速度和稳定性,告别全局代理的困扰。Automatically selects optimal paths based on rules, enabling split routing for domestic and international traffic.

跨平台支持Cross-Platform

覆盖 Windows、macOS、Linux、Android、iOS、OpenWrt 等操作系统,一处配置、多端使用。Covers Windows, macOS, Linux, Android, iOS, OpenWrt — one config, multi-device usage.

安全与隐私Security & Privacy

开源生态便于审计,支持本地化保存配置和日志,优先使用 TLS 加密传输,保障用户隐私与数据安全。Open-source for auditability, local config & log storage, TLS encryption — safeguarding your privacy.

深入了解 Clash 的强大能力 Explore Clash's Powerful Capabilities

基于规则的路由Rule-Based Routing

支持动态脚本、域名、IP地址、进程名称等多维度规则匹配,实现精细化的网络流量控制。无论是按域名后缀分流、按IP地理位置区分,还是按应用程序进程名指定代理策略,Clash 都能精确执行,让每一比特流量都按您的意图流动。Supports dynamic scripts, domain names, IP addresses, process names, and more for granular traffic control — every packet follows your intent.

Proxy Groups 策略组Proxy Groups

支持自动可用性测试(fallback)、负载均衡(load-balance)、延迟测试(url-test)等多种策略。策略组让您轻松管理多个代理节点,自动故障切换保障网络不掉线,负载均衡分散带宽压力,延迟测试确保始终选择最快的节点。Fallback, load-balance, url-test strategies — auto failover, bandwidth distribution, and always picking the fastest node.

Fake-IP DNSFake-IP DNS

通过 Fake-IP 机制尽量减少 DNS 污染的影响,同时提高网络性能。Clash 在本地返回虚拟IP地址,实际DNS解析在远端完成,有效规避DNS劫持和污染问题,让域名解析更加纯净可靠。Minimizes DNS pollution impact while boosting performance — virtual IPs returned locally with remote resolution for cleaner, more reliable DNS.

RESTful APIRESTful API

通过全面的 RESTful API 就地更新配置,便于高级用户和开发者进行自动化管理。您可以通过API动态修改代理规则、切换策略组、查询连接状态,实现与第三方工具的深度集成和自动化运维。Full RESTful API for in-place config updates — automate management, switch strategies, and integrate with third-party tools seamlessly.

选择您的平台 Choose Your Platform

覆盖六大主流操作系统,找到适合您的客户端 Covering six major operating systems — find the right client for you

Windows

Clash for Windows

配置简单,适合新手快速上手使用,界面直观友好。Easy setup with intuitive UI — perfect for beginners.

v0.20.39 下载Download

macOS

ClashX / ClashX Pro

Mac 系统上使用最广泛的客户端,原生体验出色。The most popular client on macOS with excellent native experience.

v1.118.0 下载Download

Linux

Clash Verge Rev

基于 Tauri 框架的现代化跨平台 GUI,界面美观、性能优异。Modern cross-platform GUI built on Tauri — sleek and performant.

v2.1.2 下载Download

Android

Clash for Android

Android 平台的官方 Clash 客户端,完整支持代理规则与策略组。Official Android client with full rule & proxy group support.

v3.0.3 下载Download

iOS

Stash / Shadowrocket

Stash 完整适配 Clash Premium 配置;Shadowrocket 是经典替代方案。Stash fully supports Clash Premium configs; Shadowrocket is a classic alternative.

App Store 下载Download

OpenWrt

OpenClash

适用于 OpenWrt 路由器系统,实现家庭网络级别的智能分流。For OpenWrt router systems — smart routing at the home network level.

v0.46.050 下载Download

三步开始使用 Clash Get Started in Three Steps

从下载到启用代理,只需三分钟 From download to proxy activation — just three minutes

1

下载安装Download & Install

选择对应系统版本下载并安装。优先使用可信来源,避免安全风险与捆绑软件。安装完成后启动客户端即可进入配置环节。Choose your OS version and install. Use trusted sources to avoid security risks. Launch the client after installation.

2

导入配置Import Config

通过订阅链接或本地 YAML 文件导入配置,按需启用规则集与策略组。订阅链接是一种"自动更新节点列表与规则"的远程地址,让配置始终保持最新。Import via subscription link or local YAML file. Enable rule sets and proxy groups as needed for auto-updating node lists.

3

启用代理Enable Proxy

开启系统代理或服务模式,检查分流是否生效,根据网络环境切换模式与节点。您可以在日志面板中实时查看每条连接的匹配规则和代理路径。Enable system proxy or service mode. Verify routing works and switch modes/nodes based on your network environment.

📖 查看详细教程 📖 View Detailed Tutorial

您可能想了解的问题 Frequently Asked Questions

Q1:Clash 是什么?它和传统 VPN 有什么区别? Q1: What is Clash? How does it differ from traditional VPNs?
  1. Clash 是一款基于规则的跨平台网络代理工具,它运行在网络层和应用层,能够根据用户自定义的规则对网络流量进行精细化管理,而非简单地将所有流量通过单一隧道转发。
  2. 与传统 VPN 不同,Clash 并非将所有流量都通过一个加密隧道传输,而是采用"按规则分流"的策略,可以精确控制哪些流量走代理、哪些直连,实现智能化的网络流量调度。
  3. 传统 VPN 通常是全局代理模式,一旦连接,所有网络请求都会经过 VPN 服务器,这可能严重影响国内网站的访问速度和稳定性,而 Clash 则避免了这一问题。
  4. Clash 允许用户设置多维度的匹配规则,例如让国内网站直连、国外网站通过代理访问,实现国内外流量智能分流,兼顾速度与可达性。
  5. 这种按需代理的方式既保证了境内网站的访问速度,又解决了境外网站的访问需求,比传统 VPN 更加灵活高效,资源利用率更高。
  6. 此外,Clash 开源透明,支持多种代理协议(如 Shadowsocks、VMess、Trojan 等),用户可以根据需要自由组合使用,在隐私保护和网络自由度方面具有显著优势。
  1. Clash is a rule-based cross-platform network proxy tool operating at the network and application layers, enabling granular traffic management based on user-defined rules.
  2. Unlike traditional VPNs, Clash does not route all traffic through a single encrypted tunnel; it uses "rule-based routing" to precisely control which traffic goes through the proxy and which connects directly.
  3. Traditional VPNs typically use global proxy mode — once connected, all requests go through the VPN server, potentially slowing down domestic website access. Clash avoids this entirely.
  4. Clash allows multi-dimensional matching rules — direct domestic sites while proxying international ones, achieving intelligent traffic splitting for both speed and accessibility.
  5. This on-demand proxying maintains domestic site speed while resolving international access needs — more flexible and efficient than traditional VPNs.
  6. Clash is open-source and transparent, supporting multiple protocols (Shadowsocks, VMess, Trojan, etc.) for flexible combination, offering significant advantages in privacy protection and network freedom.
Q2:Clash 支持哪些平台? Q2: Which platforms does Clash support?
  1. Clash 具有广泛的跨平台兼容性,其核心内核支持在多种操作系统上运行,覆盖桌面端、移动端和嵌入式设备,真正做到一次配置、多端使用。
  2. 在桌面端,Clash 支持 Windows 系统(推荐 Clash for Windows 客户端)、macOS 系统(推荐 ClashX 或 ClashX Pro)以及 Linux 系统(推荐 Clash Verge Rev 等现代化 GUI 客户端)。
  3. 在移动端,Android 用户可以使用 Clash for Android,该客户端专为移动设备优化,支持代理规则和策略组的完整功能,操作便捷。
  4. iOS 用户可以选择 Stash 客户端,它完整适配 Clash Premium 配置格式,功能全面;Shadowrocket 也是一个广受欢迎的经典替代方案。
  5. 对于路由器和嵌入式设备,OpenWrt 系统可以通过 OpenClash 插件使用 Clash 功能,实现家庭网络级别的智能分流,让所有连接设备受益。
  6. 高级用户还可以在命令行模式下直接运行 Clash 内核,适用于各种 Linux 发行版、树莓派等设备,具有极高的部署灵活性。
  1. Clash offers broad cross-platform compatibility — its core kernel runs on multiple operating systems, covering desktop, mobile, and embedded devices.
  2. On desktop, Clash supports Windows (Clash for Windows), macOS (ClashX / ClashX Pro), and Linux (Clash Verge Rev — a modern GUI client).
  3. On mobile, Android users can use Clash for Android, optimized for mobile with full rule and proxy group support.
  4. iOS users can choose Stash (fully compatible with Clash Premium configs) or Shadowrocket as a classic alternative.
  5. For routers and embedded devices, OpenWrt supports OpenClash for home-network-level smart routing, benefiting all connected devices.
  6. Advanced users can run Clash core directly via command line on various Linux distributions and Raspberry Pi devices for maximum deployment flexibility.
Q3:如何获取配置文件或订阅链接? Q3: How do I get configuration files or subscription links?
  1. 获取配置文件是使用 Clash 的关键第一步。配置文件通常以 YAML 格式编写,包含了代理节点信息、分流规则和策略组设置等核心内容。
  2. 最常见的方式是通过订阅链接获取配置。订阅链接是由代理服务提供商或社区维护者提供的一个远程 URL 地址,Clash 客户端可以自动从该链接拉取并更新配置,省去手动维护的麻烦。
  3. 用户需要先从可信赖的代理服务提供商处获取订阅链接,在 Clash 客户端的配置导入界面中粘贴该链接,客户端会自动下载并解析配置文件,整个过程通常只需几秒钟。
  4. 对于高级用户,也可以手动编写或修改 YAML 配置文件,将本地的配置模板与订阅链接结合使用,实现更精细的个性化设置和规则定制。
  5. 一些社区网站和论坛也会分享公开的配置模板和规则集,用户可以下载后根据自身需求进行调整,替换其中的节点信息为己所用。
  6. 安全提示:用户应始终从可信来源获取配置和订阅链接,避免使用来源不明的配置文件,以防止隐私泄露或潜在的安全风险。
  1. Obtaining a configuration file is the crucial first step. Config files are typically in YAML format, containing proxy node info, routing rules, and proxy group settings.
  2. The most common method is via subscription links — remote URLs provided by proxy service providers that Clash clients auto-fetch and update.
  3. Get a subscription link from a trusted provider, paste it into your Clash client's config import interface, and the client will automatically download and parse it within seconds.
  4. Advanced users can manually write or modify YAML config files, combining local templates with subscription links for finer personalization.
  5. Community sites and forums often share public config templates and rule sets — download and adapt them to your needs by replacing node information.
  6. Security reminder: Always obtain configs and subscription links from trusted sources to avoid privacy leaks or security risks.
Q4:什么是"规则分流"?如何设置? Q4: What is "rule-based routing" and how do I set it up?
  1. "规则分流"是 Clash 最核心的功能特性,它允许用户定义一系列匹配规则,根据网络请求的目标域名、IP 地址或应用程序等信息,将流量导向不同的代理策略。
  2. 在 Clash 的配置文件中,规则以特定语法编写。每条规则通常包含匹配类型(如 DOMAIN、DOMAIN-SUFFIX、IP-CIDR 等)、匹配目标和对应的策略组名称,结构清晰明了。
  3. 设置规则分流的第一步是理解常用匹配类型:DOMAIN 用于精确匹配域名、DOMAIN-SUFFIX 用于匹配域名后缀(如 .google.com)、GEOIP 用于根据 IP 地理位置匹配、PROCESS-NAME 用于匹配进程名等。
  4. 第二步是规划分流逻辑,例如将国内常见的域名(如 .cn 结尾的网站)设置为直连(DIRECT),将 Google、YouTube 等境外服务设置为走代理(PROXY),形成清晰的分流策略。
  5. 第三步是在配置文件的 rules 字段中按顺序编写规则,Clash 会从上到下依次匹配,因此需要将更精确的规则放在前面,更宽泛的规则放在后面,确保匹配的准确性。
  6. 完成配置后,用户可以在客户端的日志或连接面板中查看分流效果,确认国内网站为直连、境外网站为代理,根据实际情况对规则进行微调和持续优化。
  1. "Rule-based routing" is Clash's core feature — it lets you define matching rules to direct traffic to different proxy strategies based on domain, IP, or application.
  2. In Clash config files, rules use specific syntax with match types (DOMAIN, DOMAIN-SUFFIX, IP-CIDR, etc.), match targets, and corresponding proxy group names.
  3. Step one: Understand common match types — DOMAIN for exact matches, DOMAIN-SUFFIX for suffix matches, GEOIP for geographic IP matching, PROCESS-NAME for app-level matching.
  4. Step two: Plan your routing logic — direct domestic domains (.cn) via DIRECT, route international services (Google, YouTube) through PROXY for a clear split strategy.
  5. Step three: Write rules in order within the config file's rules field. Clash matches top-to-bottom, so place more specific rules before broader ones for accuracy.
  6. After configuration, monitor the connection log panel to verify routing works correctly, then fine-tune rules based on actual results.
Q5:如何选择合适的策略组? Q5: How do I choose the right proxy group strategy?
  1. 策略组(Proxy Groups)是 Clash 用来管理多个代理节点的重要机制,不同类型的策略组适用于不同的使用场景,选择合适的策略组可以显著提升网络体验和连接稳定性。
  2. 手动选择策略组(select):允许用户从多个节点中手动指定使用哪一个,适合需要固定使用某个特定节点的场景,如访问特定区域的流媒体服务或游戏服务器。
  3. 自动可用性测试策略组(fallback):按照节点列表顺序依次检测可用性,自动切换到第一个可用的节点,适合对连接稳定性要求较高的场景,如重要业务和在线会议。
  4. 延迟测试策略组(url-test):定期测试所有节点的延迟,自动选择延迟最低的节点,适合追求最快速度的场景,如视频观看、在线游戏和大文件下载。
  5. 负载均衡策略组(load-balance):将流量分散到多个节点上,适合需要分散带宽压力的场景,避免单一节点负载过高导致速度下降,提升整体网络吞吐量。
  6. 建议用户根据自身需求灵活组合使用:日常浏览可使用 url-test 自动选择最快节点,重要业务可使用 fallback 保证稳定性,特定地区服务可使用 select 手动指定,通过合理配置实现最佳的网络体验。
  1. Proxy Groups are Clash's key mechanism for managing multiple proxy nodes — different types suit different scenarios, and choosing wisely significantly improves network experience.
  2. Select strategy: Manually pick a specific node — ideal for fixed needs like accessing region-specific streaming services or game servers.
  3. Fallback strategy: Tests nodes in order and auto-switches to the first available one — best for stability-critical scenarios like business and online meetings.
  4. URL-test strategy: Periodically tests all nodes and picks the lowest-latency one — perfect for speed-sensitive use like video streaming and gaming.
  5. Load-balance strategy: Distributes traffic across multiple nodes — great for spreading bandwidth load and improving overall throughput.
  6. Combine strategies flexibly: Use url-test for daily browsing, fallback for critical business, and select for region-specific services — achieving the optimal network experience through thoughtful configuration.
Q6:为什么需要使用 Clash? Q6: Why should I use Clash?
  1. 在当今的互联网环境中,用户面临着网络访问受限、隐私安全担忧和跨国网络延迟等多重挑战,Clash 为这些问题提供了一站式的综合解决方案,让网络管理变得更加智能和高效。
  2. 首先,Clash 解决了跨境访问的难题。通过智能分流规则,用户可以无障碍地访问国际互联网资源,同时保持国内网站的快速访问,无需频繁切换网络环境或手动开关代理。
  3. 其次,Clash 提供了卓越的隐私保护能力。开源透明的代码可供全球开发者审计,配置和日志默认保存在本地设备上,支持加密传输协议,有效防止数据被中间人窃取或篡改。
  4. 第三,Clash 的灵活性远超传统工具。用户可以精细控制每个应用、每个域名的代理策略,甚至可以设置按时间段自动切换策略,满足个性化的网络管理需求,实现真正的精细化控制。
  5. 第四,Clash 支持丰富的代理协议生态,从 Shadowsocks 到 WireGuard,用户可以根据网络环境和安全需求选择最合适的协议组合,拥有极大的选择自由度。
  6. 最后,Clash 拥有活跃的开源社区和丰富的文档资源,无论是新手还是高级用户都能找到适合自己的使用方式,持续更新和维护也让 Clash 始终保持在网络工具的技术前沿。
  1. In today's internet landscape, users face access restrictions, privacy concerns, and cross-border latency — Clash provides a comprehensive one-stop solution for smarter, more efficient network management.
  2. First, Clash solves cross-border access challenges. Smart routing rules enable seamless access to international resources while maintaining fast domestic site speeds without constant proxy toggling.
  3. Second, Clash offers superior privacy protection. Open-source code is globally auditable, configs and logs stay local by default, and encrypted transport protocols prevent data interception.
  4. Third, Clash's flexibility far exceeds traditional tools. Fine-tune proxy strategies per app, per domain, even schedule automatic strategy switches — achieving true granular control.
  5. Fourth, Clash supports a rich protocol ecosystem — from Shadowsocks to WireGuard — giving users the freedom to choose the optimal protocol combination for their environment.
  6. Finally, Clash boasts an active open-source community and extensive documentation, making it accessible for both newcomers and advanced users, with continuous updates keeping it at the forefront of network tools.

加入 Clash 开源社区 Join the Clash Open-Source Community