473,326 Members | 2,148 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Getting IE automated proxy settings from Java or JScript?

I've been researching this on and off for weeks, and haven't come up with
anything useful yet. If anyone knows how to do this, please let me know.
From a Java applet running in IE 6.0 using the Sun J2SE 1.4.2_03 plug-in, I
need to retrieve the proxy host and port that will be used to access a
specific URL. The site with the client machines is using automated proxy
settings (i.e., a ".pac" file) to retrieve the proxy server address and port
number.

So basically, I need to do one of two things:

1. From either Java or Javascript/Jscript, find the URL to the PAC file
that is stored in the browser configuration. Open that URL, and execute the
FindProxyForURL() Javascript function therein.
2. Even better, find a way to access the copy of FindProxyForURL() that
Sun's documentation claims the Java Plug-in preloads when it starts. See
the following URL:
http://java.sun.com/j2se/1.4.2/docs/...html#automatic

The restrictions on my environment are:

1. I cannot use any native Windows code, whether called via JNI or exec(),
to read the registry value that contains the URL of the .pac file.
2. I cannot hard code the auto configuration URL, because remote
administration software can change it.
3. I cannot modify the Java code to use the URLConnection class and let the
JRE transparently handle the proxying.

The security permissions in the JRE's java.policy file may be relaxed,
within reason, to allow the applet to read (but not write) certain system
properties that are not readable by default. This is how I get the IE proxy
settings when it is NOT configured to use a .pac file, but as far as I can
tell, there is no Java property that provides the automated proxy URL if the
browser is configured to use one.

Thanks in advance for any advice that you can provide.

- Chris

Jul 23 '05 #1
3 3322
On Tue, 25 May 2004 16:19:52 -0400, Chris wrote:
I've been researching this on and off for weeks, ..


Well it seems like just yesterday that you
posted this to four groups..
<http://google.com/groups?th=2d6a44c14918389f>

Oh, wait! It *was* just yesterday..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2

I meant that I researched for weeks before deciding to take the question to
Usenet. In any case, I haven't received any replies, it seems that
comp.lang.javascript is a more widely read group than
comp.lang.java.javascript (on which I posted yesterday), and it's on topic
here because a Javascript-only solution is acceptable. So, I figured I'd
give this group a try too. If you have anything worthwhile to contribute on
the subject, please share it.

Thanks,
Chris
"Andrew Thompson" <Se********@www.invalid> wrote in message
news:ra****************************@40tude.net...
On Tue, 25 May 2004 16:19:52 -0400, Chris wrote:
I've been researching this on and off for weeks, ..


Well it seems like just yesterday that you
posted this to four groups..
<http://google.com/groups?th=2d6a44c14918389f>

Oh, wait! It *was* just yesterday..

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology

Jul 23 '05 #3
On Tue, 25 May 2004 19:04:03 -0400, Chris wrote:
If you have anything worthwhile to contribute on
the subject, please share it.


Already did, you missed it.

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: harry | last post by:
Hi, I have a program that runs on multiple client pc's. Occasionally one or more of those pc's use VPN to connect to another corporate network. When using VPN they need to set proxy server in...
3
by: Robb Gilmore | last post by:
posting this again as : rgilmore@newsgroup.nospam We have a C# .NET app which runs as a service. It posts data to a server using HttpWebrequest. According to the docs I 've read, it should use...
9
by: Codex Twin | last post by:
I am re-sending this in the hope that it might illicit a response. I have a corporate client who forces their workstations to get the proxy server details using an automatic proxy discovery script....
9
by: MSDNAndi | last post by:
Hi, I have a set of simple webservices calls that worked fine using .NET Framework 1.0. I am calling a Java/Apache based webservices, the calling side is not able to supply a proper WSDL. ...
5
by: UJ | last post by:
I had already asked how to get the network settings on the machine and was told that I should use the WMI interface. I downloaded programs that will allow me to look at the stuff but I'm not sure...
2
by: rcp | last post by:
Hi all, I've read all posts from all existing threads and none of them worked to solve my problem, although its exactly the same. I'll try to explain my case and see if a kind soul could help me...
1
by: MRamaLakshmi | last post by:
hi, I am developing an application using Java Applet which will be uploading files. Its throwing Null Pointer exception while detecting the proxy when we are trying to load the applet using Java6....
1
by: OlaPihl | last post by:
Hi, How can I by code enable and disable "Bypass proxy server for local adresses" in Internet Explorer / Tools / Internet Options / Connections / LAN Settings. I have made a program (VB.Net)...
2
dmjpro
by: dmjpro | last post by:
Here is my code import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.io.FileOutputStream; import java.net.InetAddress; import java.net.InetSocketAddress;...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.