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

aria2.open() did not validate secret. #7

Open
Rewrite0 opened this issue May 8, 2023 · 2 comments
Open

aria2.open() did not validate secret. #7

Rewrite0 opened this issue May 8, 2023 · 2 comments

Comments

@Rewrite0
Copy link

Rewrite0 commented May 8, 2023

aria2 secret: '123'

const aria2 = new Aria2RPC(
      host: 'localhost',
      port: 6800,
      secure: false,
      secret: '',  // No '123'
      path: '/jsonrpc'
);

aria2
    .open()
    .then(() => console.log('open'))
    .catch(() => console.log('error'))

// expect 'error'
// But 'open'
@EternalC0der
Copy link
Owner

Hey,
as it is mentioned in the document you have to pass --rpc-secret argument to aria2c CLI.

image

@Rewrite0
Copy link
Author

Yes, I set rpc secret through aria2.conf.
I hope to verify the secret when aria2.open().
Instead of getting JSONRPCError: Unauthorized during method execution

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