getNextProxy method

  1. @override
Proxy getNextProxy({
  1. RotationStrategyType? strategyType,
  2. bool useScoring = false,
  3. bool validated = true,
})
override

Gets the next proxy in the rotation

validated determines whether to use validated proxies useScoring determines whether to use the scoring system for selection strategyType determines the rotation strategy to use

Implementation

@override
Proxy getNextProxy({
  RotationStrategyType? strategyType,
  bool useScoring = false,
  bool validated = true,
}) {
  // This is a synchronous method in the interface but the advanced manager uses async
  // We'll have to return a placeholder proxy and log a warning
  developer.log(
    'Warning: getNextProxy in AdvancedProxyManagerAdapter is not fully compatible with ProxyManager',
  );
  return Proxy(ip: '0.0.0.0', port: 0);
}