Game Development Community

HTTPObject from behind a proxy

by Taylor Petrick · in Torque Game Engine Advanced · 07/21/2009 (5:34 am) · 2 replies

I've been trying to use HTTPObject with no success for a while, and I finally realized that its probably because my ISP requires I use an HTTP proxy for web browsing.

So, here's what I've got so far.

I'm able to use the get command with HTTPObject like so:

HttpObjectName.get("myProxyIP:MyProxyPort", "http://google.com");

However, this seems to send me to the web server's top directory or something, not the one where the actual website files are (public_html). I believe this is because there is no DNS lookup on the address.

Any ideas?


#1
07/21/2009 (8:06 am)
Ah, I've come up with a solution. I'm using TCPObject, connecting to the proxy, and then using GET.

In case anyone else needs them some time:
new TCPObject(TCPObj);
TCPObj.connect("###.###.###:##");
TCPObj.send("GET http://www.website.com/ \r\n");

Cheers
#2
07/21/2009 (5:54 pm)
good tip...