本文介绍使用代理报错
问题
在使用代理下载PlatformIO环境时一直报错如下:
requests.exceptions.ProxyError: HTTPSConnectionPool(host='dl.registry.ns3.platformio.org', port=443): Max retries exceeded with url: / (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1125)'))))
大概意思就是无法连接到代理服务器。
分析
- 首先PlatformIO是使用python开发的插件
- 写一段python代码试试py程序是否可以通过代理请求(http/https)网址
- 发现python程序也不能通过代理请求https的网址
- 然后取百度找解决办法
- 编不下去了,看原文怎么说吧
原文
解决方法
将你的本地代理如下方法添加到用户环境变量中
效果
配置完成之后你就可以享受流水般的下载速度了。
转载自:原文链接
注意
PlatformIO所需要的依赖包下载完成后,记得在环境变量中注释(删掉)HTTP_PROXY/HTTPS_PROXY。
如果你代理一直开启的话,可以不用。
不然会打不开项目,具体如下
Project has been successfully configured and is located by this path: D:\Code\VSCode\PlatformIO\subordinate-esp32\subordinate-esp32.You can open it with your favourite IDE or process with platformio run command.