luminati-tunnel
HTTP/HTTPS tunnel proxy for luminati.io using round robin strategy.
Install
$ npm install luminati-tunnel --save
Usage
The instance is a function that returns a different proxy tunnel every time you call it, using round robin algorithm.
const luminatiTunnel = const proxies = 'proxy1' 'proxy2' 'proxy3' const tunnel = const url = 'http://lumtest.com/echo.json' ;async { // => it uses 'proxy1' await // => it uses 'proxy2' await // => it uses 'proxy3' await // => it uses 'proxy1' await }
API
tunnel = luminatiTunnel(proxies, [fromIndex])
proxies
Required
Type: array
A collection of the proxy IPs to use.
You can get it from your luminati.io control panel.
Read more at documentation.
fromIndex
Type: number
Default: 0
It specifies the position of the proxies
collection to start.
tunnel
The instance is a function that returns a different proxy tunnel every time you call it, using round robin algorithm.
.current()
Returns the current proxy tunnel credential.
.index()
Returns the current proxy tunnel index from the proxies
provided.
.next()
Returns the next proxy tunnel credential.
.previous()
Returns the previous proxy tunnel credential.
.size()
Returns the number of proxies in the pool.
License
luminati-tunnel © Kiko Beats, released under the MIT License.
Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats