[ 
https://issues.apache.org/jira/browse/JCR-3957?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Julian Reschke resolved JCR-3957.
---------------------------------
    Resolution: Duplicate

There should be a single fix for both variants in spi2dav.

> Need http proxy support for Davex connection
> --------------------------------------------
>
>                 Key: JCR-3957
>                 URL: https://issues.apache.org/jira/browse/JCR-3957
>             Project: Jackrabbit Content Repository
>          Issue Type: Improvement
>          Components: jackrabbit-spi2dav
>    Affects Versions: 2.12.1
>            Reporter: Kenichi Ando
>            Priority: Major
>         Attachments: RepositoryServiceImpl.java
>
>
> This is an enhancement request for Jackrabbit JCR connection. The current 
> Jackrabbit implementation does not support http proxy. This would be a 
> problem for customers whose network requires proxy configurations.
> JVM has some system properties related to proxy configurations, such as 
> http.proxyHost, http.proxyPort and java.net.useSystemProxies. However, these 
> properties don’t work, because the jackrabbit implementation depends on 
> Apache HttpClient 3.x, which ignores them.
>  
> The way to support proxy is described in the following url.
> http://aem-authentication.blogspot.jp/p/new-jcr-api-for-remote-connection.html
> According to this blog, it's not difficult to change the code to support 
> proxy. 
> Actually, when I modify org.apache.jackrabbit.spi2dav.RepositoryServiceImpl 
> to call hostConfig.setProxy(), the client program can connect to the 
> repository via proxy server. 
> ~~~~~~~~~~~~~~~
> [line#337]
>                       //set proxy host
>                       String proxyHost = System.getProperty("http.proxyHost");
>                       int proxyPort = 
> Integer.valueOf(System.getProperty("http.proxyPort"));
>                       if (proxyHost != null) {
>                               System.out.println("[setProxy] " + proxyHost + 
> ":" + proxyPort);
>                               hostConfig.setProxy(proxyHost, proxyPort);
>                       }
> ~~~~~~~~~~~~~~~
> [line#554]
>                       // set proxy credentials
>                       String proxyHost = System.getProperty("http.proxyHost");
>                       int proxyPort = 
> Integer.valueOf(System.getProperty("http.proxyPort"));
>                       String proxyUser = System.getProperty("http.proxyUser");
>                       String proxyPassword = 
> System.getProperty("http.proxyPassword");
>                       
>                       if (proxyHost != null && proxyUser != null) {
>                               System.out.println("[setProxyCredentials] " + 
> proxyUser + "/" + proxyPassword);
>                               client.getState().setProxyCredentials(
>                                                               new 
> AuthScope(proxyHost, proxyPort),
>                                                               new 
> UsernamePasswordCredentials(proxyUser, proxyPassword));
>                       }
> ~~~~~~~~~~~~~~~
> Please find the code I modified in attachment.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to