RE: PAC files and CFNetworkCopyProxiesForAutoConfigurationScript()
RE: PAC files and CFNetworkCopyProxiesForAutoConfigurationScript()
- Subject: RE: PAC files and CFNetworkCopyProxiesForAutoConfigurationScript()
- From: Tommy Nguyen <email@hidden>
- Date: Fri, 11 Jul 2008 15:10:56 -0700
- Acceptlanguage: en-US
- Thread-topic: PAC files and CFNetworkCopyProxiesForAutoConfigurationScript()
Thanks for the info Mark. I've been playing around with your suggestion a little and have noticed that the OS seems to be doing some additional post-filtering of the results from FindProxyForURL, is this correct?
For example, say I have a PAC file that always returns "PROXY myproxy1:80; PROXY myproxy2:80"
If I were to pass in the url "http://www.apple.com" to CFNetworkCopyProxiesForAutoConfigurationScript(), then both proxies are returned. This is true for http, https, and ftp. However, if I pass in "unknown://www.apple.com" then I get back kCFProxyTypeNone.
But if I change the PAC file to return SOCKS proxies (eg: "SOCKS myproxy1:80; SOCKS myproxy2:80"), then I would indeed get back all of (and only) the SOCKS proxies in the PAC. So it appears the OS is doing some additional filtering beyond just passing back what the PAC file is returning...is this correct?
Thanks again,
Tommy
> -----Original Message-----
> From: Mark Pauley [mailto:email@hidden]
> Sent: Thursday, July 10, 2008 1:28 PM
> To: Tommy Nguyen
> Cc: email@hidden
> Subject: Re: PAC files and CFNetworkCopyProxiesForAutoConfigurationScript()
>
> So it's up to your pac file. We simply pass the url you give us to
> the script's FindProxyForURL function.
>
> Feel free to pass in "unknown://blahblahblah". We'll just turn that
> into a JavaScript string and pass it in as the first argument to
> FindProxyForURL.
>
>
> _Mark
>
> On Jul 10, 2008, at 12:49 PM, Tommy Nguyen wrote:
>
> > In using the CFNetworkCopyProxiesForAutoConfigurationScript()
> > function from CFProxySupport.h, it appears that the url passed in
> > MUST contain a scheme such as http://www.apple.com (simply passing
> www.apple.com
> > yields an error).
> >
> > This seems straightforward for HTTP, HTTPS, and FTP, but what should
> > one use when they simply want the SOCKS proxy for a given URL? For
> > example, if I want to know the SOCKS proxy to use to access a
> > service at someisp.com that's not HTTP, HTTPS, nor FTP, what's the
> > correct URL that should be passed in?
> >
> > Thanks,
> > Tommy
> >
> >
> > _______________________________________________
> > Do not post admin requests to the list. They will be ignored.
> > Macnetworkprog mailing list (email@hidden)
> > Help/Unsubscribe/Update your Subscription:
> >
> > This email sent to email@hidden
>
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden