多任务检查代理
我写了那个小程序:
string sciezka = "http://proxyjudge.hell-spy.de/";
foreach(var ip in listBox1.Items)
{
////////////////// CHANGES IP:PORT TO WEBPROXY HOST,PORT
string host=null;
string zmiana=null;
string sport = null;
int port=0;
int pozycja=0;
zmiana=ip.ToString();
pozycja=zmiana.IndexOf(":");
host=zmiana.Remove(pozycja);
sport = zmiana.Replace(host + ":", "");
port = int.Parse(sport);
////////////////////////////////////////// CONNECTING TO PROXYJUDGE
string anonymous=null;
try
{
WebRequest request = WebRequest.Create(sciezka);
WebProxy myprox = new WebProxy(host, port);
request.Timeout = 5000;
request.Proxy = myprox;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream strumien = response.GetResponseStream();
StreamReader sr = new StreamReader(strumien);
anonymous = sr.ReadToEnd();
if (anonymous.Contains("HTTP_VIA"))
{
listBox3.Items.Add(zmiana);
}
else
{
listBox2.Items.Add(zmiana);
}
Update();
request.Abort();
sr.Close();
}
catch (Exception ex)
{
listBox3.Items.Add(zmiana);
Update();
}
我希望它同时检查几个代理...不是一个接一个:)
有人可以帮忙吗?
没有找到相关结果
已邀请:
1 个回复
括宠
至