feat: return proxy based on port

This commit is contained in:
karishmas6
2024-10-26 19:32:22 +05:30
parent 4ad1f70127
commit 4a6fa4b7cf

View File

@@ -149,7 +149,11 @@ const maskProxyUrl = (url: string) => {
const urlWithoutProtocol = url.replace(/^https?:\/\//, '').replace(/^socks5?:\/\//, ''); // Remove protocols
const [domain, port] = urlWithoutProtocol.split(':');
const maskedDomain = `${domain.slice(0, 3)}****${domain.slice(-3)}`; // Shows first and last 3 characters
return `${maskedDomain}:${port}`;
if (port) {
return `${maskedDomain}:${port}`;
} else {
return maskedDomain;
}
};
// TODO: Move this from here