22 lines
879 B
C#
22 lines
879 B
C#
namespace BlueLaminate.Scraper.Proxies;
|
|
|
|
/// <summary>
|
|
/// Source of proxy endpoints. The whole point of this seam is that the rest of
|
|
/// the scraper depends only on this interface and <see cref="ProxyLease"/>, so a
|
|
/// different residential provider — or the future C2 that allocates IPs to
|
|
/// containers, or a composite "grab-bag" over several providers — drops in
|
|
/// without changing any browser or scraping code.
|
|
/// </summary>
|
|
public interface IProxyProvider
|
|
{
|
|
/// <summary>Identifier recorded on issued leases, e.g. "iproyal".</summary>
|
|
string Name { get; }
|
|
|
|
/// <summary>
|
|
/// Produce a usable endpoint for the given request. For gateway providers
|
|
/// this is pure string composition (no network call); the C2 implementation
|
|
/// can override that later with real allocation.
|
|
/// </summary>
|
|
ProxyLease Acquire(ProxyRequest request);
|
|
}
|