mirror of
https://github.com/knightcrawler-stremio/knightcrawler.git
synced 2024-12-20 03:29:51 +00:00
[addon] logs current proxy host
This commit is contained in:
@@ -11,7 +11,9 @@ function getRandomUserAgent() {
|
|||||||
|
|
||||||
function getRandomProxy() {
|
function getRandomProxy() {
|
||||||
if (PROXY_HOSTS && PROXY_HOSTS.length && PROXY_USERNAME && PROXY_PASSWORD) {
|
if (PROXY_HOSTS && PROXY_HOSTS.length && PROXY_USERNAME && PROXY_PASSWORD) {
|
||||||
return `http://${PROXY_USERNAME}:${PROXY_PASSWORD}@${PROXY_HOSTS[Math.floor(Math.random() * PROXY_HOSTS.length)]}`;
|
const proxyHost = PROXY_HOSTS[Math.floor(Math.random() * PROXY_HOSTS.length)];
|
||||||
|
console.log(`Using ${proxyHost} proxy`);
|
||||||
|
return `http://${PROXY_USERNAME}:${PROXY_PASSWORD}@${proxyHost}`;
|
||||||
}
|
}
|
||||||
console.warn('No proxy configured!');
|
console.warn('No proxy configured!');
|
||||||
return undefined;
|
return undefined;
|
||||||
|
|||||||
Reference in New Issue
Block a user