パブリック プロキシ サーバー (http://www.unblockwebnow.info/) を使用して HTTP リクエストを宛先サイトに送信しようとしています。たとえばhttp://stackoverflow.com :)
私の HTTP クライアントには次のアーキテクチャがあります。
string url = "http://stackoverflow.com";
HttpWebRequest HttpWRequest = (HttpWebRequest)WebRequest.Create(url);
HttpWRequest.Method = "GET";
WebProxy myProxy = new WebProxy();
myProxy.Address = new Uri("http://www.unblockwebnow.info/");
HttpWRequest.Proxy = myProxy;
HttpWebResponse HttpWResponse = (HttpWebResponse)HttpWRequest.GetResponse();
StreamReader sr = new StreamReader(HttpWResponse.GetResponseStream(), encoding);
var rawHTML = sr.ReadToEnd();
sr.Close();
rawHTMLのコードを実行した後、私は得る"pageok -managed by puppet - hostingcms02 pageok"
行をコメントアウトするHttpWRequest.Proxy = myProxy;
と、サイトのコンテンツが取得されます。