{"id":19402350,"url":"https://github.com/robertdebock/docker-cntlm","last_synced_at":"2025-04-24T07:31:39.302Z","repository":{"id":54535356,"uuid":"55974340","full_name":"robertdebock/docker-cntlm","owner":"robertdebock","description":"A container to function as a proxy. Other containers can link to this one for their web access.","archived":false,"fork":false,"pushed_at":"2024-01-08T13:59:53.000Z","size":78,"stargazers_count":47,"open_issues_count":1,"forks_count":12,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-02T02:19:57.710Z","etag":null,"topics":["cntlm","docker","docker-compose"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-04-11T13:23:22.000Z","updated_at":"2024-04-15T11:28:41.000Z","dependencies_parsed_at":"2024-01-08T15:34:33.427Z","dependency_job_id":null,"html_url":"https://github.com/robertdebock/docker-cntlm","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-cntlm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-cntlm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-cntlm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-cntlm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/docker-cntlm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223944883,"owners_count":17229533,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cntlm","docker","docker-compose"],"created_at":"2024-11-10T11:23:12.633Z","updated_at":"2024-11-10T11:23:13.176Z","avatar_url":"https://github.com/robertdebock.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-cntlm\n\n[![build-push](https://github.com/robertdebock/docker-cntlm/actions/workflows/build-push-action.yml/badge.svg)](https://github.com/robertdebock/docker-cntlm/actions/workflows/build-push-action.yml)\n\nA container to function as a proxy, based on [CNTLM](http://cntlm.sourceforge.net). Other systemc can connect to this proxy for their web access. This container authenticates to an external proxy and can be used by others without authentication details.\n\n```text\n              +- - - - - - -+  +- - - - - - - - -+\n              | no password |  | password (hash) |\n              +- - - - - - -+  +- - - - - - - - -+\n                      |              |\n+------------------+  V   +-------+  V   +-----------------+      +----------+\n| your workstation | ---\u003e | cntlm | ---\u003e | corporate proxy | ---\u003e | internet |\n+------------------+      +-------+      +-----------------+      +----------+\n```\n\n## Generating a password hash\n\nA password hash needs te be generated once, after which is can be used when running the proxy.\n\n```console\ndocker run \\\n  -e \"USERNAME=my_username\" \\\n  -e \"DOMAIN=example.com\" \\\n  -e \"PROXY=proxy.example.com:3128\" \\\n  --rm -it robertdebock/docker-cntlm -H\n```\n\nNow you have to enter your password (which will not be displayed) and press enter.\n\nReplace:\n\n- `my_username` for your own username.\n- `example.com` for you own domain.\n\n\u003e The `PROXY` variable can have any value when generating a hash. For running CNTLM, a correct value is required.\n\nYou'll seen output like this:\n\n```text\n    Password: \n    PassLM          1AD35398BE6565DDB5C4EF70C0593492\n    PassNT          77B9081511704EE852F94227CF48A793\n    PassNTLMv2      640937B847F8C6439D87155508FA8479    # Only for user 'username', domain 'mydomain'\n```\n\n## Running the proxy\n\nTo run the proxy:\n\n- you'll need the PASSNTLMV2 hash generated in the step before.\n- you'll also need the proxy to send traffic to.\n\nThis is an example of how to run this container.\n\n``` console\ndocker run --restart always --name cntlm \\\n  -e \"USERNAME=my_username\" \\\n  -e \"DOMAIN=example.com\" \\\n  -e \"PASSNTLMV2=MY_HASH_MY_HASH_MY_HASH_MY_HASH_\" \\\n  -e \"PROXY=proxy.example.com:3128\" \\\n  -p 3128:3128 \\\n  robertdebock/docker-cntlm\n```\n\n# Required variabled.\n\n|VARIABLE    |EXAMPLE                           |DESCRIPTION                                  |\n|------------|----------------------------------|---------------------------------------------|\n|`USERNAME`  |`my_username`                     |Your username, without a domain (`@` or `\\`).|\n|`DOMAIN`    |`example.com`                     |The domain where your user lives.            |\n|`PASSNTLMV2`|`640937B847F8C6439D87155508FA8479`|The generated hash, see above.               |\n|`PROXY` *   |`proxy.example.com`               |The hostname (or IP) of your corporate proxy.|\n\n* = `PROXY` can be a string (single) or a list (mulitple). For example: `example.com:3128;example.com:3129`.\n\n\u003e The `-p 3138:3128` maps the port on a host (left from colon) to a port on the container (right from colon).\n\n# Optional variables\n\n\n|VARIABLE     |EXAMPLE          |DESCRIPTION                                                                    |\n|-------------|-----------------|-------------------------------------------------------------------------------|\n|LISTEN       |`127.0.0.1:8080` |The IP/hostname and port (separated by a colon) to listen to.                  |\n|AUTH         |                 |Auth parameter.                                                                |\n|PASSNT       |                 |Required for auth method Auth NTLM2SR, Auth NT and Auth NTLM.                  |\n|PASSLM       |                 |equired for auth method Auth LM and Auth NTLM.                                 |\n|NOPROXY      |`127.0.0.1, 10.*`|For address which should not be routed through the proxy. Comma separated list.|\n|OPTIONS      |`-v`             |Optional variable to enable cntlm features.                                    |\n|CUSTOM_CONFIG|                 |                                                                               |\n\n\u003e Find [technical details here](http://cntlm.sourceforge.net/cntlm_manual.pdf).\n\n## Mount custom config\n\nIf you want to use an existing `cntlm.conf` you can mount it directly by settings the `CUSTOM_CONFIG` environment variable.\n\n``` console\ndocker run --restart always --name cntlm \\\n  -e \"CUSTOM_CONFIG=true\" \\\n  -p 3128:3128 \\\n  -v /etc/cntlm.conf:/path/to/your/cntlm.conf \\\n  robertdebock/docker-cntlm\n```\n\n## Using in Docker Compose\n\nYou can use this container quite well in a docker-compose. Docker compose can simply be used to run as a stand-alone proxy. In that case the docker-compose.yml simply saves all variable, and can be started by running:\n\n```console\ndocker-compose up\n```\n\nYou can add the CNTLM service in a set of other containers, and let (outgoing) traffic from you application go through the cntlm proxy.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fdocker-cntlm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fdocker-cntlm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fdocker-cntlm/lists"}