hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chris Brown" <chris92...@hotmail.com>
Subject Re: Auto-detecting proxy settings in a standalone Java app
Date Fri, 22 Oct 2004 10:45:48 GMT

Thanks for all the rapid feedback so far.

I don't have VB or the VB runtime, although perhaps I could use the 
JNIWrapper software to access this information (if I knew where it was...!). 
  Pity the Webstart proxy detection stuff isn't available for all to see, as 
it returns (I think) appropriate params, whether you use IE or Mozilla or 

On the other hand, given that JNIWrapper is commercial software, perhaps 
someone would know how to write a simple C program with "mingw" or whatever 
(easy to compile).  It could detect params and return them on STDOUT, to be 
picked up either by a startup.bat or even through Runtime.exec() (solving 
the "restart the JVM" problem discussed earlier in this thread).

First thing's first though... does anyone know where this information is 
stored in Windows ?  IE and Mozilla/Firefox seem good targets for starters.

Hey, why not even a little optional subproject for HTTPClient (requiring JNI 
and a compiler, preferably not *requiring* the MS tool chain), with a simple 
ProxyDetector interface, and a series of platform-specific implementations 
(to go further than my current Windows-only need) ?

Any thoughts on these big ideas, or at least as far as solving the immediate 
problem (where are these settings stored and how can I get at them?)

Thanks to all,

>From: Oleg Kalnichevski <oleg.kalnichevski@bearingpoint.com>
>Reply-To: "Commons HttpClient Project" 
>To: Commons HttpClient Project <commons-httpclient-dev@jakarta.apache.org>
>Subject: Re: Auto-detecting proxy settings in a standalone Java app
>Date: Fri, 22 Oct 2004 11:00:33 +0200
>And how often does that happen in a course of one working day? I'd say
>not that often. I do agree with Roland that a startup script written in
>VBScript appears to be the best solution for the problem
>On Fri, 2004-10-22 at 10:54, Ortwin Glück wrote:
> > Roland Weber wrote:
> > > Wait, here is another idea: you could write a startup script that does
> > > the proxy settings lookup, then passes the settings through -D
> > > definitions as system properties, which can be accessed by your
> > > Java application. That's a bit less ugly than calling native code
> > > from within the app. The proxy settings for the HttpURLConnection
> > > of the JDK are expected as system properties, too.
> >
> > Of course that implies you need to restart your app, everytime the proxy
> > settings change...
> >
> > Odi
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: 
> > For additional commands, e-mail: 
>The information in this email is confidential and may be legally 
>privileged.  Access to this email by anyone other than the intended 
>addressee is unauthorized.  If you are not the intended recipient of this 
>message, any review, disclosure, copying, distribution, retention, or any 
>action taken or omitted to be taken in reliance on it is prohibited and may 
>be unlawful.  If you are not the intended recipient, please reply to or 
>forward a copy of this message to the sender and delete the message, any 
>attachments, and any copies thereof from your system.
>To unsubscribe, e-mail: 
>For additional commands, e-mail: 

Recevez par e-mail des émoticônes pour MSN Messenger 

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

View raw message