feat: update proxy ui to accept credential outside url too

This commit is contained in:
zhom
2025-06-11 01:55:54 +04:00
parent 4d7bbe719f
commit 29c329b432
10 changed files with 375 additions and 236 deletions
+1 -12
View File
@@ -1,14 +1,3 @@
function FindProxyForURL(url, host) {
const proxyString = "{{proxy_url}}";
// Split the proxy string to get the credentials part
const parts = proxyString.split(" ")[1].split("@");
if (parts.length > 1) {
const credentials = parts[0];
const encodedCredentials = encodeURIComponent(credentials);
// Replace the original credentials with encoded ones
return proxyString.replace(credentials, encodedCredentials);
}
return proxyString;
return "{{proxy_url}}";
}