【笔记】Clash配置文件
source link: https://feiju12138.github.io/2022/10/26/Clash%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Clash配置文件学习笔记
配置文件位置
Linux & MacOS
~/.config/clash/config.yaml
port
:指定HTTP代理的监听端口socks-port
:指定SOCKS5代理的监听端口mode
:代理模式
rule
:规则模式
log-level
:日志打印级别external-controller
:接口监听端口proxies:
:代理服务器列表
name
:代理服务器名称,在GUI界面时显示的名称server
:服务器IP活域名port
:端口号type
:代理类型
ssr
:SSR类型
cipher
:加密方式
aes-256-cfb
:aes-256-cfb方式加密
password
:密码protocol
:互联网协议
auth_aes128_sha1
:auth_aes128_sha1协议
protocol-param
:协议参数obfs
:obfsobfs-param
:obfs参数udp
:是否开启UDP转发
true
:开启
proxy-groups
:代理服务器组列表
name
:组名type
:组类型
select
:手动选择url-test
:自动选择fallback
:故障切换
proxies
:组内代理服务器列表,可以制定代理服务器名,也可以指定组名rules
:规则列表
第一部分:规则类型
DOMAIN-SUFFIX
:在参数位置指定域名IP-CIDR
:在参数位置指定IPV4和网段IP-CIDR6
:在参数位置指定IPV6和网段GEOIP
:在参数位置指定国家MATCH
:其他情况,无需指定第二部分第二部分:参数
第三部分:规则,可以是组名
DIRECT
:直连no-resolve
:无规则组名
:根据指定组选择代理服务器
~/.config/clash/config.yaml
port: 7890
socks-port: 7891
allow-lan: true
mode: rule
log-level: info
external-controller: :9090
proxies:
- { name: ,
server: ,
port: ,
type: ssr,
cipher: aes-256-cfb,
password: ,
protocol: auth_aes128_sha1,
protocol-param: ,
obfs: http_simple,
obfs-param: download.windowsupdate.com,
udp: true
}
- {...}
proxy-groups:
- name:
type: select
proxies:
- 服务器名
- 组名
rules:
- DOMAIN-SUFFIX,local,DIRECT
- IP-CIDR,192.168.0.0/16,DIRECT,no-resolve
- IP-CIDR6,::1/128,DIRECT,no-resolve
- GEOIP,CN,DIRECT
- MATCH,组名
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK