qbittorrent-natmap icon indicating copy to clipboard operation
qbittorrent-natmap copied to clipboard

Allow for qBittorrent WebGUI to run in HTTPS

Open IBNobody opened this issue 1 year ago • 0 comments

The default setup was to query the qBittorrent WebGUI over HTTP.

This is fine normally, but in order to register qBittorrent WebGUI to handle magnet links, qBittorrent needs to run in HTTPS.

This causes problems with qbittorrent-natmap. Because qBittorrent WebGUI only operates out of one port, the HTTP/HTTPS setting in qBittorrent WebGUI means that it will only respond to one or another. If we set qBittorrent WebGUI to use HTTPS, qbittorrent-natmap will be unable to query the qBittorrent WebGUI.

The solution was twofold:

  1. I added an ENV variable QBITTORRENT_SERVER_HTTP_OR_HTTPS which should be set to "http" by default and can be set to "https".
  2. I changed curl to use the "-k" option to accept self-signed certs. This option is ignored by curl commands to http targets.

I have tested this container both with and without https, and it is working for me.

IBNobody avatar Aug 11 '23 13:08 IBNobody