Skip to main content Link Search Menu Expand Document (external link)

Proxy Provider

Proxy provider classes are created by proxy provider factory objects. They know how to read proxies from a source and let users select proxies from them.

Methods

Proxy providers must have the following methods.

proxyProvider.getInfo()

Should return a string that describes the current state of provider. Used for display purposes.

image info

proxyProvider.getName()

Should return a string that will be used in various parts of the application.

image info

proxyProvider.getNextProxy()

Should return the next proxy object from the provider.

The proxy object returned must be previously created by proxyFactory.createSync.

proxyProvider.getProxyCount()

Should return the number of proxies managed by the provider.

proxyProvider.getProxies()

Should return an array of proxies objects managed by this provider.

proxy objects in the returned array must be a previously created by proxyFactory.createSync.

proxyProvider.getProxy(id)

  • id (string)

Return a specifc proxy object by id or null if the proxy couldn’t be found.

The proxy object returned must be previously created by proxyFactory.createSync.

proxyProvider.getState()

Should return data specific to this instance that will be serialized to disk and passed back to recreate the instance when Jancy restarts.

proxyProvider.loadProxies()

This method will be called to load proxies from the source represented by the provider. This method should return a promise that resolves when all the proxies have been loaded with a boolean value that indicates if the profiles have been loaded or not.