[icedtea-web] RFC: add proxy auto config support

Omair Majid omajid at redhat.com
Wed Feb 16 11:21:52 PST 2011


Hi,

The attached patch adds support for reading, parsing and using proxy 
auto config (PAC) files to icedtea-web.

PAC files are written in javascript, so this patch also adds a 
dependency on rhino for building. A dependency on jrunscript is also 
added for testing.

PAC files will be used by both plugin and netx if deployment.proxy.type 
is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC 
file. PAC files may also be used by netx if deployment.proxy.type is 3 
(browser) and the browser (firefox) is using a proxy auto config file 
for resolving proxies.

The PAC file is evaluated inside a sandbox - which only has permissions 
to resolve urls. Because we dont want to grant createclassloader 
permissions, I have had to set (in ProxyAutoConfig.java):
                 cx.setOptimizationLevel(-1);
which works without creating classes (and so works without 
createClassLoader permissions). This option is not available by going 
through the Java ScriptEngine apis. The patch therefore uses the rhino 
apis directly.

Since parsing a PAC file requires access to a set of additional 
functions, the patch also implements them. Tests for these are included.

make check should run these tests and end by printing a line like:
X of Y tests failed

Any thoughts or comments?

Cheers,
Omair
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pac-support-06.patch
Type: text/x-patch
Size: 63594 bytes
Desc: not available
Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110216/d77241a2/pac-support-06.patch 


More information about the distro-pkg-dev mailing list