2

【笔记】Clash配置文件

 1 year ago
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.
neoserver,ios ssh client

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:obfs
obfs-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,组名

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK