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

一旦使用HTTPS协议就无法连接 #62

Closed
Co1lin opened this issue Jul 1, 2017 · 22 comments
Closed

一旦使用HTTPS协议就无法连接 #62

Co1lin opened this issue Jul 1, 2017 · 22 comments

Comments

@Co1lin
Copy link

Co1lin commented Jul 1, 2017

一旦使用HTTPS协议就无法连接,换为HTTP就可以。已经在RPC设置里切换。

@mayswind
Copy link
Owner

mayswind commented Jul 1, 2017

证书什么的有配置么

@josht45
Copy link

josht45 commented Jul 4, 2017

百度云网盘输出到aria2 后完全没有不动,该如何?https 问题吗?

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@josht45 这个跟AriaNg没关系吧

@josht45
Copy link

josht45 commented Jul 4, 2017

@mayswind 对不起。新手。第一次使用。

@Co1lin
Copy link
Author

Co1lin commented Jul 4, 2017

@mayswind 证书在lnmp的配置文件中已经配置过了,和其它虚拟主机一样。

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@EnjoyColin 你直接用浏览器调用rpc的接口会提示什么?

@Co1lin
Copy link
Author

Co1lin commented Jul 4, 2017

@mayswind 用浏览器 http://domain:port/jsonrpc 打不开啊。不过现在HTTP协议下是能连接成功的。

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@EnjoyColin 还是aria2没有配置正确的问题吧

@Co1lin
Copy link
Author

Co1lin commented Jul 4, 2017

@mayswind 但是现在可以下载东西啊。

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@EnjoyColin 能不能连上跟能不能下载东西没关系吧

@Co1lin
Copy link
Author

Co1lin commented Jul 4, 2017

@mayswind 不是,就是现在在HTTP下能通过面板用Aria下载东西。但是只要是切换到HTTPS,同时我也更改了面板中的“Aria2 RPC 协议”为HTTPS,并且填入秘钥,但是就怎么也无法与后台连接了。

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@EnjoyColin 还是aria2没有配置正确的问题吧

@Co1lin
Copy link
Author

Co1lin commented Jul 4, 2017

那后台应该怎么配置?

@mayswind
Copy link
Owner

mayswind commented Jul 4, 2017

@EnjoyColin 详情参考 aria2 的文档吧

@Fengzhiying2017
Copy link

也遇到了同样的问题,http可以连接,切换到https就无法连接了,证书什么的都配置好了

@mayswind
Copy link
Owner

mayswind commented Aug 2, 2017

@Fengzhiying2017 尝试在浏览器里访问你服务器的地址,如https://domain:port/jsonrpc

@LetMeDecay
Copy link

我测试也是这个问题
同样的域名,先开启ssl访问无法连接,关闭后http访问就能连接了

@mayswind
Copy link
Owner

@dk2048 你在浏览器里直接访问rpc地址能成功么

@LetMeDecay
Copy link

LetMeDecay commented Aug 19, 2017

@mayswind 不能访问,但是vps上http的AriaNg能连上
我把这个下载到PC上,Chrome打开,修改地址为http://mydomain:6800/jsonrpc 都可以连上

@mayswind
Copy link
Owner

@dk2048 那还是配置的问题吧

@LetMeDecay
Copy link

@mayswind 找到解决方法了
你这个配置证书没说清,我和楼主估计都以为是在nginx中配置ssl,其实是aria2.conf中配置才对

第一种方法是直接在aria2.conf中添加

rpc-secure=true  
rpc-certificate=/path/to/cer  
rpc-private-key=/path/to/key

然后修改地址为https://yoursite.com:6800/jsonrpc

第二种方法就是先添加方法一的配置文件,然后在nginx的网站配置文件中加入

location ^~ /jsonrpc {
      proxy_set_header X-Real-IP $remote_addr;
      proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
      proxy_set_header Host $http_host;
      proxy_set_header X-NginX-Proxy true;
      proxy_http_version 1.1;
      proxy_set_header Connection "";
      proxy_pass_header X-Transmission-Session-Id;
      add_header   Front-End-Https   on;
  
       proxy_pass https://127.0.0.1:6800/jsonrpc;
}

最后把rpc地址修改为https://yoursite.com:443/jsonrpc,这样你就可以用iptables关闭6800端口了虽然没什么卵用

@Co1lin
Copy link
Author

Co1lin commented Aug 23, 2017

@dk2048 机智,虽然还没试,但是感觉很有道理,应该是更改aria的配置。用过的两个面板都应该这样改。

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

5 participants