Luminarys / synapse

Synapse BitTorrent Daemon
https://synapse-bt.org
ISC License
855 stars 48 forks source link

web.synapse-bt.org redirects to HTTPS #219

Closed evanrichter closed 3 years ago

evanrichter commented 3 years ago

Normally this is a good thing, but it only allows connecting to the RPC endpoint over SSL (wss:// in this case). I have been connecting to RPC over my local network, and I wish to not enable encryption.

To work around the issue, I created a self-signed cert using this command and updated synapse.toml to point to the generated files. I then imported the self signed cert into the trust store of chrome, and finally it works.

However now, sycli is broken, I believe because the certificate is not trusted there. Here's the error message though, which is not clear about the problem:

Failed to connect to synapse, ensure your URI and password are correct, Error: Failed to handle websocket client
Caused by: URL error: Unable to connect to wss://nas:8412/?password=hackme

Not sure what a proper fix could be, because we certainly want secure defaults, but also good usability.

Luminarys commented 3 years ago

Oops, sorry for breaking your workflow. I've removed the manual https redirect for now, I think the better solution though is to have sycli support custom certificates.