Skip to content

Commit

Permalink
Merge pull request #13 from BlackDark/support-proxy-array
Browse files Browse the repository at this point in the history
Add support for providing multiple proxies
  • Loading branch information
robertdebock committed Feb 15, 2020
2 parents fceecfb + 072ba06 commit 83b442c
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
17 changes: 9 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,15 @@ docker run \

Other settings you might want to use are:

| Variable| Description |
| --- | --- |
| LISTEN | The IP/hostname and port (separated by a colon) to listen to. I.e. "127.0.0.1:8080" |
| PASSNTLMV2 | Required for auth method Auth NTLMv2. |
| AUTH | Auth parameter. |
| PASSNT | Required for auth method Auth NTLM2SR, Auth NT and Auth NTLM. |
| PASSLM | Required for auth method Auth LM and Auth NTLM. |
| OPTIONS | Optional variable to enable cntlm features. I.e. for debugging: "-v". |
| Variable | Description | Example |
| ---------- | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------- |
| LISTEN | The IP/hostname and port (separated by a colon) to listen to. | `127.0.0.1:8080` |
| PASSNTLMV2 | Required for auth method Auth NTLMv2. | |
| AUTH | Auth parameter. | |
| PASSNT | Required for auth method Auth NTLM2SR, Auth NT and Auth NTLM. | |
| PASSLM | Required for auth method Auth LM and Auth NTLM. | |
| PROXY | A proxy list the traffic is send to. Can be a list separated by `;`. Will be splitted into multiple `Proxy ...` lines in the `cntlm.conf`. | `localhost:3128;localhost:3129` |
| OPTIONS | Optional variable to enable cntlm features. | `-v` for debugging |

Find [technical details here](http://cntlm.sourceforge.net/cntlm_manual.pdf).

Expand Down
6 changes: 5 additions & 1 deletion start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,11 @@ fi
echo "Domain ${DOMAIN}" | tee -a /etc/cntlm.conf

if [ "${PROXY}" ] ; then
echo "Proxy ${PROXY}" | tee -a /etc/cntlm.conf
for i in $(echo ${PROXY} | sed "s/;/ /g")
do
echo "Proxy ${i}" | tee -a /etc/cntlm.conf
echo "Setting Proxy ${i}"
done
else
echo "No proxy defined! Please set it using the variable \"PROXY\"."
exit 1
Expand Down

0 comments on commit 83b442c

Please sign in to comment.