Creates a new target repository instance.
The validator instance.
The config instance.
The logger instance.
The connector instance.
Creates a new target.
The target 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 target in.
The new target ID to create.
The access level.
The flag indicating if the donor server uses HTTPS.
The donor subdomain.
The donor domain name.
The donor server port.
The flag indicating if the mirror server uses HTTPS.
The mirror subdomain.
The mirror server port.
The label for categorization.
The connection timeout in milliseconds.
The simple request timeout in milliseconds.
The streaming request timeout in milliseconds.
The maximum headers size in bytes.
The maximum body size in bytes.
The custom main page content.
The custom not-found page content.
The custom favicon.ico content.
The custom robots.txt content.
The custom sitemap.xml content.
The flag indicating if WebSocket connections allowed.
The campaign lock secret obtained from CampaignRepository.lock.
Deletes the target by its ID.
The target must be disabled before it can be deleted.
The ID of the campaign containing the target.
The target ID to delete.
The campaign lock secret obtained from CampaignRepository.lock.
Disables the target, stopping traffic routing.
When disabled, requests to the mirror hostname will not be proxied.
The ID of the campaign containing the target.
The target ID to disable.
The campaign lock secret obtained from CampaignRepository.lock.
Enables the target, making it available for traffic routing.
When enabled, the mirror hostname becomes active and can be used for proxying requests to the donor server.
The ID of the campaign containing the target.
The target ID to enable.
The campaign lock secret obtained from CampaignRepository.lock.
Finds a target by its mirror hostname.
This is the primary lookup method for routing incoming HTTP requests.
Given a Host header from a request, it returns the corresponding target.
The mirror hostname to look up.
The target model, or null if no target matches the hostname.
Finds a full target by its mirror hostname.
The mirror hostname to look up.
The full target model, or null if no target matches the hostname.
Lists all targets for the campaign.
Targets are ordered by creation time (oldest first).
The ID of the campaign to list targets for.
The array of target models, or null if the campaign does not exist.
Lists all full targets for the campaign.
Targets are ordered by creation time (oldest first).
The ID of the campaign to list targets for.
The array of full target models, or null if the campaign does not exist.
Reads the target by its ID.
The ID of the campaign containing the target.
The target ID to read.
The target model, or null if the target is not found.
Reads the full target by its ID.
The ID of the campaign containing the target.
The target ID to read.
The full target model, or null if the target is not found.
Reads all target hosts across all campaigns.
This method returns a dictionary mapping mirror hostnames to target links, used for fast routing lookups.
The dictionary of target hosts and their links.
Updates the target specific fields.
All update parameters are optional. Only provided fields will be updated.
The ID of the campaign containing the target.
The target ID to update.
The connection timeout in milliseconds.
The simple request timeout in milliseconds.
The streaming request timeout in milliseconds.
The maximum headers size in bytes.
The maximum body size in bytes.
The custom main page content.
The custom not-found page content.
The custom favicon.ico content.
The custom robots.txt content.
The custom sitemap.xml content.
The flag indicating if WebSocket connections allowed.
The campaign lock secret obtained from CampaignRepository.lock.
StaticregisterRegisters the target repository as a singleton in the DI container.
The DI container to register in.
Redis-based target repository implementation.
Depends:
Example
Example