anyway to test proxy?

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.
 
Последнее редактирование:

lokiys

Moderator
Регистрация
01.02.2012
Сообщения
4 810
Благодарностей
1 187
Баллы
113

bill

Client
Регистрация
05.07.2014
Сообщения
355
Благодарностей
9
Баллы
18
Код:
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?

 
Последнее редактирование:

bill

Client
Регистрация
05.07.2014
Сообщения
355
Благодарностей
9
Баллы
18
found a solution for anyone who needs it here it is :-)
 

Вложения

  • Спасибо
Реакции: rostonix и Tobbe

Loille

Client
Регистрация
18.04.2015
Сообщения
9
Благодарностей
0
Баллы
1
Awesome! Thank you.
:D
 

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