Results 1 to 3 of 3
Thread: Trying to bypass proxy
- 03-22-2010, 11:20 AM #1Member
- Join Date
- Mar 2010
- Rep Power
Trying to bypass proxy
hey I am a beginner and stuck on something....
My college has a proxy that I am trying to bypass...
Everytime I try to open a page it redirects to a page that asks for policy acknowledgement.. for which we have to click a link..
I want to bypass that clicking part.. for without clicking none of the internet applications work ...
For suppose I type Google in the browser I get this page (trimmed_) :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Notification: Policy Acknowledgement</title> </head> <body> ... <p> <a href="http://10.10.2.15/0:3600:86400:4ba74287/ad776dc33401e888760f72399c80c6ff/http://www.nitk.ac.in">Click here to accept this statement and access the Internet.</a> </p> <p> Time: Mon, 22 Mar 2010 15:42:23 IST<br>IP Address: 172.16.54.143<br> </p> </body> </html>
System.getProperties().put("proxySet",true); System.getProperties().put("proxyHost","10.10.2.15"); System.getProperties().put("proxyPort",80); ucon = u.openConnection(); //ucon is URLConnection, u is URL Reader inp = new InputStreamReader((InputStream) u.getContent());
Additional Question... Suppose I get the link... What should I do to simulate a 'CLICK' on it??? Can I just connect to that URL and the server would think the user clicked on it???
- 03-23-2010, 05:27 PM #2
Your school's routers are blocking your requests and sending you that error page. Unlike the movies, I seriously doubt you will find a way past them.
To use the school's proxy, look at Proxy and URL.openConnection(Proxy proxy). That will allow you to follow the school's procedures without the annoying error pages.The Java Tutorial. Read it.
- 04-16-2010, 02:46 PM #3Member
- Join Date
- Apr 2010
- Rep Power
- By gabrielcik in forum New To JavaReplies: 1Last Post: 03-04-2010, 02:18 PM
- By mtwisd in forum NetBeansReplies: 2Last Post: 07-13-2009, 04:45 AM
- By mtwisd in forum New To JavaReplies: 1Last Post: 04-24-2009, 08:50 AM
- By Shiv in forum NetworkingReplies: 0Last Post: 04-11-2009, 08:07 AM
- By ruchsriv in forum Web FrameworksReplies: 0Last Post: 03-30-2009, 08:23 AM