mirror of
https://github.com/UrloMythus/UnHided.git
synced 2026-04-11 11:50:51 +00:00
Update to the newest MFP version, including the Vixcloud PR
This commit is contained in:
@@ -330,15 +330,25 @@ def encode_mediaflow_proxy_url(
|
||||
# Handle encryption if needed
|
||||
if encryption_handler:
|
||||
encrypted_token = encryption_handler.encrypt_data(query_params, expiration, ip)
|
||||
# Build the URL with token in path
|
||||
path_parts = [base_url, f"_token_{encrypted_token}"]
|
||||
|
||||
# Parse the base URL to get its components
|
||||
parsed_url = parse.urlparse(base_url)
|
||||
|
||||
# Insert the token at the beginning of the path
|
||||
new_path = f"/_token_{encrypted_token}{parsed_url.path}"
|
||||
|
||||
# Reconstruct the URL with the token at the beginning of the path
|
||||
url_parts = list(parsed_url)
|
||||
url_parts[2] = new_path # Update the path component
|
||||
|
||||
# Build the URL
|
||||
url = parse.urlunparse(url_parts)
|
||||
|
||||
# Add filename at the end if provided
|
||||
if filename:
|
||||
path_parts.append(parse.quote(filename))
|
||||
|
||||
return "/".join(path_parts)
|
||||
url = f"{url}/{parse.quote(filename)}"
|
||||
|
||||
return url
|
||||
else:
|
||||
# No encryption, use regular query parameters
|
||||
url = base_url
|
||||
|
||||
Reference in New Issue
Block a user