我已按照以下步骤操作:
使用以下内容更新了我的环境变量:
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"
为我的用户名,域名和密码生成了正确的哈希值,并用它们更新了cntlm.ini文件。
完成所有这些后,我运行以下代码并获得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的详细信息,这可能是什么想法?
答案 0 :(得分:1)
我发现在为cntlm.ini文件添加哈希值时,需要注释掉密码行。当我注释掉密码行时,即:
# Password [my password]
Cntlm可以再次正常连接到代理。