• Post Reply Bookmark Topic Watch Topic
  • New Topic

how to open URL through proxy server  RSS feed

 
Sam Shen
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I was wondering how I can code URL to be opened through a proxy server.

Many Thanks,
Sam
 
Dirk Schreckmann
Sheriff
Posts: 7023
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Moving this to the Sockets and Internet Protocols forum...
 
Maulin Vasavada
Ranch Hand
Posts: 1873
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sam
You can try the following code before you make URLConnection for Http tunneling..
System.setProperty("http.proxyServer","x.x.x.x");
System.setProperty("http.proxyPort","xxxx");
Where you can use proxy server's address (or host name as well may be) and the port which you might be using via your browser setttings...
Regards
Maulin
 
Axel Janssen
Ranch Hand
Posts: 2166
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
pending issue is that most if not nearly all company proxies require authentification.
This article is very good:
http://www.developer.com/java/other/article.php/1551421
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!