anyway to test proxy?

  • Автор темы Автор темы bill
  • Дата начала Дата начала

bill

Client
Регистрация
05.07.2014
Сообщения
355
Реакции
9
Баллы
18
so i need to be able to do this from within a job, is it possible?

grab proxy from text file in ip:port format
test the proxy to see if its alive
if it's alive, ouput to text file, if its dead, it needs to go to GET PROXY action and select a new alive proxy.

I'm trying to set 1 proxy to all threads in a job at the beggining of the job, but as the job goes on the proxy will die and then it needs to use GET PROXY action . but if i use the GET PROXY action, it will just grab random proxies, so i need some kind of work around.
 
Последнее редактирование:
Код:
Развернуть Свернуть Копировать
System.Net.NetworkInformation.Ping ping = new System.Net.NetworkInformation.Ping ();
try
{
System.Net.NetworkInformation.PingReply reply = ping.Send (project.Variables["ip"].Value, 2000);
if (reply == null) return false;
return (reply.Status == System.Net.NetworkInformation.IPStatus.Success);
}
catch (System.Net.NetworkInformation.PingException e)
{
return false;
}

i used this code

and it isn't returning true in y variable even though the proxy is good. i also tried removing the :23599 from value but it still is false. any advice?

xx53r.jpg
 
Последнее редактирование:
Awesome! Thank you.
:D
 

Кто просматривает тему: (Всего: 0, Пользователи: 0, Гости: 0)