Automatic proxy configuration
Doug Way
dway at mat.net
Fri Apr 23 05:23:36 UTC 1999
Thanks for the help. Eric's advice was actually enough to go on, I hadn't
considered the possibility that the *.pac file would be a readable text
script file.
Also, I did manage to read the *.pac file with Netscape (partly by luck)
by looking at the parent directory and then downloading the .pac file.
Once I looked at the file it was fairly obvious what the proxy host and
port number were.
I'll add a short summary about this to the Firewall page of the Swiki.
- Doug Way
dway at mat.net
On Wed, 21 Apr 1999, Bert Freudenberg wrote:
> On Wed, 21 Apr 1999, Eric Ulevik wrote:
>
> > From: <dway at mat.net>
> > >I was wondering if it was possible to get Squeak to work behind a firewall
> > with
> > >an "automatic" proxy configuration. For example, to use Netscape (4.51)
> > through
> > >this firewall I have the Proxies preferences set to "Automatic proxy
> > configuration"
> > >with a URL of "http://something/something.pac". There is no port number
> > setting
> > >with this option... (I guess that's what the automatic part handles?) I
> > don't
> > >have to enter a username/password with this setup.
> >
> > I suspect the '.pac' is just a text file that will contain the proxy
> > details.
>
> Not exactly - it is a text file, but it contains a JavaScript-Function
> "FindProxyForURL(url, host)". This function answers with a list of proxies
> ("PROXY url; ...") based on the url and the client host. Unless you build
> a JavaScript interpreter in Squeak there's no easy way to use this
> directly. What you _can_ do is looking at the .pac file, figure out what
> it does, and use this ... You cannot view the .pac file with Netscape, but
> with Squeak you could use
>
> (HTTPSocket httpGet: 'http://something/something.pac')
> contents withSqueakLineEndings
>
> But wait ... *if* a full proxy url is mentioned literally in this file,
> you might be able to automatically parse this string for the first
> occurrence of PROXY and use the word right after it as proxy url ...
>
> HTH,
>
> /bert
>
> --
> Bert Freudenberg Department of
> Simulation and
> mailto:bert at isg.cs.uni-magdeburg.de Computer Graphics
> http://isgwww.cs.uni-magdeburg.de/isg/bert.html Univ. of Magdeburg
>
>
>
More information about the Squeak-dev
mailing list
|