1.1.2 • Published 3 years ago

proxy-manager-client v1.1.2

Weekly downloads
9
License
MIT
Repository
-
Last release
3 years ago

Example usage

import got from 'got'
import * as tunnel from 'tunnel'
import { ProxyClient } from 'proxy-manager-client'

const proxies = new ProxyClient('http://secret-address.com')

;(async() => {
	const proxy = await proxies.get('icanhazip', true)

	try {
		const someRequest = await got('https://icanhazip.com', {
			agent: {
			https: tunnel.httpsOverHttp({
				proxy: proxy.connectionDetails
			})
			}
		})
	} catch (e: Exception) {
		// backend might send HTTP 429 (Too Many Requests) or similar error, in that case, mark the proxy as banned
		await proxies.ban(proxy)
	}

})()
1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

4 years ago

1.0.0

4 years ago