예제 #1
0
        public Program()
        {
            if (File.Exists(_filename))
            {
                string s = File.ReadAllText(_filename);
                foreach (Match _Match in Regex.Matches(s, @"(.+)\:(.+)"))
                {
                    _List.Add(new Ip { ip = _Match.Groups[1].Value, port = int.Parse(_Match.Groups[2].Value) });
                }
            }
            new Thread(Start).Start();
            _GetProxies = new GetProxies();            
            new CheckProxies().StartAsync();
            _GetProxies.StartClipboardCheck();

        }
예제 #2
0
파일: Program.cs 프로젝트: patel22p/dorumon
 public Program()
 {
     if (File.Exists(_filename))
     {
         string s = File.ReadAllText(_filename);
         foreach (Match _Match in Regex.Matches(s, @"(.+)\:(.+)"))
         {
             _List.Add(new Ip {
                 ip = _Match.Groups[1].Value, port = int.Parse(_Match.Groups[2].Value)
             });
         }
     }
     new Thread(Start).Start();
     _GetProxies = new GetProxies();
     new CheckProxies().StartAsync();
     _GetProxies.StartClipboardCheck();
 }
예제 #3
0
        void LoadProxies()
        {
            Console.WriteLine("Please wait while proxies are loaded and checked....");
            GetProxies getProxies = new GetProxies();

            proxyList = getProxies.LoadProxies();
            int count = proxyList.Count;
            int i     = 1;

            foreach (var p in proxyList)
            {
                if (getProxies.IsProxyAlive(p))
                {
                    Console.WriteLine("[{0}/{1}] " + p.ToString() + " is alive", i, count);
                    p.isAlive = true;
                }
                else
                {
                    Console.WriteLine("[{0}/{1}] " + p.ToString() + " is dead", i, count);
                }
                ++i;
            }
            Console.WriteLine("[Finished Loading] {0} proxies are alive.", getProxies.CountAlive(proxyList));
        }
예제 #4
0
 public Task <List <ProxyVm> > Handle(GetProxies request, CancellationToken cancellationToken)
 {
     return(_context.Proxies.ProjectTo <ProxyVm>(_mapper.ConfigurationProvider).ToListAsync(cancellationToken));
 }