Don't ignore SSL errors

This commit is contained in:
sledgehammer999
2024-09-19 21:10:16 +03:00
parent 1c43286616
commit 6981217369
7 changed files with 54 additions and 6 deletions

View File

@@ -378,6 +378,8 @@ void AppController::preferencesAction()
data[u"resolve_peer_countries"_s] = pref->resolvePeerCountries();
// Reannounce to all trackers when ip/port changed
data[u"reannounce_when_address_changed"_s] = session->isReannounceWhenAddressChangedEnabled();
// Ignore SSL errors
data[u"ignore_ssl_errors"_s] = pref->isIgnoreSSLErrors();
// libtorrent preferences
// Bdecode depth limit
@@ -992,6 +994,9 @@ void AppController::setPreferencesAction()
// Reannounce to all trackers when ip/port changed
if (hasKey(u"reannounce_when_address_changed"_s))
session->setReannounceWhenAddressChangedEnabled(it.value().toBool());
// Ignore SLL errors
if (hasKey(u"ignore_ssl_errors"_s))
pref->setIgnoreSSLErrors(it.value().toBool());
// libtorrent preferences
// Bdecode depth limit

View File

@@ -1240,6 +1240,14 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
<input type="checkbox" id="markOfTheWeb">
</td>
</tr>
<tr>
<td>
<label for="ignoreSSLErrors">QBT_TR(Ignore SSL errors:)QBT_TR[CONTEXT=OptionsDialog]</label>
</td>
<td>
<input type="checkbox" id="ignoreSSLErrors">
</td>
</tr>
<tr>
<td>
<label for="pythonExecutablePath">QBT_TR(Python executable path (may require restart):)QBT_TR[CONTEXT=OptionsDialog]</label>
@@ -2469,6 +2477,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
$("refreshInterval").value = pref.refresh_interval;
$("resolvePeerCountries").checked = pref.resolve_peer_countries;
$("reannounceWhenAddressChanged").checked = pref.reannounce_when_address_changed;
$("ignoreSSLErrors").checked = pref.ignore_ssl_errors;
// libtorrent section
$("bdecodeDepthLimit").value = pref.bdecode_depth_limit;
$("bdecodeTokenLimit").value = pref.bdecode_token_limit;
@@ -2925,6 +2934,7 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
settings["refresh_interval"] = Number($("refreshInterval").value);
settings["resolve_peer_countries"] = $("resolvePeerCountries").checked;
settings["reannounce_when_address_changed"] = $("reannounceWhenAddressChanged").checked;
settings["ignore_ssl_errors"] = $("ignoreSSLErrors").checked;
// libtorrent section
settings["bdecode_depth_limit"] = Number($("bdecodeDepthLimit").value);