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

Connect to aria2 server failed with self-signed certificate via HTTPS/WSS #85

Closed sci-42ver closed 2 years ago

sci-42ver commented 2 years ago

Describe the bug A clear and concise description of what the bug is.

 [INFO] [HttpServerCommand.cc:272] CUID#33 - Error occurred while reading HTTP request

Exception: [SocketCore.cc:1018] errorCode=1 SSL/TLS handshake failure: Error: An unknown error occurred while processing the certificate.
POST https://localhost:9600/jsonrpc net::ERR_CERT_AUTHORITY_INVALID angular-packages-1.6.10.min.js:formatted:3191 

To Reproduce Steps to reproduce the behavior:

  1. Go to 'AriaNg setting '

  2. change port to my customized port in conf rpc-listen-port=9600

    my aria2.conf

    daemon=true
    log=D:\aria_config\aria2.log
    log-level=debug
    console-log-level=notice
    
    auto-save-interval=30
    dir=D:\aria_config
    file-allocation=falloc
    continue=true
    max-concurrent-downloads=20
    max-connection-per-server=16
    min-split-size=1M
    split=20
    
    save-session=D:\aria_config\aria2.session
    save-session-interval=60
    
    enable-rpc=true
    pause=false
    rpc-allow-origin-all=true
    rpc-listen-all=true
    rpc-save-upload-metadata=true
    event-poll=select
    rpc-listen-port=9600
    rpc-secure=true
    rpc-secret=test
    rpc-certificate=D:\Applications\Scoop\apps\aria2\1.36.0-1\aria2.pfx
    listen-port=51413
    follow-torrent=mem
    follow-metalink=mem
    enable-dht=true
    dht-listen-port=51413
    dht-file-path=D:\aria_config\dht.dat
    dht-file-path6=D:\aria_config\dht6.dat
    
    bt-enable-lpd=true
    enable-peer-exchange=true
    bt-request-peer-speed-limit=1M
    peer-id-prefix=-example-
    
    user-agent=Transmission/2.92
    seed-ratio=2.0
    seed-time=120
    force-save=true
    bt-seed-unverified=false
    bt-force-encryption=true
    bt-save-metadata=true
  3. Click on 'https' / 'wws'

  4. Scroll down to 'token' change to my customized token test based on

    rpc-secret=test

  5. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

image

image

image

Desktop (please complete the following information):

Vivaldi 5.0.2497.35 (Stable channel) (64-bit)
Revision 4d8d501b3fc052c66885c54abb3d4f7202fed5f0
OS Windows 10 Version 21H2 (Build 19044.1415)
JavaScript V8 9.6.180.22
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.137 Safari/537.36
Command Line "C:\Users\czg\AppData\Local\Vivaldi\Application\vivaldi.exe" --flag-switches-begin --enable-gpu-rasterization --enable-quic --enable-features=LensRegionSearch,SendTabToSelfManageDevicesLink,SendTabToSelfWhenSignedIn --flag-switches-end --origin-trial-disabled-features=CaptureHandle --save-page-as-mhtml

Additional context Add any other context about the problem here.

sci-42ver commented 2 years ago
alexhua commented 2 years ago

Solution: import your self-signed certificate into system as root CA.