Exemplo n.º 1
0
        private void removeBadProxies()
        {
            if (Proxies.Count <= 0)
            {
                return;
            }

            List <ProxyInfo> newList;

            Console.WriteLine("Checking bad proxies in db...");
            Console.WriteLine("Checking for duplicates...");
            newList = removeDuplicateProxies(Proxies);
            int difference = Proxies.Count - newList.Count;

            Console.WriteLine(difference + " duplicate entries removed from db.");

            int threads = 25;

            while (threads > newList.Count)
            {
                threads -= 1;
            }

            List <ProxyInfo> activeProxies = ProxyCheck.checkProxiesAlive(newList, threads);

            difference = newList.Count - activeProxies.Count;
            Console.WriteLine(difference + " dead proxies removed from db.");
            Proxies = activeProxies;
            saveToDisk(true);
        }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            ProxyManager manager = new ProxyManager();

            var listOfProxies = Scraper.ScrapePublicLists();
            var aliveProxies  = ProxyCheck.checkProxiesAlive(listOfProxies, 25);

            manager.AppendWorkingProxies(aliveProxies);
        }