7 Commits

Author SHA1 Message Date
Jason Monk
e6b4163f38 Merge "Verify inputs to PAC resolving." into klp-dev 2013-09-10 20:27:23 +00:00
Jason Monk
da205a749f System binds PAC Local Proxy instead of self start
The PAC Local Proxy priviously caught proxy broadcasts and started itself
when needed.  Now it is bound by the system the same way the pac processing
service is started.

Bug: 10425091
Change-Id: I746daa21645a11aa18ef464f00c8cb5536d8c86f
2013-08-22 16:33:26 -04:00
Jason Monk
7a6af1c093 Verify inputs to PAC resolving.
This verifies both the URL and host are valid before they are passed to the
javascript for PAC.  This is to protect against injection attacks.

Bug: 10230771
Change-Id: Ib1996181971a49ccd390f181ec3848124801e4d5
2013-08-22 15:46:11 -04:00
Jason Monk
ff796e5a24 Merge "Change PacProcessor to Android Service" into klp-dev 2013-08-20 23:35:26 +00:00
Jason Monk
9ced3cd9d6 Change PacProcessor to Android Service
This switches the PacProcessor over to an Android Service.  The service
is bound and unbound by the PacManager, which also adds it to the
ServiceManager, allowing for Context-Free access by the PacProxySelector
in all DVMs.

bug:10182711
Change-Id: Id1ff7660be56e8976cdcccd76e041feb47a17a61
2013-08-20 17:36:39 -04:00
Jason Monk
433ba46fcc Fix ProxyHandler to only run when needed
Changes ProxyHandler service to only be active when needed for PAC services.

Bug: 10260877
Change-Id: If42e53e805488fd08381baa96409ba3027661c70
2013-08-20 15:27:51 -04:00
Jason Monk
602b232a06 Add PAC File support for proxy configuration
PAC (Proxy auto-config) files contain a single javascript function,
FindProxyForURL(url, host).  It gets called to determine what proxy should be
used for a specific request.

This adds PAC support to the system.  The ProxyProperties has been modified
to hold the PAC file when one is present.  The Proxy method
setHttpProxySystemProperty has been modified to insert a PacProxySelector
as the default ProxySelector when it is required.  This new ProxySelector
makes calls to the ConnectivityService to parse the PAC file.

The ConnectivityService and the WifiConfigStore have been modified to support
saving the extra PAC file data.

The ConnectivityService now has a class attached (PacProxyNative) that
interfaces to the native calls for PAC files.  The parsing of the PAC file
is handled by libpac (which is being added to external/) which utilizes
libv8 to parse the javascript.

As a fallback to applications that don't use the java ProxySelector,  the proxy
is setup to point to a local proxy server that will handle the pac parsing.

bug:10182711
Change-Id: I5eb8df893c632fd3e1b732385cb7720ad646f401
2013-08-07 21:01:39 -04:00