Compare commits

...

1 Commits
v0.5.5 ... fix

Author SHA1 Message Date
Andrey Petelin
5ecb6ef997 fix: Remove URL fragment before parsing VLESS links 2025-09-18 12:59:17 +05:00
2 changed files with 8 additions and 0 deletions

View File

@@ -184,6 +184,13 @@ url_get_file_extension() {
esac esac
} }
# Remove url fragment (everything after the first '#')
url_strip_fragment() {
local url="$1"
echo "${url%%#*}"
}
# Decodes and returns a base64-encoded string # Decodes and returns a base64-encoded string
base64_decode() { base64_decode() {
local str="$1" local str="$1"

View File

@@ -62,6 +62,7 @@ sing_box_cf_add_proxy_outbound() {
local udp_over_tcp="$4" local udp_over_tcp="$4"
url=$(url_decode "$url") url=$(url_decode "$url")
url=$(url_strip_fragment "$url")
local scheme="${url%%://*}" local scheme="${url%%://*}"
case "$scheme" in case "$scheme" in