Re: Howto extract proxy from .pac script?
- From: Andrei Korostelev <andrei@xxxxxxxxxxxxxx>
- Date: Mon, 18 Jun 2007 01:20:14 -0700
On Jun 18, 4:01 am, Heath Raftery <hraft...@xxxxxxxxxxxxx> wrote:
Andrei Korostelev <and...@xxxxxxxxxxxxxx> wrote:
I have a path to the .pac file received using SystemConfiguration
Framework API. This .pac file allows selecting the appropriate proxy
server for a given URL.
The question is: is it any C/C++ API to extract proxy from this .pac
file for a given URL?
You need a full blown JavaScript interpreter - .pac files can use any
valid JavaScript, even though they often just do "if url is local,
return no proxy, else return this proxy". In my proxy server,
Authoxy, I used SpiderMonkey to do this. Fortunately, Authoxy is now
open source[1] (and I contributed some work back to the SpiderMonkey
team), so you'll welcome to benefit from what I've already done.
However, until Patrick posted in this thread, I was unaware of the
Cocoa interface. If I had the choice, I'd probably try to use that,
if I already had access to the Cocoa frameworks.
[1]http://sourceforge.net/projects/authoxy-panther/
--
*--------------------------------------------------------*
| ^Nothing is foolproof to a sufficiently talented fool^ |
| Heath Raftery, HRSoftWorks _\|/_ |
*______________________________________m_('.')_m_________*
Thanks to everybody. As I already noticed above, I solved the probvlem
by using JavaScript inpetrpreter from SpiderMonkey. Works fine both in
Mac and in Win. What I was looking for is a dedicated API in Mac OS X
to do the same. Carbon is the highest possible API layer I can use, so
Cocoa does not seem right choice. Nevertheless, thanks for you
autoproxy link, Heath.
.
- Follow-Ups:
- Re: Howto extract proxy from .pac script?
- From: Michael Ash
- Re: Howto extract proxy from .pac script?
- References:
- Howto extract proxy from .pac script?
- From: Andrei Korostelev
- Re: Howto extract proxy from .pac script?
- From: Heath Raftery
- Howto extract proxy from .pac script?
- Prev by Date: Re: Howto extract proxy from .pac script?
- Next by Date: Re: Howto extract proxy from .pac script?
- Previous by thread: Re: Howto extract proxy from .pac script?
- Next by thread: Re: Howto extract proxy from .pac script?
- Index(es):
Relevant Pages
|