Creates a new proxy repository instance.
The validator instance.
The config instance.
The logger instance.
The connector instance.
Creates a new proxy.
The proxy will be created in a disabled state (isEnabled = false).
Use enable to activate it for traffic routing.
The ID of the campaign to create the proxy in.
The new proxy ID to create.
The upstream URL for the proxy.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If a proxy with the same ID already exists.
DatabaseError If the proxy URL is already used.
DatabaseError If the data validation fails.
Deletes the proxy by its ID.
A proxy must be disabled before it can be deleted.
The ID of the campaign containing the proxy.
The proxy ID to delete.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the proxy does not exist.
DatabaseError If the proxy is still enabled.
DatabaseError If the data validation fails.
Disables the proxy, stopping traffic routing.
Existing sessions using this proxy will be automatically re-assigned to another enabled proxy upon their next authorization.
The ID of the campaign containing the proxy.
The proxy ID to disable.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the proxy does not exist.
DatabaseError If the data validation fails.
Enables the proxy, making it available for traffic routing.
Enabled proxies are automatically selected by the session creation logic using random load balancing.
The ID of the campaign containing the proxy.
The proxy ID to enable.
The campaign lock secret obtained from CampaignRepository.lock.
DatabaseError If the campaign does not exist.
DatabaseError If the campaign is not locked.
DatabaseError If the campaign lock secret does not match.
DatabaseError If the proxy does not exist.
DatabaseError If the data validation fails.
Lists all proxies for the campaign.
Proxies are ordered by creation time (oldest first).
The ID of the campaign to list proxies for.
The array of proxy models, or null if the campaign does not exist.
DatabaseError If the data validation fails.
Reads the proxy by its ID.
The ID of the campaign containing the proxy.
The proxy ID to read.
The proxy model, or null if the proxy is not found.
DatabaseError If the data validation fails.
StaticregisterRegisters the proxy repository as a singleton in the DI container.
The DI container to register in.
Redis-based proxy repository implementation.
Depends:
Example