Results 1 to 8 of 8

Thread: Unable to tunnel through proxy

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118

    Unable to tunnel through proxy

    hi all,

    when connecting to a proxy server via SSL i get an exception:
    java.io.IOException: Unable to tunnel through proxy...com:8080.
    Proxy returns "HTTP/1.1 200 Connection established"

    i looked at the source code on the sun pages, and here it is:
    Code:
    /* We asked for HTTP/1.0, so we should get that back */
    if (!replyStr.startsWith("HTTP/1.0 200")) {
    ok, http 1.1 is only 6 years old, so i could not expect that it also made its way into java

    i have found only one site on the web about this bug (http://www.javaworld.com/javaworld/j...avatip111.html) but the solution there is of no use to me because the guy who wrote this article is using the URLConnection instead of HttpsURLConnection

    do you have heard about that bug or have seen a solution?

    please help if you can

    thanks,
    big nell
    visit me on www.big-nell.com to find out the truth

  2. #2
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Just out of interest, where did you find the source?
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118
    visit me on www.big-nell.com to find out the truth

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Thanks
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    Well, as I see it if the proxy returns HTTP/1.1 something is wrong with the proxy:
    Code:
    String msg = "CONNECT " + host + ":" + port + " HTTP/1.0\n"
    		     + "User-Agent: "
    		     + sun.net.www.protocol.http.HttpURLConnection.userAgent
    		     + "\r\n\r\n";
    This code explicitly requests a HTTP 1.0 connection, so the proxy should return a HTTP 1.0 connection please.

    You can of course change the request to a 1.1 HTTP.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  6. #6

    Thread Starter
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118
    yeah, but all proxies i can use return HTTP/1.1, and if you check the forums, many people have the same problem
    so what i wanted to change is to check if the number 200 (stands for connection established) is returned within the string
    ok, i'm relatively new to java, but that is no problem
    the problem is if i change this one statement in the file and compile the file, where to i have to put it that it will be called instead of the original? (i prefixed only the message with >>>, compiled it, compiled my program and started it, but the message remained the original, so it is clear i have to replace the original file somewhere, but where?)

    thanks,
    big nell
    visit me on www.big-nell.com to find out the truth

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Dec 2001
    Location
    vienna, austria
    Posts
    118
    btw, what's VBF?
    visit me on www.big-nell.com to find out the truth

  8. #8
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    VBF is short for Visual Basic Forums, that's where we are.

    As opposed to GT, the GalahTech forum, the new great page.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

Posting Permissions

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



Click Here to Expand Forum to Full Width