alexhua / Aria2-Explorer

An aria2 download task management extension for chromium based browser
https://www.aria2e.com/
BSD 3-Clause "New" or "Revised" License
788 stars 66 forks source link

The extension does not recognize --rpc-secret token or HTTPS connection properly #95

Closed fnfontana closed 2 years ago

fnfontana commented 2 years ago

Describe the bug After enable the option --rpc-secret and fill up the correspondent "Aria2 RPC Secret Token" field and/or enable HTTPS using the options --rpc-certificate; --rpc-private-key; --rpc-secure; the AriaNg connects and even can download files, but the 'Download Capture' feature does not work, so it's needed to manually add the download links and the error message 'Failed to connect with Aria2. Reason:Unauthorized' is displayed on the extension icon, which also displays a red letter 'E' meaning "Error".

To Reproduce Steps to reproduce the behavior:

  1. Start aria2c.exe with the parameter --rpc-secret='security-token' or add it to aria2.conf file.
  2. Add the same security-token to AriaNg
  3. It will connect, and even can download files…
  4. But displays the error message, the download capture feature does not work properly and downloads must be manually added and the red letter 'E' is displayed on the extension icon.

The steps to reproduce the related to HTTPS connection error are the same, just add to aria2.conf file:

It will connect, but the same error message will be displayed. Also, the download capture feature does not work.

Expected behavior After passes the --rpc-secret= option to aria2c.exe when launching the RPC server and add the correspondent secret token to AriaNg, is expected to work normally and with security enforced. Also, when using HTTPS instead of just HTTP.

Screenshots image image

Desktop (please complete the following information):

Additional context I don't know if using HTTPS in that case makes sense, because aria2c.exe it's running on my Desktop PC (localhost). But I also have a NAS and want to run aria2c rpc server on there in the future, that's the reason I'm trying to make HTTPS connection to localhost.

alexhua commented 2 years ago

AriaNG settings and extension capture function settings are independent. Capture function should also work with HTTPS protocol and secret key option after setting in extension option page correctly. "Reason:Unauthorized" means that secret key is not set correctly. image Would you please check it again?

fnfontana commented 2 years ago

AriaNG settings and extension capture function settings are independent. Capture function should also work with HTTPS protocol and secret key option after setting in extension option page correctly. "Reason:Unauthorized" means that secret key is not set correctly. image Would you please check it again?

Thank you! I didn't have seen before the extension options page. Now it's working fine with --rpc-secret and HTTPS enabled.