mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-31 20:58:07 -06:00
Merge pull request #14493 from Chocobo1/tos
Expose ToS setting from libtorrent
This commit is contained in:
@@ -309,6 +309,8 @@ void AppController::preferencesAction()
|
||||
data["outgoing_ports_max"] = session->outgoingPortsMax();
|
||||
// UPnP lease duration
|
||||
data["upnp_lease_duration"] = session->UPnPLeaseDuration();
|
||||
// Type of service
|
||||
data["peer_tos"] = session->peerToS();
|
||||
// uTP-TCP mixed mode
|
||||
data["utp_tcp_mixed_mode"] = static_cast<int>(session->utpMixedMode());
|
||||
// Support internationalized domain name (IDN)
|
||||
@@ -772,6 +774,9 @@ void AppController::setPreferencesAction()
|
||||
// UPnP lease duration
|
||||
if (hasKey("upnp_lease_duration"))
|
||||
session->setUPnPLeaseDuration(it.value().toInt());
|
||||
// Type of service
|
||||
if (hasKey("peer_tos"))
|
||||
session->setPeerToS(it.value().toInt());
|
||||
// uTP-TCP mixed mode
|
||||
if (hasKey("utp_tcp_mixed_mode"))
|
||||
session->setUtpMixedMode(static_cast<BitTorrent::MixedModeAlgorithm>(it.value().toInt()));
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
|
||||
$('renameButton').disabled = true;
|
||||
|
||||
const parentPath = window.qBittorrent.Filesystem.folderName(oldPath)
|
||||
const parentPath = window.qBittorrent.Filesystem.folderName(oldPath);
|
||||
const newPath = parentPath
|
||||
? parentPath + window.qBittorrent.Filesystem.PathSeparator + newName
|
||||
: newName;
|
||||
|
||||
@@ -1094,6 +1094,14 @@
|
||||
<input type="text" id="UPnPLeaseDuration" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="peerToS">QBT_TR(Type of service (ToS) for connections to peers)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#peer_tos" target="_blank">(?)</a></label>
|
||||
</td>
|
||||
<td>
|
||||
<input type="text" id="peerToS" style="width: 15em;" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<label for="utpTCPMixedModeAlgorithm">QBT_TR(μTP-TCP mixed mode algorithm:)QBT_TR[CONTEXT=OptionsDialog] <a href="https://www.libtorrent.org/reference-Settings.html#mixed_mode_algorithm" target="_blank">(?)</a></label>
|
||||
@@ -1920,6 +1928,7 @@
|
||||
$('outgoingPortsMin').setProperty('value', pref.outgoing_ports_min);
|
||||
$('outgoingPortsMax').setProperty('value', pref.outgoing_ports_max);
|
||||
$('UPnPLeaseDuration').setProperty('value', pref.upnp_lease_duration);
|
||||
$('peerToS').setProperty('value', pref.peer_tos);
|
||||
$('utpTCPMixedModeAlgorithm').setProperty('value', pref.utp_tcp_mixed_mode);
|
||||
$('IDNSupportCheckbox').setProperty('checked', pref.idn_support_enabled);
|
||||
$('allowMultipleConnectionsFromTheSameIPAddress').setProperty('checked', pref.enable_multi_connections_from_same_ip);
|
||||
@@ -2308,6 +2317,7 @@
|
||||
settings.set('outgoing_ports_min', $('outgoingPortsMin').getProperty('value'));
|
||||
settings.set('outgoing_ports_max', $('outgoingPortsMax').getProperty('value'));
|
||||
settings.set('upnp_lease_duration', $('UPnPLeaseDuration').getProperty('value'));
|
||||
settings.set('peer_tos', $('peerToS').getProperty('value'));
|
||||
settings.set('utp_tcp_mixed_mode', $('utpTCPMixedModeAlgorithm').getProperty('value'));
|
||||
settings.set('idn_support_enabled', $('IDNSupportCheckbox').getProperty('checked'));
|
||||
settings.set('enable_multi_connections_from_same_ip', $('allowMultipleConnectionsFromTheSameIPAddress').getProperty('checked'));
|
||||
|
||||
Reference in New Issue
Block a user