📚 Полное руководство

Clash X Tutorial

From beginner to expert, easily master proxy configuration

NordVPN

推广

🧠

1. Core Concepts

Before you start, understanding how ClashX works will help you configure it better.

How It Works

ClashX is a rule-based прокси-клиент. Unlike traditional VPNs (global encrypted tunnels), ClashX operates at the application layer (System Proxy) or сеть layer (Режим TUN), using preset rule lists to determine where each сеть request should go.

🔄 Routing Logic: When you visit a website (e.g., google.com), ClashX checks your rule file. If a rule matches and requires proxy, трафик is forwarded to the прокси-сервер; if it's a domestic domain, трафик is sent directly without proxy.

Configuration File (YAML)

The core of ClashX is the config.yaml file. This file defines three main parts:

  • Proxies: Defines прокси-сервер information (IP, port, encryption method).
  • Proxy Groups: Groups nodes together, e.g., "Автовыбор", "Ручной выбор", "Apple Services", etc.
  • Rules: Defines трафик matching logic, e.g., DOMAIN-SUFFIX,google.com,Proxy.
💻

1. Установка Tutorial

Three simple steps to quickly install Clash X

Step 1

Download App

Visit the download page, select the version for your system and download.

💡 Recommended: Latest stable version Clash X v1.119.0
Step 2

Install App

  1. Double-click the downloaded .dmg file
  2. Drag the Clash X icon to the "Applications" folder
  3. Find Clash X in the "Applications" folder and double-click to open
Step 3

Grant Permissions

On first launch, the system may show "Cannot be opened because it is from an unidentified developer". Solution:

  1. Open "System Preferences" → "Security & Конфиденциальность"
  2. Click the "Open Anyway" button
  3. Or execute this command in Терминал:
bash
xattr -d com.apple.quarantine /Applications/ClashX.app
💡
Tip: Clash X requires сеть proxy permissions. You will be asked to enter your system пароль when running for the first time.
⚙️

2. Basic Configuration

Complete initial setup and get ready to use

Launch Clash X

After opening the app, you will see the Clash X icon (a cat icon) in the строка меню. Click the icon to see the main menu.

🎯 The строка меню icon is your main entry point for interacting with Clash X

Initial Setup

  1. Click the строка меню icon
  2. Select "Config" → "Open Config Folder"
  3. Place your файл конфигурации (.yaml) in this folder
  4. Return to the menu and select your файл конфигурации under "Config"
⚠️
Note: Configuration file format must be correct. It рекомендуется to use the файл конфигурации or ссылка подписки provided by your service provider.
🔗

3. Подписка Settings

Use ссылка подпискиs to automatically update node configurations

Add Подписка Link

Подписка links are the most convenient configuration method and can automatically update node information.

1
Click строка меню icon
2
Config → Управляемая конфигурация
3
Add подписка URL

Update Подписка

Подписка links can be updated regularly to get the latest node information:

🔄

Manual Update

Config menu → Select config → Click "Update"

Auto Update

Set update interval in managed config

🌐

4. Proxy Modes

Understand three режим проксиs and choose the one for your use case

🌍

Глобальный режим

All трафик goes through proxy, suitable for scenarios that require full proxy.

Global
📍

Прямой режим

All трафик goes direct without proxy. Used to temporarily disable proxy.

Direct

Switch Proxy Mode

Click the Clash X icon in the строка меню and select the desired mode under "Режим исходящего трафика".

📋

5. Rule Configuration

Customize трафик rules to precisely control proxy behavior

Rule Explanation

Rules are used to determine which трафик should go through proxy and which should go direct. Common rule types:

🌐

DOMAIN-SUFFIX

Domain suffix matching

🔍

DOMAIN-KEYWORD

Domain keyword matching

📍

IP-CIDR

IP address range matching

🗺️

GEOIP

Geographic location matching

Custom Rules

Edit the файл конфигурации and add custom rules in the rules section:

yaml
rules:
  - DOMAIN-SUFFIX,google.com,Proxy
  - DOMAIN-KEYWORD,youtube,Proxy
  - GEOIP,CN,DIRECT
  - MATCH,Proxy
🚀

6. Advanced Features

Master these advanced features for a better experience

📊

Dashboard Control Panel

Clash X provides a web control panel to monitor трафик and connection status in real time:

  • Строка меню → Click "Dashboard"
  • Browser will automatically open the control panel
  • View в реальном времени трафик, connection count, rule matching and other information

Speed Test

Test node latency and select the fastest node:

  • Строка меню → Proxy → Select группа политик
  • Click "Speed Test" button
  • Wait for completion, the node with lowest latency will be selected
🔥

Расширенный режим

Enabling enhanced mode can proxy more types of трафик:

  • Строка меню → "Установить как системный прокси" (check)
  • Строка меню → "Расширенный режим" (check)
🛡️

8. Security & Конфиденциальность

Learn how to use ClashX securely to protect your сеть privacy.

Local Шифрование

As a local прокси-клиент, ClashX performs all rule matching and routing decisions locally on your Mac. Your raw трафик data is not uploaded to any third-party серверы (except the прокси-серверs you configure).

DNS Leak Protection

To prevent DNS pollution and privacy leaks, it рекомендуется to enable DNS encryption (DoH or DoT) in your файл конфигурации. ClashX supports taking over system DNS requests to ensure your domain resolution process is also encrypted.

7. Common Questions

Quickly find solutions to common problems

Q

Why can't I connect?

+
A

Please check the following:

  • Is the файл конфигурации format correct?
  • Is the ссылка подписки valid?
  • Is the node available (try switching to other nodes)?
  • Is the системный прокси setting correct?
  • Is the брандмауэр blocking Clash X?
Q

How to fix slow speed issues?

+
A

You can try the following:

  • Use тест скорости to select nodes with low latency
  • Switch to different nodes
  • Check local сеть status
  • Contact service provider
Q

Icon not showing after startup?

+
A

The строка меню icon may be hidden:

  • Hold ⌘ (Command) key and drag icon to adjust position
  • Check строка меню settings in system preferences
  • Restart the app
Q

How to uninstall Clash X?

+
A

Complete uninstallation steps:

  1. Quit Clash X (Menu → Quit)
  2. Delete /Applications/ClashX.app
  3. Delete файл конфигурацииs: ~/.config/clash
  4. Check системный прокси settings to ensure they are restored to default
Tip: If you encounter other issues, вы можете visit GitHub Issues to find solutions or submit issues.
💻

开发者终端代理快速配置

解决“浏览器可用但终端工具超时”的高频问题

  1. 优先开启 TUN 模式,统一终端与 GUI 流量路径。
  2. 若暂不启用 TUN,请在 shell 中显式设置 http_proxyhttps_proxy
  3. 遇到间歇性失败时,按 连接超时排障 + DNS 检查清单 联合定位。