Push for proxy test pt 4!

This commit is contained in:
kohlerpop1
2024-01-11 16:27:32 -05:00
committed by Jacek W
parent af4f2b4510
commit 0dd952a7fb
6 changed files with 47 additions and 26 deletions

View File

@@ -33,7 +33,7 @@ import java.util.function.Consumer;
@Setter
public class ProxyClientSettings implements Iterator<ProxyData>
{
private boolean enabled;
private boolean enabled, lastSuccess;
private Rotation rotation = Rotation.CONSECUTIVE;
private final List<ProxyData> proxyList = new ArrayList<>();
private int index = 0;
@@ -65,6 +65,8 @@ public class ProxyClientSettings implements Iterator<ProxyData>
@Override
public ProxyData next()
{
if (lastSuccess)
return proxyList.get(index);
var nextProxy = switch (rotation)
{
case CONSECUTIVE -> {