Getting IE automated proxy settings from Java or JScript?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Chris

    #1

    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



  • Andrew Thompson

    #2
    Re: Getting IE automated proxy settings from Java or JScript?

    On Tue, 25 May 2004 16:19:52 -0400, Chris wrote:
    [color=blue]
    > I've been researching this on and off for weeks, ..[/color]

    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

    Comment

    • Chris

      #3
      Re: Getting IE automated proxy settings from Java or JScript?


      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" <SeeMySites@www .invalid> wrote in message
      news:ra9h4ts1sm 7n$.4wkh5p1b3tv t.dlg@40tude.ne t...[color=blue]
      > On Tue, 25 May 2004 16:19:52 -0400, Chris wrote:
      >[color=green]
      > > I've been researching this on and off for weeks, ..[/color]
      >
      > 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[/color]


      Comment

      • Andrew Thompson

        #4
        Re: Getting IE automated proxy settings from Java or JScript?

        On Tue, 25 May 2004 19:04:03 -0400, Chris wrote:
        [color=blue]
        > If you have anything worthwhile to contribute on
        > the subject, please share it.[/color]

        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

        Comment

        Working...