mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-12 16:23:07 -07:00
Add option to bind directly to an IP instead of using a network Interface
This commit is contained in:
parent
43d52026b7
commit
e2f43b3383
5 changed files with 45 additions and 12 deletions
|
@ -633,7 +633,7 @@ void Session::setSessionSettings()
|
|||
// Include overhead in transfer limits
|
||||
sessionSettings.rate_limit_ip_overhead = pref->includeOverheadInLimits();
|
||||
// IP address to announce to trackers
|
||||
sessionSettings.announce_ip = Utils::String::toStdString(pref->getNetworkAddress());
|
||||
sessionSettings.announce_ip = Utils::String::toStdString(pref->getAnnounceAddress());
|
||||
// Super seeding
|
||||
sessionSettings.strict_super_seeding = pref->isSuperSeedingEnabled();
|
||||
// * Max Half-open connections
|
||||
|
@ -1658,6 +1658,13 @@ const QStringList Session::getListeningIPs()
|
|||
Logger* const logger = Logger::instance();
|
||||
QStringList IPs;
|
||||
|
||||
//Take the override addresss
|
||||
const QString networkAddr = pref->getNetworkAddress();
|
||||
if ( !networkAddr.isEmpty()) {
|
||||
IPs.append( networkAddr);
|
||||
return IPs;
|
||||
}
|
||||
|
||||
const QString ifaceName = pref->getNetworkInterface();
|
||||
const bool listenIPv6 = pref->getListenIPv6();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue