<html>
    <head>
      <base href="http://icedtea.classpath.org/bugzilla/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - Can't get javaws to use SOCKS proxy"
   href="http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=1474">1474</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Can't get javaws to use SOCKS proxy
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>IcedTea-Web
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>1.4
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86_64
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P3
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>NetX (javaws)
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>omajid&#64;redhat.com
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>silvrax&#64;gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>unassigned&#64;icedtea.classpath.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I've been trying to load a web start application using a SOCKS proxy. The proxy
is provided using ssh -D option, so there is only a SOCKS proxy, at
localhost:8989. I've been saving the jnlp locally and then running javaws from
the command line. I've used itweb-settings to configure the proxy.

First, I've only configured the SOCKS proxy, which results in this
~/.icedtea/deployment.properties:
deployment.proxy.socks.port=8989
deployment.proxy.socks.host=localhost
deployment.proxy.type=1
deployment.security.level=ASK_UNSIGNED

I've also tried checking the &quot;Use this proxy for all protocols&quot; check-box,
which results in:
deployment.proxy.socks.port=8989
deployment.proxy.same=true
deployment.proxy.socks.host=localhost
deployment.proxy.type=1
deployment.security.level=ASK_UNSIGNED

In both of these cases I see this exception when it tries to download the first
file:

Status: CONNECTING DOWNLOAD STARTED +(CONNECTING) -(CONNECT) &#64; /images/logo.gif
All possible urls for location=<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>
state=CONNECTING DOWNLOAD STARTED : [<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>,
<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>]
Selecting proxy for: <a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>
java.lang.RuntimeException: java.lang.IllegalArgumentException: hostname can't
be null
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1241)
        at
sun.net.www.protocol.http.HttpURLConnection.getHeaderField(HttpURLConnection.java:2713)
        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:477)
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
        at
net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCode(ResourceTracker.java:872)
        at
net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:911)
        at
net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:789)
        at
net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:624)
        at
net.sourceforge.jnlp.cache.ResourceTracker.access$500(ResourceTracker.java:76)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1172)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1170)
        at java.security.AccessController.doPrivileged(Native Method)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1170)
        at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: hostname can't be null
        at java.net.InetSocketAddress.checkHost(InetSocketAddress.java:149)
        at java.net.InetSocketAddress.&lt;init&gt;(InetSocketAddress.java:216)
        at
net.sourceforge.jnlp.runtime.JNLPProxySelector.getFromConfiguration(JNLPProxySelector.java:306)
        at
net.sourceforge.jnlp.runtime.JNLPProxySelector.select(JNLPProxySelector.java:202)
        at
sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:925)
        at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
        ... 11 more

So, it looks like in this it's just not grokking my proxy configuration.
I also tried filling in localhost:8989 for the http(s) protocols, which
resulted in this configuration file:
deployment.proxy.https.host=localhost
deployment.proxy.http.host=localhost
deployment.proxy.socks.port=8989
deployment.proxy.socks.host=localhost
deployment.proxy.https.port=8989
deployment.proxy.type=1
deployment.proxy.http.port=8989
deployment.security.level=ASK_UNSIGNED

In this case I got the following exception:

Status: CONNECTING DOWNLOAD STARTED +(CONNECTING) -(CONNECT) &#64; /images/logo.gif
All possible urls for location=<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>
state=CONNECTING DOWNLOAD STARTED : [<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>,
<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>]
Selecting proxy for: <a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a>
Selected proxies: [HTTP &#64; localhost/127.0.0.1:8989]
While processing <a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a> by HEAD for resource
location=<a href="https://10.10.0.1:443/images/logo.gif">https://10.10.0.1:443/images/logo.gif</a> state=CONNECTING DOWNLOAD
STARTED got java.net.SocketException: Unexpected end of file from server:
java.net.SocketException: Unexpected end of file from server
        at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:718)
        at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:579)
        at
sun.net.www.protocol.http.HttpURLConnection.doTunneling(HttpURLConnection.java:1788)
        at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:183)
        at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1299)
        at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
        at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:338)
        at
net.sourceforge.jnlp.cache.ResourceTracker.getUrlResponseCode(ResourceTracker.java:872)
        at
net.sourceforge.jnlp.cache.ResourceTracker.findBestUrl(ResourceTracker.java:911)
        at
net.sourceforge.jnlp.cache.ResourceTracker.initializeResource(ResourceTracker.java:789)
        at
net.sourceforge.jnlp.cache.ResourceTracker.processResource(ResourceTracker.java:624)
        at
net.sourceforge.jnlp.cache.ResourceTracker.access$500(ResourceTracker.java:76)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1172)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader$1.run(ResourceTracker.java:1170)
        at java.security.AccessController.doPrivileged(Native Method)
        at
net.sourceforge.jnlp.cache.ResourceTracker$Downloader.run(ResourceTracker.java:1170)
        at java.lang.Thread.run(Thread.java:722)

To me that seems to indicate that it is now trying to use the proxy, but my
guess is it's not using the SOCKS protocol to talk to it?</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>