Profiles/Clash/Global.yaml

313 lines
8.6 KiB
YAML
Raw Normal View History

2020-04-05 22:46:47 +08:00
# HTTP 端口
port: 7890
# SOCKS5 端口
socks-port: 7891
# Linux 及 macOS 的 redir 端口
# redir-port: 7892
allow-lan: false
# 仅适用于设置 allow-lan 为 true 时
# "*": 绑定所有 IP 地址
# 192.168.122.11: 绑定单个 IPv4 地址
# "[aaaa::a8aa:ff:fe09:57d8]": 绑定单个 IPv6 地址
# bind-address: "*"
# Rule / Global / Direct (默认为 Rule 模式)
mode: Rule
# 设置输出日志的等级 (默认为 info)
# info / warning / error / debug / silent
log-level: info
# RESTful API for clash
external-controller: 127.0.0.1:9090
# you can put the static web resource (such as clash-dashboard) to a directory, and clash would serve in `${API}/ui`
# input is a relative path to the configuration directory or an absolute path
# external-ui: folder
# Secret for RESTful API (Optional)
# secret: ""
# 实验性功能
experimental:
ignore-resolve-fail: true # 忽略 DNS 解析失败默认值为true
# interface-name: en0 # 出站接口名称
# 本地 SOCKS5/HTTP(S) 服务器认证
# authentication:
# - "user1:pass1"
# - "user2:pass2"
# # 实验性 hosts, 支持通配符(如 *.clash.dev 甚至 *.foo.*.examplex.com
# # 静态域的优先级高于通配符域foo.example.com > *.example.com
2020-04-24 13:03:55 +08:00
hosts:
'mtalk.google.com': 108.177.125.188
2020-04-05 22:46:47 +08:00
# '*.clash.dev': 127.0.0.1
# 'alpha.clash.dev': '::1'
2020-05-29 14:00:48 +08:00
dns:
enable: true # set true to enable dns (default is false)
ipv6: false # default is false
listen: 0.0.0.0:53
# default-nameserver: # resolve dns nameserver host, should fill pure IP
2020-04-05 22:46:47 +08:00
# - 114.114.114.114
2020-05-29 14:00:48 +08:00
# - 8.8.8.8
enhanced-mode: redir-host # or fake-ip
# fake-ip-range: 198.18.0.1/16 # if you don't know what it is, don't change it
fake-ip-filter: # fake ip white domain list
- '*.lan'
- localhost.ptlogin2.qq.com
nameserver:
- 119.29.29.29
- 223.5.5.5
fallback: # concurrent request with nameserver, fallback used when GEOIP country isn't CN
- tcp://1.1.1.1
fallback-filter:
geoip: true # default
ipcidr: # ips in these subnets will be considered polluted
- 240.0.0.0/4
2020-04-05 22:46:47 +08:00
proxies:
# 支持的协议及加密算法示例请查阅 Clash 项目 README 以使用最新格式https://github.com/Dreamacro/clash/blob/master/README.md
2020-06-10 23:09:06 +08:00
# Shadowsocks(Websocket + TLS)
- name: "HK"
type: ss
server: server
port: 443
cipher: chacha20-ietf-poly1305
password: "password"
plugin: v2ray-plugin
plugin-opts:
mode: websocket # no QUIC now
tls: true # wss
# skip-cert-verify: true
# host: bing.com
path: "/s"
# mux: true
# headers:
# custom: value
# VMess(Websocket + TLS)
- name: "US"
type: vmess
server: v2ray.cool
port: 443
uuid: a3482e88-686a-4a58-8126-99c9df64b7bf
alterId: 32
cipher: auto
# udp: true
tls: true
# skip-cert-verify: true
network: ws
ws-path: /v
# ws-headers:
# Host: v2ray.com
# Trojan
- name: "SG"
type: trojan
server: server
port: 443
password: yourpsk
# udp: true
# sni: example.com # aka server name
# alpn:
# - h2
# - http/1.1
2020-04-05 22:46:47 +08:00
# skip-cert-verify: true
2020-05-03 10:58:55 +08:00
# 服务器节点订阅
2020-06-10 23:09:06 +08:00
proxy-providers:
# name: # Provider 名称
# type: http # http 或 file
# path: # 文件路径
# url: # 只有当类型为 HTTP 时才可用,您不需要在本地空间中创建新文件。
# interval: # 自动更新间隔,仅在类型为 HTTP 时可用
# health-check: # 健康检查选项从此处开始
# enable:
# url:
# interval:
#
# 「url」参数填写订阅链接
#
2020-06-11 17:50:51 +08:00
# 订阅链接可以使用 API 进行转换https://sub.dler.io/
#
2020-06-11 17:50:51 +08:00
# 1.模式选择「进阶模式」 2.填写订阅链接 3.勾选「输出为 Node List」 4.「生成订阅链接」
#
2020-06-12 20:23:08 +08:00
DuckDuckGo-Sub: # 冲鸭机场订阅链接
2020-06-11 17:43:21 +08:00
type: http
url: "https://duckduckgo.security/user/sub.php?token=DivineEngine"
interval: 3600
path: ./Proxy/ProxyList.yaml
health-check:
enable: true
interval: 600
url: http://www.gstatic.com/generate_204
2020-04-05 22:46:47 +08:00
proxy-groups:
# 策略组示例请查阅 Clash 项目 README 以使用最新格式https://github.com/Dreamacro/clash/blob/master/README.md
2020-06-11 10:07:18 +08:00
#
# 策略组说明
#
# 「MATCH」类似 Surge 的「Final」此处用于选择白名单模式(PROXY 策略)和黑名单模式(DIRECT 策略)
#
# 「Streaming」和「StreamingSE」比较好理解有专用语流媒体的节点就设置到其中如果没有「StreamingSE」的需求可以连带 Rule 部分一起删掉「Streaming」需至少保留 Rule用「PROXY」即可。
#
# 「PROXY」是代理规则策略它可以指定为某个节点或嵌套一个其他策略组「自动测试」、「Fallback」或「负载均衡」的策略组关于这 3 个策略组的具体示例可以看官方示例https://github.com/Dreamacro/clash
#
# Fallback 比较实用的策略组类型,用于测试服务器节点的可用性,当第一个节点不可用时切换到第二个,以此类推。
2020-06-10 23:09:06 +08:00
- name: "Fallback"
type: fallback
proxies:
- HK
- US
- SG
url: 'http://www.gstatic.com/generate_204'
interval: 300
# 代理节点选择
- name: "PROXY"
type: select
proxies:
- Fallback
- HK
- US
- SG
2020-06-12 20:23:08 +08:00
- DuckDuckGo
2020-06-10 23:09:06 +08:00
# 白名单模式 PROXY, 黑名单模式 DIRECT, 不知道别动
- name: "MATCH"
type: select
proxies:
- PROXY
- DIRECT
# 国际流媒体服务
- name: "Streaming"
type: select
proxies:
- PROXY
- HK
- US
- SG
# 中国流媒体服务(面向海外版本)
- name: "StreamingSE"
type: select
proxies:
- DIRECT
- HK
2020-06-12 20:23:08 +08:00
# 手动选择节点订阅
- name: "DuckDuckGo"
type: select # 亦可使用 fallback 或 load-balance
use:
- DuckDuckGo-Sub
2020-06-10 23:09:06 +08:00
# 关于 Rule Provider 请查阅https://lancellc.gitbook.io/clash/clash-config-file/rule-provider
rule-providers:
# name: # Provider 名称
# type: http # http 或 file
# behavior: classical # 或 ipcidr、domain
# path: # 文件路径
# url: # 只有当类型为 HTTP 时才可用,您不需要在本地空间中创建新文件。
# interval: # 自动更新间隔,仅在类型为 HTTP 时可用
Unbreak:
type: http
behavior: classical
path: ./RuleSet/Unbreak.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Unbreak.yaml
interval: 86400
Streaming:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/Streaming.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/Streaming.yaml
interval: 86400
StreamingSE:
type: http
behavior: classical
path: ./RuleSet/StreamingMedia/StreamingSE.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/StreamingMedia/StreamingSE.yaml
interval: 86400
Global:
type: http
behavior: classical
path: ./RuleSet/Global.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Global.yaml
interval: 86400
China:
type: http
behavior: classical
path: ./RuleSet/China.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml
interval: 86400
IP-Blackhole:
type: http
behavior: classical
path: ./RuleSet/Extra/IP-Blackhole.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/IP-Blackhole.yaml
interval: 86400
ChinaIP:
type: http
behavior: classical
path: ./RuleSet/Extra/ChinaIP.yaml
url: https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/Extra/ChinaIP.yaml
interval: 86400
# 规则
2020-04-05 22:46:47 +08:00
rules:
2020-06-10 23:09:06 +08:00
# Unbreak
- RULE-SET,Unbreak,DIRECT
2020-04-09 12:47:34 +08:00
2020-06-10 23:09:06 +08:00
# Global Area Network
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# (Streaming Media)
- RULE-SET,Streaming,Streaming
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# (StreamingSE)
- RULE-SET,StreamingSE,StreamingSE
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# (DNS Cache Pollution) / (IP Blackhole) / (Region-Restricted Access Denied) / (Network Jitter)
- RULE-SET,Global,PROXY
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# China Area Network
- RULE-SET,China,DIRECT
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# Local Area Network
- IP-CIDR,192.168.0.0/16,DIRECT
- IP-CIDR,10.0.0.0/8,DIRECT
- IP-CIDR,172.16.0.0/12,DIRECT
- IP-CIDR,127.0.0.0/8,DIRECT
- IP-CIDR,100.64.0.0/10,DIRECT
- IP-CIDR,224.0.0.0/4,DIRECT
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
# IP Blackhole
- RULE-SET,IP-Blackhole,PROXY
2020-05-20 22:37:43 +08:00
2020-06-10 23:09:06 +08:00
# Tencent
- IP-CIDR,119.28.28.28/32,DIRECT
- IP-CIDR,182.254.116.0/24,DIRECT
# 使用来自 ipipdotnet 的 ChinaIP 以解决数据不准确的问题,使用 ChinaIP.yaml 时禁用「GEOIP,CN」规则
# - RULE-SET,ChinaIP,DIRECT
# GeoIP China
- GEOIP,CN,DIRECT
2020-04-05 22:46:47 +08:00
2020-06-10 23:09:06 +08:00
- MATCH,MATCH