mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-29 19:18:42 -07:00
Add WebUi\Address config option
This commit is contained in:
parent
bd07cb91bb
commit
8cd243b06b
8 changed files with 63 additions and 40 deletions
|
@ -93,7 +93,11 @@ void WebUI::init()
|
|||
#endif
|
||||
|
||||
if (!m_httpServer->isListening()) {
|
||||
bool success = m_httpServer->listen(QHostAddress::Any, m_port);
|
||||
const QString addressString = pref->getWebUiAddress();
|
||||
const auto address = (addressString == "*" || addressString.isEmpty())
|
||||
? QHostAddress::Any : QHostAddress(addressString);
|
||||
|
||||
bool success = m_httpServer->listen(address, m_port);
|
||||
if (success) {
|
||||
logger->addMessage(tr("Web UI: Now listening on port %1").arg(m_port));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue