looking better

This commit is contained in:
Boki 2025-06-18 22:46:29 -04:00
parent 3ebe1178f4
commit 5c4dac8f27
25 changed files with 232 additions and 416 deletions

View file

@ -45,7 +45,10 @@ export function getProxyURL(): string | null {
const proxy = proxies[currentIndex];
currentIndex = (currentIndex + 1) % proxies.length;
if (!proxy) {
return null;
}
// Ensure the proxy URL is in http://host:port format
return proxy;
}
@ -72,7 +75,11 @@ export function getRandomProxyURL(): string | null {
}
const randomIndex = Math.floor(Math.random() * proxies.length);
return proxies[randomIndex];
const proxy = proxies[randomIndex];
if (!proxy) {
return null;
}
return proxy;
}
/**