$ua->proxy(['http'], $cur_proxy);
It's here, $cur_proxy should be a string looking like this: http://111.111.111.111:12345/, randomly chosen from array . If I use $cur_proxy, this string is ignored, and traffic goes directly without any proxification. But if I comment out:
my $cur_proxy = $valid_routes[$j];
$ua->proxy(['http'], $cur_proxy);
and rewrite it like this:
$ua->proxy(['http'], 'http://111.111.111.111:12345/')
traffic goes through a proxy, as it should. So I need to make rotation work, somehow.