proxy-connection
Version:
Proxy client with automatic connection management, health checking, and fetch-like API
15 lines • 883 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.defaultProxyMangerConfig = exports.TIMEOUT = exports.HEALTH_CHECK_INTERVAL = exports.HEALTH_CHECK_URL = void 0;
exports.HEALTH_CHECK_URL = process.env.HEALTH_CHECK_URL || 'https://httpbin.org/ip';
exports.HEALTH_CHECK_INTERVAL = parseInt(process.env.HEALTH_CHECK_INTERVAL || '60000', 10);
exports.TIMEOUT = parseInt(process.env.TIMEOUT || '5000', 10);
exports.defaultProxyMangerConfig = {
onErrorRetries: 0, // no retries on error, get another proxy
onTimeoutRetries: 0, // no retries on timeout, get another proxy
maxTimeout: 5000,
healthCheckUrl: exports.HEALTH_CHECK_URL,
healthCheckInterval: exports.HEALTH_CHECK_INTERVAL,
changeProxyLoop: 2 // Number of proxy change loops. If 2, it means there will be 2 attempts for each proxy
};
//# sourceMappingURL=constants.js.map