im试图通过socks5代理连接到网页。我用于不使用代理的连接方法如下:
public static void SubmitUrl(String urlP, String urlParams)
{
using(WebClient wc = new WebClient())
{
wc.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
String HtmlResult = wc.UploadString(urlP, urlParams);
if (HtmlResult.Contains("Your new password has been set"))
{
Console.WriteLine("new pw set");
}
else
{
if(HtmlResult.Contains("You have been temporarily blocked"))
{
Console.WriteLine("blocked, attempt failed");
}else
{
Console.WriteLine("wrong output, retrying");
Thread.Sleep(4000);
SubmitUrl(urlP, urlParams);
}
//
}
//Console.WriteLine(HtmlResult);
}
}
我环顾四周,但没有结果。我也尝试过使用this库,但是我根本不理解。 (该文档是俄语的)
非常感谢您的帮助!