bitmagnet-io / bitmagnet

A self-hosted BitTorrent indexer, DHT crawler, content classifier and torrent search engine with web UI, GraphQL API and Servarr stack integration.
https://bitmagnet.io/
MIT License
2.48k stars 100 forks source link

Add support for connecting to Redis cluster with TLS. #63

Closed itsuki-hayashi closed 11 months ago

itsuki-hayashi commented 1 year ago

I want to add this option for a selfish reason, as my use case involves a Redis cluster hosted externally with TLS encryption.

This basic config enables TLS with all the default settings by Go and uses the Addr as TLS's ServerName for verification.

I am a total newbie on Go, so this will likely be a low-quality PR.

Great project, by the way. It has been running very stable on my setup, and I have cooked up an Ansible script for Ubuntu that uses AppArmor and systemd for sandboxing. I want to contribute some of my configs to the project, if you don't mind.

itsuki-hayashi commented 1 year ago

@mgdigital please check 🙇🏻

mgdigital commented 11 months ago

Hi @zhiyuan-lin , thanks. This PR would need some cleanup, and also doesn't seem to expose a complete TLS config including certificates etc.

By the way, the plan is to remove the Redis dependency and run the task queue (which is the only thing that uses Redis) off the Postgres DB instead. This is why I'm reluctant to focus effort on any Redis-related functionality.... For the time being I'd suggest a simpler configuration might be more appropriate for you - the resource requirements for Redis are very minimal and certainly doesn't need a cluster, a simple container running alongside Bitmagnet would do fine.

itsuki-hayashi commented 11 months ago

Thank you, I will close this PR and wait for the Pg queue to be implemented