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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[common]
|
2 |
+
;API mode, set to true to prevent loading local subscriptions or serving local files directly
|
3 |
+
api_mode=true
|
4 |
+
|
5 |
+
;Access token used for performing critical action through Web interface
|
6 |
+
api_access_token=${SUB_PWD}
|
7 |
+
|
8 |
+
;Default URLs, used when no URL is provided in request, use "|" to separate multiple subscription links, supports local files/URL
|
9 |
+
default_url=
|
10 |
+
|
11 |
+
;Insert subscription links to requests. Can be used to add node(s) to all exported subscriptions.
|
12 |
+
enable_insert=true
|
13 |
+
;URLs to insert to subscription links, use "|" to separate multiple subscription links, supports local files/URL
|
14 |
+
insert_url=
|
15 |
+
;Prepend inserted URLs to subscription links. Nodes in insert_url will be added to groups first with non-group-specific match pattern.
|
16 |
+
prepend_insert_url=true
|
17 |
+
|
18 |
+
;Exclude nodes which remarks match the following patterns. Supports regular expression.
|
19 |
+
exclude_remarks=(到期|剩余流量|时间|官网|产品|平台)
|
20 |
+
;exclude_remarks=(other rule)
|
21 |
+
|
22 |
+
;Only include nodes which remarks match the following patterns. Supports regular expression.
|
23 |
+
;include_remarks=V3.*港
|
24 |
+
|
25 |
+
;Enable script support for filtering nodes
|
26 |
+
enable_filter=false
|
27 |
+
;Script used for filtering nodes. Supports inline script and script path. A "filter" function with 1 argument which is a node should be defined in the script.
|
28 |
+
;Example: Inline script: Set value to content of script. Replace all line break with "\n".
|
29 |
+
; Script path: Set value to "path:/path/to/script.js".
|
30 |
+
;filter_script=function filter(node) {\n const info = JSON.parse(node.ProxyInfo);\n if(info.EncryptMethod.includes('chacha20'))\n return true;\n return false;\n}
|
31 |
+
|
32 |
+
;Setting an external config file as default when none is specified, supports local files/URL
|
33 |
+
;default_external_config=config/example_external_config.ini
|
34 |
+
|
35 |
+
;The file scope limit of the 'rule_base' options in external configs.
|
36 |
+
base_path=base
|
37 |
+
|
38 |
+
;Clash config base used by the generator, supports local files/URL
|
39 |
+
clash_rule_base=base/all_base.tpl
|
40 |
+
|
41 |
+
;Surge config base used by the generator, supports local files/URL
|
42 |
+
surge_rule_base=base/all_base.tpl
|
43 |
+
|
44 |
+
;Surfboard config base used by the generator, supports local files/URL
|
45 |
+
surfboard_rule_base=base/all_base.tpl
|
46 |
+
|
47 |
+
;Mellow config base used by the generator, supports local files/URL
|
48 |
+
mellow_rule_base=base/all_base.tpl
|
49 |
+
|
50 |
+
;Quantumult config base used by the generator, supports local files/URL
|
51 |
+
quan_rule_base=base/all_base.tpl
|
52 |
+
|
53 |
+
;Quantumult X config base used by the generator, supports local files/URL
|
54 |
+
quanx_rule_base=base/all_base.tpl
|
55 |
+
|
56 |
+
;Loon config base used by the generator, supports local files/URL
|
57 |
+
loon_rule_base=base/all_base.tpl
|
58 |
+
|
59 |
+
;Shadowsocks Android config base used by the generator, supports local files/URL
|
60 |
+
sssub_rule_base=base/all_base.tpl
|
61 |
+
|
62 |
+
;Proxy used to download configs, rulesets or subscriptions, set to NONE or empty to disable it, set to SYSTEM to use system proxy.
|
63 |
+
;Accept cURL-supported proxies (http:// https:// socks4a:// socks5://)
|
64 |
+
;Additional support for CORS proxy ( https://github.com/Rob--W/cors-anywhere https://github.com/Zibri/cloudflare-cors-anywhere etc.), prefix the address with "cors:" to recognize the address as CORS proxy.
|
65 |
+
;Example: http://127.0.0.1:80 socks5://example.com:1080 cors:https://cors-anywhere.herokuapp.com/
|
66 |
+
proxy_config=SYSTEM
|
67 |
+
proxy_ruleset=SYSTEM
|
68 |
+
proxy_subscription=NONE
|
69 |
+
|
70 |
+
;Append a proxy type string ([SS] [SSR] [VMess]) to node remark.
|
71 |
+
append_proxy_type=false
|
72 |
+
|
73 |
+
[userinfo]
|
74 |
+
;Rules to extract stream data from node
|
75 |
+
;Format: full_match_regex|new_format_regex
|
76 |
+
;where new_format_regex should be like "total=$1&left=$2&used=$3"
|
77 |
+
stream_rule=^剩余流量:(.*?)\|总流量:(.*)$|total=$2&left=$1
|
78 |
+
stream_rule=^剩余流量:(.*?) (.*)$|total=$1&left=$2
|
79 |
+
stream_rule=^Bandwidth: (.*?)/(.*)$|used=$1&total=$2
|
80 |
+
stream_rule=^\[.*?\]剩余(.*?)@(?:.*)$|total=$1
|
81 |
+
stream_rule=^.*?流量:(.*?) 剩:(?:.*)$|total=$1
|
82 |
+
|
83 |
+
;Rules to extract expire time data from node
|
84 |
+
;Format: full_match_regex|new_format_regex
|
85 |
+
;where new_format_regex should follow this example: yyyy:mm:dd:hh:mm:ss
|
86 |
+
time_rule=^过期时间:(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$|$1:$2:$3:$4:$5:$6
|
87 |
+
time_rule=^到期时间(:|:)(\d+)-(\d+)-(\d+)$|$1:$2:$3:0:0:0
|
88 |
+
time_rule=^Smart Access expire: (\d+)/(\d+)/(\d+)$|$1:$2:$3:0:0:0
|
89 |
+
time_rule=^.*?流量:(?:.*?) 剩:(.*)$|left=$1d
|
90 |
+
|
91 |
+
[node_pref]
|
92 |
+
;udp_flag=false
|
93 |
+
;tcp_fast_open_flag=false
|
94 |
+
;skip_cert_verify_flag=false
|
95 |
+
;tls13_flag=false
|
96 |
+
|
97 |
+
sort_flag=false
|
98 |
+
;Script used for sorting nodes. A "compare" function with 2 arguments which are the 2 nodes to be compared should be defined in the script. Supports inline script and script path.
|
99 |
+
;Examples can be seen at the filter_script option in [common] section.
|
100 |
+
;sort_script=function compare(node_a, node_b) {\n const info_a = JSON.parse(node_a.ProxyInfo);\n const info_b = JSON.parse(node_b.ProxyInfo);\n return info_a.Remark > info_b.Remark;\n}
|
101 |
+
|
102 |
+
filter_deprecated_nodes=false
|
103 |
+
append_sub_userinfo=true
|
104 |
+
clash_use_new_field_name=true
|
105 |
+
|
106 |
+
;Generate style of the proxies section of Clash subscriptions.
|
107 |
+
;Supported styles: block, flow, compact
|
108 |
+
;Block: - name: name1 Flow: - {name: name1, key: value} Compact: [{name: name1, key: value},{name: name2, key: value}]
|
109 |
+
; key: value - {name: name2, key: value}
|
110 |
+
; - name: name2
|
111 |
+
; key: value
|
112 |
+
clash_proxies_style=flow
|
113 |
+
|
114 |
+
;Rename remarks with the following patterns. Supports regular expression.
|
115 |
+
;Format: Search_Pattern@Replace_Pattern
|
116 |
+
;rename_node=IPLC@专线
|
117 |
+
;rename_node=RELAY@中转
|
118 |
+
;rename_node=BGP-@
|
119 |
+
;rename_node=!!script:function rename(node) {\n const info = JSON.parse(node.ProxyInfo);\n const geoinfo = JSON.parse(geoip(info.Hostname));\n if(geoinfo.country_code == "CN")\n return "CN " + node.Remark;\n}
|
120 |
+
;rename_node=!!script:path:/path/to/script.js
|
121 |
+
|
122 |
+
rename_node=!!import:snippets/rename_node.txt
|
123 |
+
|
124 |
+
[managed_config]
|
125 |
+
;Append a '#!MANAGED-CONFIG' info to Surge configurations
|
126 |
+
write_managed_config=true
|
127 |
+
|
128 |
+
;Address prefix for MANAGED-CONFIG info, without the trailing "/".
|
129 |
+
;This address will also be used for generating /getruleset, /qx-rewrite, /qx-script addresses.
|
130 |
+
managed_config_prefix=http://127.0.0.1:25500
|
131 |
+
|
132 |
+
;Managed config update interval in seconds, determine how long the config will be updated.
|
133 |
+
config_update_interval=86400
|
134 |
+
|
135 |
+
;If config_update_strict is set to true, Surge will require a force update after the interval.
|
136 |
+
config_update_strict=false
|
137 |
+
|
138 |
+
;Device ID to be written to rewrite scripts for some version of Quantumult X
|
139 |
+
quanx_device_id=
|
140 |
+
|
141 |
+
[surge_external_proxy]
|
142 |
+
;surge_ssr_path=/usr/bin/ssr-local
|
143 |
+
resolve_hostname=true
|
144 |
+
|
145 |
+
[emojis]
|
146 |
+
add_emoji=true
|
147 |
+
remove_old_emoji=true
|
148 |
+
|
149 |
+
;Rule to add emojis. Supports regular expression.
|
150 |
+
;Format: Remark_Search_Pattern,emoji
|
151 |
+
|
152 |
+
;rule=(流量|时间|应急|过期|Bandwidth|expire),🏳️🌈
|
153 |
+
;rule=AC,🇦🇨
|
154 |
+
;rule=!!script:function getEmoji(node) {\n const info = JSON.parse(node.ProxyInfo);\n const geoinfo = JSON.parse(geoip(info.Hostname));\n if(geoinfo.country_code == "CN")\n return "🏳️🌈";\n}
|
155 |
+
;rule=!!script:path:/path/to/script/.js
|
156 |
+
|
157 |
+
rule=!!import:snippets/emoji.txt
|
158 |
+
|
159 |
+
[rulesets]
|
160 |
+
;Enable generating rules with rulesets
|
161 |
+
enabled=true
|
162 |
+
|
163 |
+
;Overwrite the existing rules in rule_base
|
164 |
+
overwrite_original_rules=false
|
165 |
+
|
166 |
+
;Perform a ruleset update on request
|
167 |
+
update_ruleset_on_request=false
|
168 |
+
|
169 |
+
;Ruleset addresses, supports local files/URL
|
170 |
+
;Format: Group name,[type:]URL[,interval]
|
171 |
+
; Group name,[]Rule
|
172 |
+
;where "type" supports the following value: surge, quanx, clash-domain, clash-ipcidr, clash-classic
|
173 |
+
;type defaults to surge if omitted
|
174 |
+
|
175 |
+
;ruleset=DIRECT,https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Guard/Unbreak.list,86400
|
176 |
+
;ruleset=🎯 全球直连,rules/LocalAreaNetwork.list
|
177 |
+
;ruleset=DIRECT,surge:rules/LocalAreaNetwork.list
|
178 |
+
;ruleset=Advertising,quanx:https://raw.githubusercontent.com/DivineEngine/Profiles/master/Quantumult/Filter/Guard/Advertising.list,86400
|
179 |
+
;ruleset=Domestic Services,clash-domain:https://ruleset.dev/clash_domestic_services_domains,86400
|
180 |
+
;ruleset=Domestic Services,clash-ipcidr:https://ruleset.dev/clash_domestic_services_ips,86400
|
181 |
+
;ruleset=DIRECT,clash-classic:https://raw.githubusercontent.com/DivineEngine/Profiles/master/Clash/RuleSet/China.yaml,86400
|
182 |
+
;ruleset=🎯 全球直连,[]GEOIP,CN
|
183 |
+
;ruleset=🐟 漏网之鱼,[]FINAL
|
184 |
+
|
185 |
+
ruleset=!!import:snippets/rulesets.txt
|
186 |
+
|
187 |
+
[proxy_groups]
|
188 |
+
;Generate Clash Proxy Group with the following patterns. Node filtering rule supports regular expression.
|
189 |
+
;Format: Group_Name`select`Rule_1`Rule_2`...
|
190 |
+
; Group_Name`url-test|fallback|load-balance`Rule_1`Rule_2`...`test_url`interval[,timeout][,tolerance]
|
191 |
+
;Rule with "[]" prefix will be added directly.
|
192 |
+
|
193 |
+
;custom_proxy_group=Proxy`select`.*`[]AUTO`[]DIRECT`.*
|
194 |
+
;custom_proxy_group=UrlTest`url-test`.*`http://www.gstatic.com/generate_204`300,5,100
|
195 |
+
;custom_proxy_group=FallBack`fallback`.*`http://www.gstatic.com/generate_204`300,5
|
196 |
+
;custom_proxy_group=LoadBalance`load-balance`.*`http://www.gstatic.com/generate_204`300,,100
|
197 |
+
;custom_proxy_group=SSID`ssid`default_group`celluar=group0,ssid1=group1,ssid2=group2
|
198 |
+
|
199 |
+
;custom_proxy_group=g1`select`!!GROUPID=0
|
200 |
+
;custom_proxy_group=g2`select`!!GROUPID=1
|
201 |
+
;custom_proxy_group=v2ray`select`!!GROUP=V2RayProvider
|
202 |
+
|
203 |
+
;custom_proxy_group=g1hk`select`!!GROUPID=0!!(HGC|HKBN|PCCW|HKT|hk|港)
|
204 |
+
;custom_proxy_group=sstw`select`!!GROUP=V2RayProvider!!(深台|彰化|新北|台|tw)
|
205 |
+
;custom_proxy_group=provider`select`!!PROVIDER=prov1,prov2,prov3`fallback_nodes
|
206 |
+
|
207 |
+
;Also supports using script for filtering nodes. A "filter" function with one argument which is an array of all available nodes should be defined in the script.
|
208 |
+
;custom_proxy_group=script`select`script:/path/to/script.js
|
209 |
+
|
210 |
+
;for forcerule.yml
|
211 |
+
;custom_proxy_group=!!import:snippets/groups_forcerule.txt
|
212 |
+
|
213 |
+
;for Surge rulesets
|
214 |
+
custom_proxy_group=!!import:snippets/groups.txt
|
215 |
+
|
216 |
+
[template]
|
217 |
+
;The file scope limit of 'include' statement inside the templates.
|
218 |
+
template_path=
|
219 |
+
|
220 |
+
;The following settings will be added to the "global" scope of the template variables
|
221 |
+
;Value of 'clash.http_port' can be accessed with 'global.clash.http_port' in the template.
|
222 |
+
clash.http_port=7890
|
223 |
+
clash.socks_port=7891
|
224 |
+
clash.allow_lan=true
|
225 |
+
clash.log_level=info
|
226 |
+
|
227 |
+
[aliases]
|
228 |
+
;Aliases for accessing interfaces. Can be used to shorten the URI.
|
229 |
+
;All arguments passed when accessing the alias name will be appended to the arguments of the alias target.
|
230 |
+
;Format: uri=target
|
231 |
+
/v=/version
|
232 |
+
/clash=/sub?target=clash
|
233 |
+
/clashr=/sub?target=clashr
|
234 |
+
/surge=/sub?target=surge
|
235 |
+
/quan=/sub?target=quan
|
236 |
+
/quanx=/sub?target=quanx
|
237 |
+
/mellow=/sub?target=mellow
|
238 |
+
/surfboard=/sub?target=surfboard
|
239 |
+
/loon=/sub?target=loon
|
240 |
+
/ss=/sub?target=ss
|
241 |
+
/ssd=/sub?target=ssd
|
242 |
+
/sssub=/sub?target=sssub
|
243 |
+
/ssr=/sub?target=ssr
|
244 |
+
/v2ray=/sub?target=v2ray
|
245 |
+
/trojan=/sub?target=trojan
|
246 |
+
|
247 |
+
[tasks]
|
248 |
+
;Tasks to be run regularly during server execution.
|
249 |
+
;Format: Name`Cron_Expression`JS_Path`Timeout_in_seconds
|
250 |
+
;task=tick`0/10 * * * * ?`tick.js`3
|
251 |
+
|
252 |
+
[server]
|
253 |
+
;Address to bind on for Web Server
|
254 |
+
listen=0.0.0.0
|
255 |
+
|
256 |
+
;Port to bind on for Web Server
|
257 |
+
port=25500
|
258 |
+
|
259 |
+
;Root folder for web server, keep empty to disable
|
260 |
+
serve_file_root=
|
261 |
+
|
262 |
+
[advanced]
|
263 |
+
log_level=info
|
264 |
+
print_debug_info=false
|
265 |
+
max_pending_connections=10240
|
266 |
+
max_concurrent_threads=2
|
267 |
+
max_allowed_rulesets=0
|
268 |
+
max_allowed_rules=0
|
269 |
+
max_allowed_download_size=0
|
270 |
+
enable_cache=false
|
271 |
+
cache_subscription=60
|
272 |
+
cache_config=300
|
273 |
+
cache_ruleset=21600
|
274 |
+
script_clean_context=true
|
275 |
+
async_fetch_ruleset=false
|
276 |
+
skip_failed_links=false
|