Fake Mirrors
    Preparing search index...

    Class RedisProxyRepository

    Redis proxy repository implementation.

    Hierarchy (View Summary)

    Implements

    Constructors

    Methods

    • Creates a new proxy in the specified campaign.

      The proxy will be created in a disabled state (isEnabled = false). Use enable() to activate it for traffic routing.

      Parameters

      • campaignId: string

        The ID of the campaign to create the proxy in

      • proxyId: string

        The unique identifier for the new proxy

      • url: string

        The proxy URL

      • lockSecret: string

        The campaign lock secret obtained from CampaignRepository.lock()

      Returns Promise<void>

      DatabaseError If the campaign does not exist

      DatabaseError If the campaign is not locked

      DatabaseError If the lock secret does not match

      DatabaseError If a proxy with the same ID already exists

      DatabaseError If url is already used by another proxy in the campaign

    • Disables a proxy, stopping traffic routing.

      Existing sessions using this proxy will be automatically re-assigned to another enabled proxy upon their next authorization.

      Parameters

      • campaignId: string

        The ID of the campaign containing the proxy

      • proxyId: string

        The proxy ID to disable

      • lockSecret: string

        The campaign lock secret obtained from CampaignRepository.lock()

      Returns Promise<void>

      DatabaseError If the campaign does not exist

      DatabaseError If the campaign is not locked

      DatabaseError If the lock secret does not match

      DatabaseError If the proxy does not exist

    • Enables a proxy, making it available for traffic routing.

      Enabled proxies are automatically selected by the session creation logic using random load balancing.

      Parameters

      • campaignId: string

        The ID of the campaign containing the proxy

      • proxyId: string

        The proxy ID to enable

      • lockSecret: string

        The campaign lock secret obtained from CampaignRepository.lock()

      Returns Promise<void>

      DatabaseError If the campaign does not exist

      DatabaseError If the campaign is not locked

      DatabaseError If the lock secret does not match

      DatabaseError If the proxy does not exist