You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Mark Claassen <mc...@ocie.net> on 2007/02/01 17:15:27 UTC

RE: HttpClient, SOCKS proxy, and webstart

I am having trouble finding any definitive information on this from the web.
I am thinking that this issue comes the fact that Firefox sets up the proxy
servers incorrectly.  

Checking the checkbox in Firefox to have all the proxies use the same host
and port sets up the HTTP proxy and the SOCKS proxy to use the same host and
port.  Is this a valid configuration?  It seems that SOCKS and HTTP work on
different levels of the TCP stack, so their proxies would as well.
Therefore, forcing them to be the same would never be valid.  Can anyone
help shed some light on this for me?

Mark
 
-----Original Message-----
From: Roland Weber [mailto:http-async@dubioso.net] 
Sent: Friday, January 26, 2007 4:58 PM
To: HttpClient User Discussion
Subject: Re: HttpClient, SOCKS proxy, and webstart

Mark Claassen wrote:
> Well, I have some good news for you.
> 
> Just running the JRE (like through an IDE) the 
> ProxySelector.getDefault() gives a ProxySelector class or 
> sun.net.spi.DefaultProxySelector Running through webstart gives class 
> a ProxySelector class of com.sun.deploy.net.proxy.DeployProxySelector

Ah yes, thanks for reminding me. You're on 5.0 or later, which has the
ProxySelector class. I stumbled over that one before, when I did some
digging for the Application Design FAQ:
http://wiki.apache.org/jakarta-httpclient/FrequentlyAskedApplicationDesignQu
estions#head-b97e4a161e34e2f9ecefa891cdb92bb0a09e6746

I'm still working in 1.4 environments, so I keep forgetting (or avoid
getting used to) the newer features.

I'm glad you solved your problems!

cheers,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


RE: HttpClient, SOCKS proxy, and webstart

Posted by Roland Weber <RO...@de.ibm.com>.
Hi Mark,

> Checking the checkbox in Firefox to have all the proxies use the same 
host
> and port sets up the HTTP proxy and the SOCKS proxy to use the same host 
and
> port.  Is this a valid configuration?  It seems that SOCKS and HTTP work 
on
> different levels of the TCP stack, so their proxies would as well.

On the client side, they're on different levels. But a proxy can switch
behavior to provide proxy services on different levels. There will always
be a plain socket connection to the proxy first. If the incoming data
starts with "HTTP", it's an HTTP request. If it starts with 0x05, it's
probably a SOCKS 5 request. Think of a firewall/router with built-in proxy
functionality.
Nevertheless you can discuss with the Firefox guys how to improve their
interaction with Java WebStart.

cheers,
  Roland