ProxyManager constructor

ProxyManager({
  1. required GetProxies getProxies,
  2. required ValidateProxy validateProxy,
  3. required GetValidatedProxies getValidatedProxies,
  4. ProxyAnalyticsService? analyticsService,
  5. ProxyPreloaderService? preloaderService,
  6. ProxyCacheManager? cacheManager,
  7. RotationStrategyType strategyType = RotationStrategyType.roundRobin,
})

Creates a new ProxyManager with the given use cases

Implementation

ProxyManager({
  required this.getProxies,
  required this.validateProxy,
  required this.getValidatedProxies,
  this.analyticsService,
  ProxyPreloaderService? preloaderService,
  ProxyCacheManager? cacheManager,
  RotationStrategyType strategyType = RotationStrategyType.roundRobin,
}) : _preloaderService = preloaderService,
     _rotationStrategy = RotationStrategyFactory.createStrategy(
       type: strategyType,
       proxies: [],
     ) {
  // Start the preloader service if provided
  _preloaderService?.start();
}