Devil 162 Hello i need help Currently its like this request.Proxy = proxies[(new Random()).Next(proxies.Count)]; I need it to be not random but in order of list Quote Share this post Link to post Share on other sites
cheaterforlifex88 2 1) Declare your proxyQueue: private static Queue proxyQueue = new Queue(); 2) Load your proxies: foreach (string item in File.ReadLines("proxies.txt")) { Program.proxyQueue.Enqueue(item); } 3) Pick random proxy Random rdn = new Random(); string ProxyAdress = Program.proxyQueue.ElementAt(rdn.Next(0, Program.proxyQueue.Count - 1)); string proxyip = ProxyAdress.Split(':')[0]; string proxyport = Convert.ToInt32(ProxyAdress.Split(':')[1]); httpWebRequest.Proxy = new WebProxy(proxyip, proxyport); Hope I helped. Quote Share this post Link to post Share on other sites