feat: add support for using TLS to connect to Redis #436
+91
−22
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
在部分内存资源受限的 VPS 环境中,无法在本地部署 Redis 服务,实际使用中往往需要跨节点连接其他服务器上的 Redis 实例,或直接接入 Serverless 云 Redis(如 Redis 官方云服务、Upstash 等)。由于这类场景通常通过公网传输数据,存在安全风险,因此有必要对 Redis 连接启用 TLS 加密。本次 PR 为 go-redis 客户端补充了 TLS 连接支持,使应用能够安全地连接远程或云端 Redis 实例,提升在公网与公有云环境下的可用性与安全性。