2881099 / csredis

.NET Core or .NET Framework 4.0+ client for Redis and Redis Sentinel (2.8) and Cluster. Includes both synchronous and asynchronous clients.
MIT License
2k stars 414 forks source link

哨兵本身设置了requirepass密码,CSRedis无法连接哨兵 #467

Open hkszlq opened 1 year ago

hkszlq commented 1 year ago

哨兵本身设置了requirepass密码,CSRedis无法连接哨兵,connectionString里的password为redis的密码,基于安全需求能否增加连接哨兵本身的密码?

// // 摘要: // 创建redis哨兵访问类(Redis Sentinel) // // 参数: // connectionString: // mymaster,password=123456,poolsize=50,connectTimeout=200,ssl=false // // sentinels: // 哨兵节点,如:ip1:26379、ip2:26379 // // readOnly: // false: 只获取master节点进行读写操作 // true: 只获取可用slave节点进行只读操作 public CSRedisClient(string connectionString, string[] sentinels, bool readOnly = false) : this(null, sentinels, readOnly, connectionString)

2881099 commented 1 year ago

https://github.com/2881099/FreeRedis/blob/master/src/FreeRedis/RedisSentinelClient.cs

建议看全面重构过,最新的 FreeRedis

hkszlq commented 1 year ago

https://github.com/2881099/FreeRedis/blob/master/src/FreeRedis/RedisSentinelClient.cs

建议看全面重构过,最新的 FreeRedis

好的,感谢。