从服务器接收到状态码407:要求代理身份验证 [英] Received status code 407 from server: Proxy Authentication Required

查看:139
本文介绍了从服务器接收到状态码407:要求代理身份验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新Android Studio和Gradle之后,出现以下错误.

After Updating Android Studio and Gradle i get below error.

我尝试过的事情:
1.我正在使用代理,并且尝试过自动和手动代理设置.检查连接是否成功,是否成功,android sdk更新也会显示,但库和存储库不是从google(),jcenter()等下载的.
2.以管理员身份运行不能解决问题.3.在同一代理正常工作之前,我还尝试了其他无效的代理.
4.我正在使用Windows 10,Gradle 4.4,Android Studio 3.1.
5.恢复到3.0版并不能解决问题.
6.恢复到gradle 4.1不能解决问题.
7.清理项目,使缓存无效+重新启动无效.

What i have tried:
1. I'm using a proxy and have tried automatic and manual proxy settings. check connection works and is successful, android sdk updates also shows but libraries and repositories not downloaded from google(), jcenter(), etc.
2. run as admin doesn't fix the problem. 3. the same proxy was working correctly before, i also tried other proxies which didn't work.
4. i am using windows 10, gradle 4.4, android studio 3.1.
5. reverting back to version 3.0 didn't fix the problem.
6. reverting back to gradle 4.1 didn't fix the problem.
7. clean project, invalidate cache + restart doesn't work.

更新:问题来自3.1版及更高版本,似乎从具有代理身份验证的android studio中的3.1版开始进行了某种更改.我仍然无法解决它.

Update: the problem comes from the version 3.1 and upward, it seems there was some sort of change from version 3.1 in android studio with proxy authentication. i still can't fix it.

推荐答案

我正在使用这两行,对我来说很好用.

I'm using this two lines and works fine for me.

systemProp.http.proxyHost=HostIP
systemProp.http.proxyPort=portNumber

如果您需要使用身份验证,请再添加以下两行:

If you need to use authentication add these two more lines:

systemProp.http.proxyUser=user
systemProp.http.proxyPassword=password

我从不需要使用https设置.

I never had to use https settings.

请确保您使用的Http代理能够绕过Https协议.我建议使用诸如free-proxy-list.net,hidemy.name/en/proxy-list之类的网站,这些网站甚至提供未经身份验证的代理服务器.

Be sure that Http proxy which you are using is able to bypass Https protocol. I suggest using sites like free-proxy-list.net, hidemy.name/en/proxy-list which even provide proxy servers without authentication.

但是首先要在浏览器中测试代理.

But first test the proxy in browser.

如果您确实需要使用所拥有的代理服务器(位于防火墙或其他防护设备之后).绑定代理的另一种方法是使用 Proxifier 这样的软件规则截图强制所有连接.

IF you really need to use the proxy server which you have (Being behind a firewall or something). The alternative way of binding proxy is to use softwares like Proxifier Alternatives. This app can force all connection through proxy Rules Screenshot.

这篇关于从服务器接收到状态码407:要求代理身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆