예제 #1
0
        /// <summary>
        /// <para>Initializes the proxy pool given a collection of CProxy objects.</para>
        /// <para>The proxies will be first cloned and then stored in the list.</para>
        /// <para>They will also be unbanned to make sure there are no leftovers from previous checks.</para>
        /// </summary>
        /// <param name="proxies">The list of CProxy objects to be cloned and added to the list</param>
        public ProxyPool(List <CProxy> proxies)
        {
            // We clone the list, since we don't want to target to the same objects that are in the Proxy Manager
            // If we don't do this, a ban on a runner instance would cause a ban on all the other instances as well!
            Proxies = IOManager.CloneProxies(proxies);

            // Now that the list is cloned, we make sure that no proxy is already banned
            UnbanAll();
        }