Clash X Tutorial
From beginner to expert, easily master proxy configuration
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.
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
Download App
Visit the download page, select the version for your system and download.
Install App
- Double-click the downloaded .dmg file
- Drag the Clash X icon to the "Applications" folder
- Find Clash X in the "Applications" folder and double-click to open
Grant Permissions
On first launch, the system may show "Cannot be opened because it is from an unidentified developer". Solution:
- Open "System Preferences" → "Security & Конфиденциальность"
- Click the "Open Anyway" button
- Or execute this command in Терминал:
xattr -d com.apple.quarantine /Applications/ClashX.app
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.
Initial Setup
- Click the строка меню icon
- Select "Config" → "Open Config Folder"
- Place your файл конфигурации (.yaml) in this folder
- Return to the menu and select your файл конфигурации under "Config"
3. Подписка Settings
Use ссылка подпискиs to automatically update node configurations
Add Подписка Link
Подписка links are the most convenient configuration method and can automatically update node information.
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.
Режим правил
Automatically determine whether to use proxy based on rules, intelligent трафик routing, recommended.
Прямой режим
All трафик goes direct without proxy. Used to temporarily disable proxy.
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:
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
Why can't I connect?
+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?
How to fix slow speed issues?
+You can try the following:
- Use тест скорости to select nodes with low latency
- Switch to different nodes
- Check local сеть status
- Contact service provider
Icon not showing after startup?
+The строка меню icon may be hidden:
- Hold ⌘ (Command) key and drag icon to adjust position
- Check строка меню settings in system preferences
- Restart the app
How to uninstall Clash X?
+Complete uninstallation steps:
- Quit Clash X (Menu → Quit)
- Delete /Applications/ClashX.app
- Delete файл конфигурацииs: ~/.config/clash
- Check системный прокси settings to ensure they are restored to default
开发者终端代理快速配置
解决“浏览器可用但终端工具超时”的高频问题
延伸阅读
深入了解 ClashX 的更多功能和技巧