looking better
This commit is contained in:
parent
3ebe1178f4
commit
5c4dac8f27
25 changed files with 232 additions and 416 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue