System proxy settings should be drawn from Apple's CFProxySupport API instead of SCDynamicStoreCopyProxies

UNCONFIRMED
Unassigned

Status

()

Core
Networking
P5
normal
UNCONFIRMED
9 years ago
9 months ago

People

(Reporter: Andrew Shilliday, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [necko-would-take])

(Reporter)

Description

9 years ago
User-Agent:       Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090625 Shiretoko/3.5pre
Build Identifier: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1pre) Gecko/20090625 Shiretoko/3.5pre

The way Firefox 3.5.x uses OS X system proxies (when option is selected) is by using the SCDynamicStoreCopyProxies interface to the network system preferences (each time they are changed) and ingesting the host and port for the following proxies: http, https, ftp, and SOCKS proxies.

When load requests are issued, it uses this information to decide on the best proxy (if any) to use according to the uri scheme, etc.  This is an acceptable strategy and it works (or it will when a few bugs are fixed).  There is an alternative to use the CFProxySupport which pushes responsibility to the OS to decide the best proxies to use for a given URI.  You call a function, passing in the URI, and it returns a list of proxies which ought be tried in order of priority (it's up to the system as to whether all entries in the list are actually tried or only the first). 

So the question is whether or not to reorg the code to use the CFProxySupport API.  I'll list a few pros/cons and open discussion:

pros:
 - Potentially higher degree of consistency with other OS as well as other applications.
 - Simplification of code
 - Take advantage of latest OS X APIs
cons:
 - Will require OS X 10.5 or later (this may be a requirement of the next major release anyway)
 - Will require some additional coding

If there's a consensus that we should move ahead, I can take the lead for the necessary patch.


Reproducible: Always
(Reporter)

Comment 1

9 years ago
Oh, I forgot to link to the applicable Apple documentation:
http://developer.apple.com/documentation/CoreFoundation/Reference/CFProxySupport/Reference/reference.html
Whiteboard: [necko-would-take]
You need to log in before you can comment on or make changes to this bug.