-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathpreference.advanced.yaml
170 lines (157 loc) · 5.07 KB
/
preference.advanced.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
# Port of HTTP(S) proxy server on the local end
port: 7890
# Port of SOCKS5 proxy server on the local end
socks-port: 7891
# Transparent proxy server port for Linux and macOS (Redirect TCP and TProxy UDP)
redir-port: 7892
# Clash as Transparent proxy gateway via TPROXY
tproxy: true
# Transparent proxy server port for Linux (TProxy TCP and TProxy UDP)
tproxy-port: 7893
# Set to true to allow connections to the local-end server from
# other LAN IP addresses
allow-lan: false
# RESTful web API listening address
external-controller: 127.0.0.1:9090
# Static hosts for DNS server and connection establishment (like /etc/hosts)
#
# Wildcard hostnames are supported (e.g. *.clash.dev, *.foo.*.example.com)
# Non-wildcard domain names have a higher priority than wildcard domain names
# e.g. foo.example.com > *.example.com > .example.com
# P.S. +.foo.com equals to .foo.com and foo.com
hosts:
services.googleapis.cn: 74.125.193.94 # Google 中国重新定向
time.android.com: 203.107.6.88 # 国内可用 NTP 服务器
ipv6.msftconnecttest.com: 2a01:111:2003::52 # Windows 网络状态检查
www.msftconnecttest.com: 13.107.4.52 # Windows 网络状态检查
proxies: # 更多协议配置示例:https://github.com/Dreamacro/clash/wiki/configuration
# VMess
- { name: "US-Ashburn-01", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
- { name: "US-Ashburn-02", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
- { name: "JP-Tokyo-01", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
- { name: "JP-Tokyo-02", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
- { name: "KR-Seoul-01", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
- { name: "KR-Seoul-02", type: vmess, server: vmess, port: 443, uuid: uuid, alterId: 0, cipher: auto, network: ws, ws-opts: {path: /path}, tls: true }
proxy-groups:
- name: "Proxy" # 手动选择代理节点
type: select
proxies:
- "Auto"
- "DIRECT"
- "USA"
- "JPN"
- "KOR"
- name: "Auto" # 默认情形下我是山姆
type: url-test
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- "US-Ashburn-01"
- "US-Ashburn-02"
- name: "Performance" # 速度最快节点
type: url-test
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- ".*"
- name: "Load-Balance" # 上传分流
type: load-balance
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- "US-Ashburn-01"
- "US-Ashburn-02"
- "JP-Tokyo-01"
- "JP-Tokyo-02"
- name: "Game" # 游戏服务
type: select
proxies:
- "Performance"
- "DIRECT"
- name: "Apple" # Apple 服务代理
type: select
proxies:
- "DIRECT"
- "Proxy"
- "USA"
- "JPN"
- "KOR"
- name: "AsianMedia" # 亚洲流媒体服务
type: select
proxies:
- "DIRECT"
- "KOR"
- "JPN"
- "USA"
- name: "GlobalMedia" # 国际流媒体服务
type: select
proxies:
- "KOR"
- "JPN"
- "USA"
- "DIRECT"
- name: "Static" # 静态IP模式,支付类网站ip变动容易被风控
type: select
proxies:
- "US-Ashburn-01"
- name: "USA" # 美国节点
type: url-test
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- "US-Ashburn-01"
- "US-Ashburn-02"
- name: "JPN" # 日本节点
type: url-test
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- "JP-Tokyo-01"
- "JP-Tokyo-02"
- name: "KOR" # 韩国节点
type: url-test
url: 'http://www.gstatic.com/generate_204'
interval: 300
proxies:
- "KR-Seoul-01"
- "KR-Seoul-02"
prefix-rules: # 前置规则
# 绕过代理
- DST-PORT,22,DIRECT # SSH
- SRC-PORT,51413,DIRECT # Transmission
# 负载均衡
- SRC-IP-CIDR,192.168.0.110/32,Load-Balance
- SRC-IP-CIDR,192.168.0.111/32,Load-Balance
- SRC-IP-CIDR,192.168.0.112/32,Load-Balance
- SRC-IP-CIDR,192.168.0.113/32,Load-Balance
# 特殊规则
- DOMAIN-SUFFIX,synocommunity.com,Proxy
suffix-rules: # 后置规则
# 绕过代理
- SRC-IP-CIDR,192.168.0.2/32,DIRECT # Synology
rulesets:
# PayPal
- name: "PayPal"
group: "Static"
ruleset: "rules/martincz/PayPal/PayPal.yaml"
# AppleTV
- name: "AppleTV"
group: "GlobalMedia"
ruleset: "rules/blackmatrix7/AppleTV/AppleTV.yaml"
# GitHub
- name: "GitHub"
group: "Proxy"
ruleset: "rules/blackmatrix7/GitHub/GitHub.yaml"
# Developer
- name: "Developer"
group: "Proxy"
ruleset: "rules/blackmatrix7/Developer/Developer.yaml"
# PlayStation
- name: "PlayStation"
group: "DIRECT"
ruleset: "rules/blackmatrix7/PlayStation/PlayStation.yaml"
# Nintendo
- name: "Nintendo"
group: "DIRECT"
ruleset: "rules/blackmatrix7/Nintendo/Nintendo.yaml"
dns: