diff --git a/README.md b/README.md index 4354a21..5606afc 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,7 @@ At least one of the following parameters is mandatory. Please make sure you chec - **CNTLM_PASSLM** - **CNTLM_PASSNT** - **CNTLM_PASSNTLMv2** + Note that in this case we are not passing the plain text password of the user, but its hash, which can be generated with the following command: ```bash @@ -170,6 +171,7 @@ $ sudo cntlm -H The following parameters are optional. If not provided, they will be assigned default values: - **CNTLM_PROXY_PORT**: it defaults to 3128 + - **CNTLM_NOPROXY**: it default to localhost, 127.0.0.*, 10.*, 192.168.* ```bash sudo docker run --name cntlm -e CNTLM_USERNAME=jascha -e CNTLM_DOMAIN=lostinmalloc -e CNTLM_PROXY_URL=proxy.lostinmalloc.com -e CNTLM_PROXY_PORT=3128 -e CNTLM_PASSNTLMv2=62229EA8B6C0EEC4D887AD048960CC01 -d jaschac/cntlm diff --git a/files/etc/cntlm.conf b/files/etc/cntlm.conf index 525d370..a30c578 100644 --- a/files/etc/cntlm.conf +++ b/files/etc/cntlm.conf @@ -10,6 +10,7 @@ Domain PassLM PassNT PassNTLMv2 +NoProxy # Specify the netbios hostname cntlm will send to the parent # proxies. Normally the value is auto-guessed. @@ -19,7 +20,7 @@ PassNTLMv2 # List of parent proxies to use. More proxies can be defined # one per line in format : # -Proxy : +#Proxy : # List addresses you do not want to pass to parent proxies # * and ? wildcards can be used diff --git a/scripts/init_container.sh b/scripts/init_container.sh index eda1b3e..d1ee012 100755 --- a/scripts/init_container.sh +++ b/scripts/init_container.sh @@ -12,6 +12,8 @@ set -e : ${CNTLM_PROXY_PORT:="3128"} : ${CNTLM_PROXY_URL:=""} : ${CNTLM_USERNAME:=""} +: ${CNTLM_NOPROXY:="localhost, 127.0.0.*, 10.*, 192.168.*"} + # Check if mandatory args were passed if [[ -z $CNTLM_USERNAME || -z $CNTLM_DOMAIN || -z $CNTLM_PROXY_URL ]] @@ -38,6 +40,7 @@ then sed -i 's//'${CNTLM_PROXY_PORT}/g /etc/cntlm.conf sed -i 's//'${CNTLM_PROXY_URL}/g /etc/cntlm.conf sed -i 's//'${CNTLM_USERNAME}/g /etc/cntlm.conf + sed -i 's//'${CNTLM_NOPROXY}/g /etc/cntlm.conf fi # Build and install cntlm