Skip to content

Commit 6a3acff

Browse files
committed
box.tool(subs): extend protocol detection & clarify error log
1 parent cf3e360 commit 6a3acff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

box/scripts/box.tool

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,7 +439,7 @@ upsubs() {
439439
log Info "Update subscription $(date +"%F %R")"
440440
[ -f "${update_file_name}.bak" ] && rm "${update_file_name}.bak"
441441

442-
elif ${yq} '.. | select(tag == "!!str")' "${update_file_name}" | grep -qE "vless://|vmess://|ss://|hysteria://|trojan://"; then
442+
elif ${yq} '.. | select(tag == "!!str")' "${update_file_name}" | grep -qE "vless://|vmess://|ss://|hysteria2://|hysteria://|trojan://|tuic://|wireguard://|socks5://|http://|snell://|mieru://|anytls://"; then
443443
mv "${update_file_name}" "${clash_provide_config}"
444444
elif grep -qE '^[A-Za-z0-9+/=[:space:]]+$' "$update_file_name"; then
445445
if busybox base64 -d "$update_file_name" >/dev/null 2>&1; then
@@ -450,7 +450,7 @@ upsubs() {
450450
return 1
451451
fi
452452
else
453-
log Error "${update_file_name} update subscription failed"
453+
log Error "${update_file_name} Unknown file format: cannot detect proxies, subscription URLs, or valid Base64"
454454
return 1
455455
fi
456456

0 commit comments

Comments
 (0)