473,797 Members | 3,212 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3361
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=2d6a4 4c14918389f>

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.javas cript 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.ne t...
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=2d6a4 4c14918389f>

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
7938
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 Internet Explorer connection settings (proxy:8080). However, as soon as this setting is enabled, the remoting program running on their pc stops communicating with the server it sends data to. I've disabled proxy setting on the affected pc, rebooted...
3
7568
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 the proxy settings from IE on the server machine. But it doesn't, it always posts straight to the server. I tried forcing it by doing this: WebProxy defaultProxy = WebProxy.GetDefaultProxy();
9
3454
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. Unfortunately, the .NET Framework does not support automatic proxy discovery scripts. See: http://support.microsoft.com/default.aspx?scid=kb;%5BLN%5D;307220 The article above details that the way to workaround this is to edit the...
9
3222
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. What it does is to call a webservice with two parameters, one being a integer, the other one being a "String" which contains XML (not the best practice, however that is the target interface and we cannot change that).
5
3912
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 which items are the correct ones to get. Can anybody give me a direction on where I look to figure out how to get/set the IP address, gateway, DNS Server and Proxy Server? When I look in one of the dump programs there is lots of stuff about...
2
11434
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 out: I've a win32 service in C# on a client machine A, which accesses a WS (C#) on a server machine B (hosted on an IIS) Case 1: If I try to add the WSDL for the WS through VS2005, the 'Discovery
1
3499
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. It is working fine for Java5. Here i am giving the piece of code where it is throwing me exception protected void autoDetectProxy(URL url) { // Trying Java system variables.
1
6873
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) that can enable and disable the proxy server but I can't find how to do the "bypass ......" Would really appreciate som help.
2
2017
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; import java.net.Proxy;
0
9685
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10469
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10209
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10023
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9066
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7560
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.