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

[ENHANCE] HTTPS/SSL 支持 #287

Closed
lorki opened this issue Apr 3, 2020 · 9 comments
Closed

[ENHANCE] HTTPS/SSL 支持 #287

lorki opened this issue Apr 3, 2020 · 9 comments
Labels
enhancement New feature or request

Comments

@lorki
Copy link

lorki commented Apr 3, 2020

No description provided.

@HFO4
Copy link
Member

HFO4 commented Apr 10, 2020

可能会在3.1版本中加入原生支持

@HFO4 HFO4 added the enhancement New feature or request label Apr 10, 2020
@jianfei96
Copy link

除非你一个服务器只打算运行这一个网站让它独占443端口。而且证书管理其实很麻烦,过期之后应用新证书需要重启cloudreve,那正在进行的任务不就出错了吗?另一个问题,如果用户访问的是http呢,还要再监听80端口加上跳转功能。
我认为专门的事情交给专门的软件干比较好,Nginx,Apache,SSLDocker,caddy这么多软件不是都可以吗。

@mixjia
Copy link

mixjia commented May 2, 2020

建议用宝塔反代之后直接加ssl

@lorki
Copy link
Author

lorki commented May 5, 2020

@aumk @mixjia

作为商业运营了可能考虑的比较多,但是作为个人用户而言,没那么多顾虑。甚至没有必要再去开一台vps专门做跳转

@zjsth92
Copy link
Contributor

zjsth92 commented May 5, 2020

@aumk @mixjia

作为商业运营了可能考虑的比较多,但是作为个人用户而言,没那么多顾虑。甚至没有必要再去开一台vps专门做跳转

不需要一台专门的vps做跳转,可以在同一台机器上。Nginx 监听80端口,然后反向代理给cloudreve。

@HFO4 @aumk 我也同意不需要原生支持HTTPS,这个应该交给更专业的工具处理。Cloudreve应该专注于网盘的功能

@HFO4
Copy link
Member

HFO4 commented May 6, 2020

@aumk @mixjia
作为商业运营了可能考虑的比较多,但是作为个人用户而言,没那么多顾虑。甚至没有必要再去开一台vps专门做跳转

不需要一台专门的vps做跳转,可以在同一台机器上。Nginx 监听80端口,然后反向代理给cloudreve。

@HFO4 @aumk 我也同意不需要原生支持HTTPS,这个应该交给更专业的工具处理。Cloudreve应该专注于网盘的功能

我觉得加上不多余,并且net/http标准库有现成的实现。很多自用场景下,需要启用HTTPS时还需要nginx就比较麻烦了。比如OneDrive授权时需要站点启用HTTPS,目前版本自用场景下可能需要为了这一个步骤专门配置反代。

@catiz
Copy link

catiz commented Aug 1, 2022

请问我配置启动cloudreve之后,ssl的端口会被替换成5212,我访问https://ip:5212浏览器显示ERR_SSL_PROTOCOL_ERROR,请问这是怎么回事?如何解决

@hxer520
Copy link

hxer520 commented Sep 9, 2022

建议用宝塔反代之后直接加ssl

请问下具体怎么操作呢

@1a57danc3
Copy link

1a57danc3 commented Oct 5, 2022

@catiz @hxer520

https://github.com/cloudreve/Cloudreve/blob/36b310133ce0e1a124fb2c7c0d33d7d0d582d694/pkg/conf/defaults.go

Line 41

var SSLConfig = &ssl{
	Listen:   ":443",
	CertPath: "",
	KeyPath:  "",
}

Or use the method with official docs to custom https port

[SSL]
Listen = :5213
CertPath = C:\Users\i\Documents\fullchain.pem
KeyPath = C:\Users\i\Documents\privkey.pem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants