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

Importing aria2c failed when using token #373

Open
Zhen-Bo opened this issue Jun 15, 2023 · 1 comment
Open

Importing aria2c failed when using token #373

Zhen-Bo opened this issue Jun 15, 2023 · 1 comment

Comments

@Zhen-Bo
Copy link

Zhen-Bo commented Jun 15, 2023

browser: Vivaldi | 6.1.3035.84 (Stable channel) (64 bit)
extension: 0.2.3 (latest version on chrome store)

When I use the "ARIA2 RPC" function in the right-click menu to download,
an error message of "importing aria2c failed" appears.
The JSON-RPC Path in my index.html is set as "http://token:$$token$$@127.0.0.1:16800/jsonrpc".
However, the request body sent by this extension lacks the secret "token:$$token$$" in the params field.

{
    "jsonrpc":"2.0",
    "method":"aria2.addUri",
    "id":1686818341684, 
    "params":[
        ["https://releases.ubuntu.com/xenial/ubuntu-16.04.7-desktop-amd64.iso"],
        {
            "header":["Cookie: ","User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"]
        }
    ]
}

it should be

{
    "jsonrpc":"2.0",
    "method":"aria2.addUri",
    "id":1686818341684, 
    "params":[
        "token:$$token$$",
        ["https://releases.ubuntu.com/xenial/ubuntu-16.04.7-desktop-amd64.iso"],
        {
            "header":["Cookie: ","User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"]
        }
    ]
}

when I using add button in index.html, it works functionally

[
  {
    "jsonrpc": "2.0",
    "method": "aria2.addUri",
    "id": 1,
    "params": [
      "token:$$token$$",
      [
        "https://releases.ubuntu.com/focal/ubuntu-20.04.6-desktop-amd64.iso"
      ],
      {
        "split": "64",
        "max-connection-per-server": "64",
        "seed-ratio": "1",
        "seed-time": "60"
      }
    ]
  }
]
@lyflyflxf
Copy link

"ARIA2 RPC" function in the right-click menu is configured separately from the one in index.html from the button in the "Options" page of YAAW. You can see "Options" after right clicking the icon of YAAW.

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

2 participants