Using pip behind a proxy with CNTLM

前端 未结 30 2515
囚心锁ツ
囚心锁ツ 2020-11-22 11:00

I am trying to use pip behind a proxy at work.

One of the answers from this post suggested using CNTLM. I installed and configured it per this other post, but runnin

30条回答
  •  萌比男神i
    2020-11-22 11:25

    To setup CNTLM for windows, follow this article. For Ubuntu, read my blog post.

    Edit:

    Basically, to use CNTLM in any platform, you need to setup your username and hashed password, before using http://127.0.0.1:3128 as a proxy to your parent proxy.

    1. Edit the config and add important information like domain, username, password and parent proxy.

    2. Generate hashed password.

      Windows cntlm –c cntlm.ini –H

      Ubuntu/Linux cntlm -v -H -c /etc/cntlm.conf

    3. Remove plain text password from the config and replace them with the generated passwords.

    To check if working:

    Windows cntlm –M http://www.google.com

    Ubuntu/Linux sudo cntlm -M http://www.google.com/

    For more detailed instructions, see links above.

    Update:

    Just for completeness sake, I was able to configure and use CNTLM in Windows recently. I encountered a problem during the syncing process of Kindle for PC because of our proxy and installing and configuring CNTLM for Windows fixed that issue for me. Refer to my article for more details.

提交回复
热议问题