deepin使用代理但是request.get、curl 、wget 都访问不到 jsdelivr挂的github图片

curl:

(pica) xnne@xnne-PC:~/code/Pica-Image-Bed/input$ curl https://fastly.jsdelivr.net/gh/MrXnneHang/blog_img/BlogHosting/img/24/10/image-20241022164841766.png
Moved Permanently. Redirecting to https://raw.githubusercontent.com/MrXnneHang/blog_img/master/BlogHosting/img/24/10/image-20241022164841766.png

wget:

(pica) xnne@xnne-PC:~/code/Pica-Image-Bed/input$ wget https://fastly.jsdelivr.net/gh/MrXnneHang/blog_img/BlogHosting/img/24/10/image-20241022164841766.png
--2024-10-23 11:25:17--  https://fastly.jsdelivr.net/gh/MrXnneHang/blog_img/BlogHosting/img/24/10/image-20241022164841766.png
正在解析主机 fastly.jsdelivr.net (fastly.jsdelivr.net)... 2a04:4e42:8c::485, 146.75.113.229
正在连接 fastly.jsdelivr.net (fastly.jsdelivr.net)|2a04:4e42:8c::485|:443... 已连接。
已发出 HTTP 请求,正在等待回应... 301 Moved Permanently
位置:https://raw.githubusercontent.com/MrXnneHang/blog_img/master/BlogHosting/img/24/10/image-20241022164841766.png [跟随至新的 URL]
--2024-10-23 11:25:18--  https://raw.githubusercontent.com/MrXnneHang/blog_img/master/BlogHosting/img/24/10/image-20241022164841766.png
正在解析主机 raw.githubusercontent.com (raw.githubusercontent.com)... 0.0.0.0, ::
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443... 失败:拒绝连接。
正在连接 raw.githubusercontent.com (raw.githubusercontent.com)|::|:443... 失败:拒绝连接。

以及python request.get:

Error downloading https://fastly.jsdelivr.net/gh/MrXnneHang/blog_img/BlogHosting/img/24/10/image-20241022164841766.png: HTTPSConnectionPool(host='fastly.jsdelivr.net', port=443): Max retries exceeded with url: /gh/MrXnneHang/blog_img/BlogHosting/img/24/10/image-20241022164841766.png (Caused by ProxyError('Unable to connect to proxy', SSLError(SSLEOFError(8, '[SSL: UNEXPECTED_EOF_WHILE_READING] EOF occurred in violation of protocol (_ssl.c:1007)'))))
Retrying... (1/5)

网页可以正常访问。

在windows python脚本是正常的。

这个是什么原因 :joy:。

系统deepin23

代理测试没有问题,pip install curl github.com都测试过,wget chrome_driver也都可以。

试试路径加个 /master/ ?

curl https://fastly.jsdelivr.net/gh/MrXnneHang/blog_img/master/BlogHosting/img/24/10/image-20241022164841766.png

@bbb @cvv
B无知速来


那个cdn是自定义的

俺也不知道为啥下午突然就可以了。

而且没发现是改了哪里可以。

下午只是单独写了一个request.get去下载图片然后测试成功后把它覆盖到了原本的代码中。

好像没有什么特别需要记录的,没发现。


我尝试了proxy_on和proxy_off,request.get都是可以下载到的。

wget依然不行,但我原本就是测试python里的,所以问题不大。

你原来估计被dns污染了,都解析到0.0.0.0去了