How to use with web proxy

In the enterprise environment you sometimes need to bypass a web proxy. This document describes how you can use m2-proxy together with html proxy.

Proxy without password protection

  1. In WEB-INF/m2-proxy.properties set address and port where the classical proxy is running.
    #proxyserver data
    proxyserver.address=proxyaddr
    proxyserver.port=8080
    
  2. In WEB-INF/applicationContext.xml change the line on the beginning to
     <!--  For proxy bypass, change the following path to config file -->
     <import resource="httpClient-conf/httpClient-proxy.xml"/>
    

Proxy with password protection

  1. In WEB-INF/m2-proxy.properties set address and port where the web proxy is running. Then set the username and password
    #proxyserver data
    proxyserver.address=proxyaddr
    proxyserver.port=8080
    
    
    #proxyserver authorization
    proxyserver.username=username
    proxyserver.password=password
    
  2. In WEB-INF/applicationContext.xml change the line on the beginning to
     <!--   For proxy bypass, change the following path to config file  -->
     <import resource="httpClient-conf/httpClient-proxy-password.xml"/>
    

Proxy with NTLM protection

  1. In WEB-INF/m2-proxy.properties set address and port where the web proxy is running. Then set the username and password. You have to also set hostname of the computer where m2-proxy is running and domain in which you are connectiong. For more info see HttpClient documentation.
    #proxyserver data
    proxyserver.address=proxyaddr
    proxyserver.port=8080
    
    
    #proxyserver authorization
    proxyserver.username=username
    proxyserver.password=password
    
    #NTLM authorization
    #host name of the computer originating the request
    hostname=hostname
    #domain credentials are intended to authenticate with
    domain=domain
    
  2. In WEB-INF/applicationContext.xml change the line on the beginning to
     <!--   For proxy bypass, change the following path to config file  -->
     <import resource="httpClient-conf/httpClient-proxy-ntlm.xml"/>