This is a general overview of the features that comes with Clash.
- Inbound: HTTP, HTTPS, SOCKS5 server, TUN device
- Outbound: Shadowsocks(R), VMess, Trojan, Snell, SOCKS5, HTTP(S), Wireguard
- Rule-based Routing: dynamic scripting, domain, IP addresses, process name and more
- Fake-IP DNS: minimises impact on DNS pollution and improves network performance
- Transparent Proxy: Redirect TCP and TProxy TCP/UDP with automatic route table/rule management
- Proxy Groups: automatic fallback, load balancing or latency testing
- Remote Providers: load remote proxy lists dynamically
- RESTful API: update configuration in-place via a comprehensive API
Some of the features may only be available in the Premium core.
- Go >= 1.20
- make
-
Open Makefile;
-
Goto line 40, change or add the target platform;
-
Open command line
cd {PATH}/clash-core make
-
Packages are in folder {PATH}/clash-core/bin/
-
The configuration file would be created after clash first started.
-
Configuration file loaction:
-
Windows: C:\Users\{username}\.config\clash\config.yaml
-
Linux: ~/.config/clash/config.yaml
-
-
config.yaml 文件内容可通过 Clash for Windows 等客户端获取,步骤:
- 点击 “Profiles”
- 选中配置文件,右键,选择 “Edit” 或 “Edit externally”
- 全选复制文件内容
- 粘贴到 config.yaml
-
clash 运行起来后,可能还是无法使用,需要设置代理:
- 开启(永久生效则将代码放入 ~/.profile 末尾):
- export http_proxy=http://127.0.0.1:7890
- export https_proxy=http://127.0.0.1:7890
- 关闭:
- unset http_proxy
- unset https_proxy
- 开启(永久生效则将代码放入 ~/.profile 末尾):
-
设置代理方式:
-
新建文件 proxy_set:
# !/bin/bash # 开启终端代理 cat > /etc/profile.d/proxy.sh << EOF #!/bin/bash export http_proxy=http://127.0.0.1:7890 export https_proxy=http://127.0.0.1:7890 EOF source /etc/profile.d/proxy.sh
-
新建文件 proxy_unset:
# !/bin/bash rm -rf /etc/profile.d/proxy.sh unset http_proxy unset https_proxy
-
使用方法:
- 开启代理:
. ./proxy_set
- 关闭代理:
. ./proxy_unset
- 开启代理:
-
This software is released under the GPL-3.0 license.