使用正确凭据的 Cntlm 代理身份验证问题

Cntlm Proxy Authentication Issue with Correct Credentials

我遵循了以下步骤:

  1. 使用正确的代理信息更新了我的 cntlm.ini 文件。
  2. 使用正确的用户名、密码和域信息更新了我的 cntlm.ini 文件。
  3. 使用以下内容更新了我的环境变量:

    setx -m HTTP_PROXY "http://127.0.0.1:3128"

    setx -m HTTPS_PROXY "http://127.0.0.1:3128"

    setx -m PATH "%PATH%;C:\Python34\Scripts"

  4. 为我的用户名、域和密码生成了正确的哈希值,并用它们更新了 cntlm.ini 文件。

  5. 启动了 Cntlm 服务。

完成所有这些后,我 运行 以下代码并获得 HTTP OK 代码:302。

cntlm -c cntlm.ini -I -M http://www.google.co.za

然后,当我尝试使用 pip 下载 Python 模块时,出现以下错误:

  Retrying (Retry(total=4, connect=None, read=None, redirect=None)) after connection broken by 'ProxyError('Cannot connect to proxy.', OSError('Tunnel connection failed: 407 Proxy Authentication Required ( Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied.  )',))': /simple/sphinx/

我检查并重新检查了输入 cntlm.ini 的详细信息,知道这可能是什么吗?

我发现在向 cntlm.ini 文件添加哈希值时,您需要注释掉密码行。当我注释掉密码行时,即:

# Password [my password]

Cntlm 可以再次正常连接到代理。