mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-08-19 12:59:56 -07:00
Explicitly set UPnP state on start-up. Closes #7338.
libtorrent 1.1 enables upnp by default.
This commit is contained in:
parent
e8cf351b6a
commit
601234e492
1 changed files with 5 additions and 1 deletions
|
@ -423,7 +423,6 @@ Session::Session(QObject *parent)
|
||||||
pack.set_str(libt::settings_pack::peer_fingerprint, peerId);
|
pack.set_str(libt::settings_pack::peer_fingerprint, peerId);
|
||||||
pack.set_bool(libt::settings_pack::listen_system_port_fallback, false);
|
pack.set_bool(libt::settings_pack::listen_system_port_fallback, false);
|
||||||
pack.set_str(libt::settings_pack::user_agent, USER_AGENT);
|
pack.set_str(libt::settings_pack::user_agent, USER_AGENT);
|
||||||
pack.set_bool(libt::settings_pack::upnp_ignore_nonrouters, true);
|
|
||||||
pack.set_bool(libt::settings_pack::use_dht_as_fallback, false);
|
pack.set_bool(libt::settings_pack::use_dht_as_fallback, false);
|
||||||
// Disable support for SSL torrents for now
|
// Disable support for SSL torrents for now
|
||||||
pack.set_int(libt::settings_pack::ssl_listen, 0);
|
pack.set_int(libt::settings_pack::ssl_listen, 0);
|
||||||
|
@ -439,6 +438,11 @@ Session::Session(QObject *parent)
|
||||||
// Soon to be deprecated there
|
// Soon to be deprecated there
|
||||||
// More info: https://github.com/arvidn/libtorrent/issues/2251
|
// More info: https://github.com/arvidn/libtorrent/issues/2251
|
||||||
pack.set_bool(libt::settings_pack::use_disk_cache_pool, false);
|
pack.set_bool(libt::settings_pack::use_disk_cache_pool, false);
|
||||||
|
// libtorrent 1.1 enables UPnP & NAT-PMP by default
|
||||||
|
// turn them off before `libt::session` ctor to avoid split second effects
|
||||||
|
pack.set_bool(libt::settings_pack::enable_upnp, false);
|
||||||
|
pack.set_bool(libt::settings_pack::enable_natpmp, false);
|
||||||
|
pack.set_bool(libt::settings_pack::upnp_ignore_nonrouters, true);
|
||||||
configure(pack);
|
configure(pack);
|
||||||
|
|
||||||
m_nativeSession = new libt::session(pack, 0);
|
m_nativeSession = new libt::session(pack, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue