azlux / botamusique

Bot to play youtube / soundcloud / radio / local music on Mumble (using pymumble).
MIT License
312 stars 79 forks source link

HTTPS Support #355

Closed manbearpig3130 closed 1 year ago

manbearpig3130 commented 1 year ago

While setting up botamusique on my own mumble server, I made a few small changes which allowed me to serve the webpage over HTTPS with a ssl certificate and keyfile for my domain.

I thought it would be cool to add this as an option in the configuration file and raise a PR.

What I did was modify the start_web_interface function to accept optional keyword arguments (sslcert and sslkey). If the user enables SSL support in the config file and provides a path to the key and cert, then start_web_interface will feed the provided filepaths to the web interface using the ssl_context kwarg.

Any feedback is welcome.

mweinelt commented 1 year ago

I don't think this should be merged. There are plenty of capable reverse proxies out there, that handle a https setup way better than botamusique ever could.

TerryGeng commented 1 year ago

I actually agree with @mweinelt. I use my bot with nginx and the reverse proxy handles SSL for me pretty well. It is almost always desired to run a reverse proxy server instead of exposing the bot itself. Also, certbot handles certification installation and renewal automatically for nginx and other mainstream web servers.

We even have a wiki page detailing the config: https://github.com/azlux/botamusique/wiki/Reverse-proxy-configuration

manbearpig3130 commented 1 year ago

Thanks for the information peeps. Closing PR. Have a nice day!