Skip to main content
Version: 4.0

IProxyConfiguration

Minimal contract that any object passed to a crawler as its proxyConfiguration option must satisfy.

Implement this interface to plug a custom proxy-provisioning strategy into any Crawlee crawler — for example a remote proxy service or a thin wrapper around the built-in ProxyConfiguration with different rotation rules. *

Implemented by

Index

Methods

newProxyInfo

  • newProxyInfo(proxyInfo): Promise<undefined | ProxyInfo>
  • Creates a new ProxyInfo object describing the proxy to use. Returns undefined when no proxy should be used.


    Parameters

    • optionalproxyInfo: ProxyInfo

      A previously created ProxyInfo, e.g. one restored with a persisted session. Persisted sessions carry no password (see SessionState.proxyInfo). Implementations should return an equivalent ProxyInfo that is usable in the current environment, or the argument itself when there is nothing to refresh.

    Returns Promise<undefined | ProxyInfo>

Page Options