You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Markus Bernhardt (JIRA)" <ji...@apache.org> on 2016/05/19 21:26:12 UTC

[jira] [Commented] (WAGON-423) Add support of .pac file for proxy configuration

    [ https://issues.apache.org/jira/browse/WAGON-423?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15292174#comment-15292174 ] 

Markus Bernhardt commented on WAGON-423:
----------------------------------------

Hi all,

I patched the support of .pac files for proxy configuration (and some other strategies to search for proxy settings) into AbstractHttpClientWagon in wagon-http.

*How to use it:*
Create an active proxy in your settings.xml file with the host name {color:red}*proxy-vole*{color}. This will be the marker for the patched wagon-http to automatically detect the hostname and port of your system proxy. All other parameters like username or nonProxyHosts will still work as expected.
{code:xml}
        <proxy>
            <id>auto</id>
            <active>true</active>
            <host>proxy-vole</host>
            <protocol>http</protocol>
            <username>me</username>
            <password>secret</password>
            <nonProxyHosts>*.intranet</nonProxyHosts>
        </proxy>
{code}

*Some remarks:*
* I believe the code should be moved to AbstractWagon. Patching it their would make the proxy auto detection be usable in any wagon that is using the getProxyInfo methods.
* I'm using the proxy-vole library to search for proxy settings. Because this library seems to be orphaned and was not available on any Maven repository I forked the library, cleaned it up a little bit and deployed it to Central.
* At the moment always the default proxy search strategies for the current environment will be used. This could be made configurable, if needed.

*What do you think about this patch?*
*Is there any chance to get this or something like it integrated into maven?*

You can find the patch here:
https://github.com/MarkusBernhardt/maven-wagon/commit/8a084631cfd5d6584f782841d45d0b3fb6348312

You can find proxy-vole here:
https://github.com/MarkusBernhardt/proxy-vole

Have fun,
Markus

> Add support of .pac file for proxy configuration
> ------------------------------------------------
>
>                 Key: WAGON-423
>                 URL: https://issues.apache.org/jira/browse/WAGON-423
>             Project: Maven Wagon
>          Issue Type: New Feature
>          Components: wagon-http, wagon-http-lightweight
>            Reporter: Emmanuel Venisse
>            Priority: Minor
>
> Authorize Proxy Auto-Config File (.pac file) for proxy configuration in user model.
> http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html
> =>Use rhino for read the pac file.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)