add csfloat api usage
This commit is contained in:
29
BlueLaminate/BlueLaminate.Scraper/Proxies/ProxyLease.cs
Normal file
29
BlueLaminate/BlueLaminate.Scraper/Proxies/ProxyLease.cs
Normal file
@@ -0,0 +1,29 @@
|
||||
namespace BlueLaminate.Scraper.Proxies;
|
||||
|
||||
/// <summary>
|
||||
/// A concrete, ready-to-use proxy endpoint handed back by an
|
||||
/// <see cref="IProxyProvider"/>. This is the only proxy type the browser layer
|
||||
/// ever sees, so swapping providers (or mixing several in a grab-bag) never
|
||||
/// touches the Selenium code. <see cref="Username"/> and <see cref="Password"/>
|
||||
/// are the literal credentials to present to the gateway — for providers like
|
||||
/// IPRoyal the targeting/session parameters are already baked into them.
|
||||
/// </summary>
|
||||
/// <param name="Host">Gateway host, e.g. "geo.iproyal.com".</param>
|
||||
/// <param name="Port">Gateway port, e.g. 12321.</param>
|
||||
/// <param name="Username">Credential username for the gateway.</param>
|
||||
/// <param name="Password">Credential password (may carry encoded session/geo params).</param>
|
||||
/// <param name="Provider">Name of the provider that issued this lease.</param>
|
||||
/// <param name="SessionId">The sticky session key, if this is a pinned IP.</param>
|
||||
/// <param name="ExpiresAt">When a sticky IP may be recycled; null if rotating/unbounded.</param>
|
||||
public sealed record ProxyLease(
|
||||
string Host,
|
||||
int Port,
|
||||
string Username,
|
||||
string Password,
|
||||
string Provider,
|
||||
string? SessionId = null,
|
||||
DateTimeOffset? ExpiresAt = null)
|
||||
{
|
||||
/// <summary>"host:port" form used by browser proxy settings.</summary>
|
||||
public string Endpoint => $"{Host}:{Port}";
|
||||
}
|
||||
Reference in New Issue
Block a user