Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2010
    Rep Power

    Default 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_) :

    Java Code:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 
    <title>Notification: Policy Acknowledgement</title> 
    <a href="">Click here to accept this statement and access the Internet.</a> 
    Time: Mon, 22 Mar 2010 15:42:23 IST<br>IP Address:<br> 
    Notice the <a> tag there.. that's what I want to capture.. I know how to parse HTML as such... Here's the snippet I am doing to open connection :

    Java Code:
    ucon = u.openConnection(); //ucon is URLConnection, u is URL
    Reader inp = new InputStreamReader((InputStream) u.getContent());
    my problem is that this returns a 403 error..... while if I open the URL in a browser ... I get the page I mentioned above... How can I read 'THAT' page in java... maybe the server detects the page is not being opened in a browser.....Any Ideas...

    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???

  2. #2
    Steve11235's Avatar
    Steve11235 is offline Senior Member
    Join Date
    Dec 2008
    Rep Power


    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.

  3. #3
    g_ayyappan is offline Member
    Join Date
    Apr 2010
    Rep Power


    Did you try using correct system properties. Please try with 'http.proxyHost' and 'http.proxyPort'

    Ayyappan Gandhirajan

Similar Threads

  1. bypass unsigned app warning Leopard / Ubuntu
    By gabrielcik in forum New To Java
    Replies: 1
    Last Post: 03-04-2010, 03:18 PM
  2. Replies: 2
    Last Post: 07-13-2009, 05:45 AM
  3. how do you bypass the enter(/n) key in a program?
    By mtwisd in forum New To Java
    Replies: 1
    Last Post: 04-24-2009, 09:50 AM
  4. Http - proxy or non-proxy ?
    By Shiv in forum Networking
    Replies: 0
    Last Post: 04-11-2009, 09:07 AM
  5. bypass NTLM login
    By ruchsriv in forum Web Frameworks
    Replies: 0
    Last Post: 03-30-2009, 09:23 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts