ra1u / redis-dart

fast redis protocol parser and client
MIT License
84 stars 35 forks source link

Does this plug-in support ssl? #89

Closed HG9558 closed 11 months ago

HG9558 commented 11 months ago

I want to use ssl to connect, is it supported?

ra1u commented 11 months ago

Yes. https://github.com/ra1u/redis-dart#tls

HG9558 commented 11 months ago

是要按着这种固定的格式来写么?

Snipaste_2023-11-03_15-55-33
HG9558 commented 11 months ago

I did this but couldn't connect

ra1u commented 11 months ago

What we have in this example are two things.

If you can not connect on server, make sure, that your address/port and cerificates on server are valid. I suggest that you first try to connect on server using command redis-cli --tls

If you use custom tls certificates, you wont be able to connect using RedisConnection.connectSecure because by defult it expects that certificates are valid.

For this reason we have RedisConnection.connectWithSocket. Here you can connect with socket from dart libraray and use connected socket, to establish protocol over redis.

HG9558 commented 11 months ago

OK, thanks