qbittorrent / qBittorrent

qBittorrent BitTorrent client
https://www.qbittorrent.org
Other
26.1k stars 3.84k forks source link

WebUI binds to IPv6 address #6147

Closed torshie closed 6 years ago

torshie commented 7 years ago

My headless server has both IPv6 and IPv4 support, WebUI choose to bind on IPv6 address "::" which makes it inaccessible because my client(browser) doesn't have IPv6 support.

Suggestion: add an option, e.g. WebUI\IPv6=true/false to choose address family to bind on, or simply bind on IPv4 address only, as IPv4 is universal.

h-2 commented 7 years ago

I second this. I was running an qbittorrent version in a FreeBSD jail and just upgraded. The server seemed to work, but the UI wouldn't come up, it just didn't bind. Took me quite some time to figure out that it was because because the jail had no IP6. It could at least have printed some kind of notice :sleepy:

Chocobo1 commented 7 years ago

what is your qbt & libraries & OS version?

and btw read this: http://stackoverflow.com/a/1618259

okeatime commented 7 years ago

@torshie @h-2 https://github.com/qbittorrent/qBittorrent/blob/master/src/webui/webui.cpp#L83 WebUI does not choose IPv6.

If your OS supports IPv4 and IPv6, WebUI will listen on both address families. If your OS supports only IPv4, WebUI will listen on IPv4.

Check your network settings, probably firewall or something.

torshie commented 7 years ago

@Chocobo1 Ubuntu 16.04 with qt-5.5.1 from official Ubuntu repository

@okeatime I actually did a quit fix for myself by changing that line to httpServer_->listen(QHostAddress::AnyIPv4, m_port); . I'm 100% positive that WebUI only binds on IPv6 address in my case. WebUI is installed with apt-get install qbittorrent-nox, it could be a bug in Qt though.

h-2 commented 7 years ago

@Chocobo1 @okeatime

what is your qbt & libraries & OS version?

libtorrent-rasterbar-1.1.1_2   C++ library implementing a BitTorrent client
qbittorrent-nox11-3.3.10       Bittorrent client using libtorrent-rasterbar, web UI version
qt4-corelib-4.8.7_6            Qt core non-graphical module
qt4-network-4.8.7              Qt network module
qt5-core-5.6.2_1               Qt core non-graphical module
qt5-network-5.6.2              Qt network module
qt5-xml-5.6.2                  Qt SAX and DOM implementations

I have a server running FreeBSD. FreeBSD supports IPv6 so qbittorrent might assume it is available. FreeBSD jails (a light weight virtualization solution that everybody uses on FreeBSD for everything) however only support IPv6 if explicitly told to do so which most people do not activate if they don't know they need it. It is stated nowhere that it is needed by qbittorrent. It never states on the command line that it bound to an IP-address.

If I give the the jail a local IPv6 address everything works as expected. However this is really difficult to find out as there diagnostics on it.

If your OS supports IPv4 and IPv6, WebUI will listen on both address families. If your OS supports only IPv4, WebUI will listen on IPv4.

No, in my case the web-ui gets stuck booting up. It seems like the core actually starts up and starts transferring data, but the UI doesn't come up, because its waiting for IPv6 which isn't available.

ctrlaltdel121 commented 7 years ago

I'm also experiencing this. Working with a FC25 server, when I install qbittorrent fresh from the RPM and then start it as root, it only binds to :::8080 (ipv6). No bind at all to 8080 on ipv4.

I had this working on FC23 and it seems to have changed when I upgraded, so that may be related.

Chocobo1 commented 6 years ago

With #7573 merged, it's possible to bind webUI to IPv4 only. Closing as fixed.