So I was playing around with HttpWebRequest & HttpWebResponse trying to make a few connections with different proxies.
And I stumbled on to a weird issue.
I tried making a HttpWebRequest to http://cmyip.org with the Proxy
"45.55.27.246:8080" and it went just fine, I looked through the WebResponse and it showed the Html document of http://cmyip.org as expected right?
Then I tried doing the exact same thing with this proxy
"192.99.46.182:1935"
This is where it gets weird, it seems as if it redirected me to some other webpage because the WebResponse was entierly different. It was some Wowza bla bla.. stuff. So I tried pasting in the ip and the port into my webbrowser and it was a white page with some text on it.
What caused this issue and how do I prevent stuff like this from happening?
private static void GetResponse()
{
WebProxy myProxy = default(WebProxy);
try
{
myProxy = new WebProxy("45.55.27.246:8080");
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://cmyip.org");
request.UserAgent = "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.2 Safari/537.36";
request.Timeout = 3000;
request.Proxy = myProxy;
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
Console.WriteLine(sr.ReadToEnd());
}
Debug.Print(response.ResponseUri.ToString());
}
catch (Exception)
{
}
Console.ReadLine();
}
What I have tried:
I've tried looking around for what type of IP this is but couldnt find anything