ZSCGR commited on
Commit
de6a3bb
·
verified ·
1 Parent(s): b776048

Rename pref.ini to pref.toml

Browse files
Files changed (2) hide show
  1. pref.ini +0 -276
  2. pref.toml +348 -0
pref.ini DELETED
@@ -1,276 +0,0 @@
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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
pref.toml ADDED
@@ -0,0 +1,348 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ version = 1
2
+ [common]
3
+ # API mode, set to true to prevent loading local subscriptions or serving local files directly
4
+ api_mode = true
5
+
6
+ # Access token used for performing critical action through Web interface
7
+ api_access_token = ${SUB_PWD}
8
+
9
+ # Default URLs, used when no URL is provided in request, use "|" to separate multiple subscription links, supports local files/URL
10
+ default_url = []
11
+
12
+ # Insert subscription links to requests. Can be used to add node(s) to all exported subscriptions.
13
+ enable_insert = true
14
+ # URLs to insert before subscription links, can be used to add node(s) to all exported subscriptions, supports local files/URL
15
+ insert_url = [""]
16
+ # Prepend inserted URLs to subscription links. Nodes in insert_url will be added to groups first with non-group-specific match pattern.
17
+ prepend_insert_url = true
18
+
19
+ # Exclude nodes which remarks match the following patterns. Supports regular expression.
20
+ exclude_remarks = ["(到期|剩余流量|时间|官网|产品)"]
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.
29
+ # Script path: set value to "path:/path/to/script.js".
30
+ #filter_script = '''
31
+ #function filter(node) {
32
+ # const info = JSON.parse(node.ProxyInfo);
33
+ # if(info.EncryptMethod.includes('chacha20'))
34
+ # return true;
35
+ # return false;
36
+ #}
37
+ #'''
38
+
39
+ # Setting an external config file as default when none is specified, supports local files/URL
40
+ # default_external_config = "config/example_external_config.toml"
41
+
42
+ # The file scope limit of the 'rule_base' options in external configs.
43
+ base_path = "base"
44
+
45
+ # Clash config base used by the generator, supports local files/URL
46
+ clash_rule_base = "base/all_base.tpl"
47
+
48
+ # Surge config base used by the generator, supports local files/URL
49
+ surge_rule_base = "base/all_base.tpl"
50
+
51
+ # Surfboard config base used by the generator, supports local files/URL
52
+ surfboard_rule_base = "base/all_base.tpl"
53
+
54
+ # Mellow config base used by the generator, supports local files/URL
55
+ mellow_rule_base = "base/all_base.tpl"
56
+
57
+ # Quantumult config base used by the generator, supports local files/URL
58
+ quan_rule_base = "base/all_base.tpl"
59
+
60
+ # Quantumult X config base used by the generator, supports local files/URL
61
+ quanx_rule_base = "base/all_base.tpl"
62
+
63
+ # Loon config base used by the generator, supports local files/URL
64
+ loon_rule_base = "base/all_base.tpl"
65
+
66
+ # Shadowsocks Android config base used by the generator, supports local files/URL
67
+ sssub_rule_base = "base/all_base.tpl"
68
+
69
+ # sing-box config base used by the generator, supports local files/URL
70
+ singbox_rule_base = "base/all_base.tpl"
71
+
72
+ # Proxy used to download rulesets or subscriptions, set to NONE or empty to disable it, set to SYSTEM to use system proxy.
73
+ # Accept cURL-supported proxies (http:// https:// socks4a:// socks5://)
74
+
75
+ proxy_config = "SYSTEM"
76
+ proxy_ruleset = "SYSTEM"
77
+ proxy_subscription = "NONE"
78
+
79
+ # Append a proxy type string ([SS] [SSR] [VMess]) to node remark.
80
+ append_proxy_type = false
81
+
82
+ # When requesting /sub, reload this config file first.
83
+ reload_conf_on_request = false
84
+
85
+ [[userinfo.stream_rule]]
86
+ # Rules to extract stream data from node
87
+ # Format: full_match_regex|new_format_regex
88
+ # where new_format_regex should be like "total=$1&left=$2&used=$3"
89
+ match = '^剩余流量:(.*?)\|总流量:(.*)$'
90
+ replace = 'total=$2&left=$1'
91
+
92
+ [[userinfo.stream_rule]]
93
+ match = '^剩余流量:(.*?) (.*)$'
94
+ replace = 'total=$1&left=$2'
95
+
96
+ [[userinfo.stream_rule]]
97
+ match = '^Bandwidth: (.*?)/(.*)$'
98
+ replace = 'used=$1&total=$2'
99
+
100
+ [[userinfo.stream_rule]]
101
+ match = '^.*剩余(.*?)(?:\s*?)@(?:.*)$'
102
+ replace = 'total=$1'
103
+
104
+ [[userinfo.time_rule]]
105
+ # Rules to extract expire time data from node
106
+ # Format: full_match_regex|new_format_regex
107
+ # where new_format_regex should follow this example: yyyy:mm:dd:hh:mm:ss
108
+ match = '^过期时间:(\d+)-(\d+)-(\d+) (\d+):(\d+):(\d+)$'
109
+ replace = '$1:$2:$3:$4:$5:$6'
110
+
111
+ [[userinfo.time_rule]]
112
+ match = '^到期时间:(\d+)-(\d+)-(\d+)$'
113
+ replace = '$1:$2:$3:0:0:0'
114
+
115
+ [[userinfo.time_rule]]
116
+ match = '^Smart Access expire: (\d+)/(\d+)/(\d+)$'
117
+ replace = '$1:$2:$3:0:0:0'
118
+
119
+ [node_pref]
120
+ #udp_flag = false
121
+ #tcp_fast_open_flag = false
122
+ #skip_cert_verify_flag = false
123
+ #tls13_flag = false
124
+
125
+ sort_flag = false
126
+ # 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.
127
+ # Examples can be seen at the filter_script option in [common] section.
128
+ #sort_script = '''
129
+ #function compare(node_a, node_b) {
130
+ # return info_a.Remark > info_b.Remark;
131
+ #}
132
+ #'''
133
+
134
+ filter_deprecated_nodes = false
135
+ append_sub_userinfo = true
136
+ clash_use_new_field_name = true
137
+
138
+ # Generate style of the proxies and proxy groups section of Clash subscriptions.
139
+ # Supported styles: block, flow, compact
140
+ # Block: - name: name1 Flow: - {name: name1, key: value} Compact: [{name: name1, key: value},{name: name2, key: value}]
141
+ # key: value - {name: name2, key: value}
142
+ # - name: name2
143
+ # key: value
144
+ clash_proxies_style = "flow"
145
+ clash_proxy_groups_style = "block"
146
+
147
+ # add Clash mode to sing-box rules, and add a GLOBAL group to end of outbounds
148
+ singbox_add_clash_modes = true
149
+
150
+ [[node_pref.rename_node]]
151
+ match = '\(?((x|X)?(\d+)(\.?\d+)?)((\s?倍率?)|(x|X))\)?'
152
+ replace = "$1x"
153
+
154
+ [managed_config]
155
+ # Append a '#!MANAGED-CONFIG' info to Surge configurations
156
+ write_managed_config = true
157
+
158
+ # Address prefix for MANAGED-CONFIG info, without the trailing "/".
159
+ managed_config_prefix = "http://127.0.0.1:25500"
160
+
161
+ # Managed config update interval in seconds, determine how long the config will be updated.
162
+ config_update_interval = 86400
163
+
164
+ # If config_update_strict is set to true, Surge will require a force update after the interval.
165
+ config_update_strict = false
166
+
167
+ # Device ID to be written to rewrite scripts for some version of Quantumult X
168
+ quanx_device_id = ""
169
+
170
+ [surge_external_proxy]
171
+ #surge_ssr_path = "/usr/bin/ssr-local"
172
+ resolve_hostname = true
173
+
174
+ [emojis]
175
+ add_emoji = false
176
+ remove_old_emoji = true
177
+
178
+ [[emojis.emoji]]
179
+ #match = '(流量|时间|应急)'
180
+ #emoji = '🏳️‍🌈'
181
+ import = "snippets/emoji.toml"
182
+
183
+ # [[custom_groups]]
184
+ # name = "Auto"
185
+ # type = "url-test"
186
+ # rule = [".*"]
187
+ # url = "http://www.gstatic.com/generate_204"
188
+ # interval = 300
189
+ # tolerance = 150
190
+ # lazy = true
191
+
192
+ # [[custom_groups]]
193
+ # name = "Proxy"
194
+ # type = "select"
195
+ # rule = [".*", "[]DIRECT"]
196
+ # disable_udp = false
197
+
198
+ # [[custom_groups]]
199
+ # name = "LoadBalance"
200
+ # type = "load-balance"
201
+ # rule = [".*", "[]Proxy", "[]DIRECT"]
202
+ # interval = 100
203
+ # strategy = "consistent-hashing"
204
+ # url = "http://www.gstatic.com/generate_204"
205
+
206
+ [[custom_groups]]
207
+ import = "snippets/groups.toml"
208
+
209
+ [ruleset]
210
+ # Enable generating rules with rulesets
211
+ enabled = true
212
+
213
+ # Overwrite the existing rules in rule_base
214
+ overwrite_original_rules = false
215
+
216
+ # Perform a ruleset update on request
217
+ update_ruleset_on_request = false
218
+
219
+ # [[rulesets]]
220
+ # group = "Proxy"
221
+ # ruleset = "https://raw.githubusercontent.com/DivineEngine/Profiles/master/Surge/Ruleset/Unbreak.list"
222
+ # type = "surge-ruleset"
223
+ # interval = 86400
224
+
225
+ [[rulesets]]
226
+ import = "snippets/rulesets.toml"
227
+
228
+ [template]
229
+ template_path = ""
230
+
231
+ [[template.globals]]
232
+ key = "clash.http_port"
233
+ value = "7890"
234
+
235
+ [[template.globals]]
236
+ key = "clash.socks_port"
237
+ value = "7891"
238
+
239
+ [[template.globals]]
240
+ key = "clash.allow_lan"
241
+ value = "true"
242
+
243
+ [[template.globals]]
244
+ key = "clash.log_level"
245
+ value = "info"
246
+
247
+ [[template.globals]]
248
+ key = "clash.external_controller"
249
+ value = "127.0.0.1:9090"
250
+
251
+ [[template.globals]]
252
+ key = "singbox.allow_lan"
253
+ value = "true"
254
+
255
+ [[template.globals]]
256
+ key = "singbox.mixed_port"
257
+ value = "2080"
258
+
259
+ [[aliases]]
260
+ uri = "/clash"
261
+ target = "/sub?target=clash"
262
+
263
+ [[aliases]]
264
+ uri = "/clashr"
265
+ target = "/sub?target=clashr"
266
+
267
+ [[aliases]]
268
+ uri = "/surge"
269
+ target = "/sub?target=surge"
270
+
271
+ [[aliases]]
272
+ uri = "/quan"
273
+ target = "/sub?target=quan"
274
+
275
+ [[aliases]]
276
+ uri = "/quanx"
277
+ target = "/sub?target=quanx"
278
+
279
+ [[aliases]]
280
+ uri = "/mellow"
281
+ target = "/sub?target=mellow"
282
+
283
+ [[aliases]]
284
+ uri = "/surfboard"
285
+ target = "/sub?target=surfboard"
286
+
287
+ [[aliases]]
288
+ uri = "/loon"
289
+ target = "/sub?target=loon"
290
+
291
+ [[aliases]]
292
+ uri = "/singbox"
293
+ target = "/sub?target=singbox"
294
+
295
+ [[aliases]]
296
+ uri = "/ss"
297
+ target = "/sub?target=ss"
298
+
299
+ [[aliases]]
300
+ uri = "/ssd"
301
+ target = "/sub?target=ssd"
302
+
303
+ [[aliases]]
304
+ uri = "/sssub"
305
+ target = "/sub?target=sssub"
306
+
307
+ [[aliases]]
308
+ uri = "/ssr"
309
+ target = "/sub?target=ssr"
310
+
311
+ [[aliases]]
312
+ uri = "/v2ray"
313
+ target = "/sub?target=v2ray"
314
+
315
+ [[aliases]]
316
+ uri = "/trojan"
317
+ target = "/sub?target=trojan"
318
+
319
+ [[aliases]]
320
+ uri = "/test"
321
+ target = "/render?path=templates/test.tpl"
322
+
323
+ #[[tasks]]
324
+ #name = "tick"
325
+ #cronexp = "0/10 * * * * ?"
326
+ #path = "tick.js"
327
+ #timeout = 3
328
+
329
+ [server]
330
+ listen = "0.0.0.0"
331
+ port = 25500
332
+ serve_file_root = "web"
333
+
334
+ [advanced]
335
+ log_level = "debug"
336
+ print_debug_info = true
337
+ max_pending_connections = 10240
338
+ max_concurrent_threads = 4
339
+ max_allowed_rulesets = 64
340
+ max_allowed_rules = 0
341
+ max_allowed_download_size = 0
342
+ enable_cache = true
343
+ cache_subscription = 60
344
+ cache_config = 300
345
+ cache_ruleset = 21600
346
+ script_clean_context = true
347
+ async_fetch_ruleset = false
348
+ skip_failed_links = true