SuperNG6 / docker-aria2

Docker Aria2的最佳实践
https://hub.docker.com/r/superng6/aria2
428 stars 46 forks source link

NGINX +SSL 连接RPC的问题 #51

Open xiaoyuesansui opened 2 years ago

xiaoyuesansui commented 2 years ago

可否讲一下配合nginx 对rpc进行ssl 连接?

相关aria2.conf的设置已经做好,nginx中也进行了调整 大体配置如下

listn 8192 ssl server my.domin.com ...

location /jsonrpc {

Proxy jsonrpc to local aria2c server, since https page can't make "http" and "ws" connection.

            # To connect, simply connect to wss://DOMAIN_NAME:443/jsonrpc
            proxy_pass http://localhost:6800/jsonrpc;
            proxy_redirect off;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header Host $host;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
          }

location / {
    proxy_pass         http://192.168.50.49:6880;
    }

https://my.domin.com:8192 可以顺利进入webui,但是RPC无法连接

其中,RPC我尝试过 ARIA2 RPC地址 https://my.domin.com:6800/jsonrpc 和https://my.domin.com:8192/jsonrpc 前者连接失败,后者卡连接中

RPC token没有配置错误 如果rpc-enable=false, 那么http://localhost:6880 可以顺利连接RPC

请问我该如何调整配置?

hausen1012 commented 6 months ago

同样遇到问题

yingguqing commented 1 month ago

使用了nginx转发,ARIA2 RPC地址端口不要用6800,https就直接填443。https://my.domin.com:443/jsonrpc

hausen1012 commented 1 month ago

使用了nginx转发,ARIA2 RPC地址端口不要用6800,https就直接填443。https://my.domin.com:443/jsonrpc

我现在也是这么干的,rpc也反代