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

Add TLS feature #238

Closed
wants to merge 2 commits into from
Closed

Add TLS feature #238

wants to merge 2 commits into from

Conversation

myg133
Copy link

@myg133 myg133 commented May 31, 2020

Use SSL flag to connect server

@qishibo
Copy link
Owner

qishibo commented May 31, 2020

格式化的挺狠啊

不过tls支持不仅包括rediss协议的,还有指定证书的那种,也在规划中

@myg133
Copy link
Author

myg133 commented Jun 1, 2020

证书模式的目前还没有遇到,项目中的配置只需要设置 SSL = True 就可以正常连接,少了这个就会连不上。目前这种修改方式,在我们的应用中已经可以正常连接。

格式化,编辑器自动做的。业余Vue开发,一些格式化工具还没玩明白。。

@qishibo
Copy link
Owner

qishibo commented Jun 1, 2020

你们的redis用的啥,aws的么,还是自建的支持tls的

还有,tls = true 的时候你的配置是啥样的,可以给个样例

@myg133
Copy link
Author

myg133 commented Jun 1, 2020

云上的服务器,使用连接字符串:
serverhost:6379,password=xxxx,ssl=True,abortConnect=False

没有 ssl=True 的话,连接会失败

@qishibo
Copy link
Owner

qishibo commented Jun 1, 2020

手头没有tls redis的环境,你的url里填rediss://serverhost 试试

@qishibo
Copy link
Owner

qishibo commented Jun 1, 2020

看了看文档,tls应该是一个对象(见下面链接),非布尔类型,所有我有点怪你没写任何ca之类的是怎么连接的
https://nodejs.org/api/tls.html#tls_tls_connect_options_callback

@myg133
Copy link
Author

myg133 commented Jun 2, 2020

rediss://serverhost 使用这种方式还是无法连接。

@ADRDev
Copy link

ADRDev commented Jun 16, 2020

I'm needing this feature, can this be merged now?

@qishibo
Copy link
Owner

qishibo commented Jun 17, 2020

@ADRDev validating

@qishibo
Copy link
Owner

qishibo commented Jun 18, 2020

@myg133 eebd1a6 支持证书的tls已实现,多谢!

你这种不需要证书的情况,直接勾选SSL选项,不填任何证书即可

@qishibo qishibo closed this Jun 18, 2020
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

Successfully merging this pull request may close these issues.

3 participants