mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 09:02:31 -06:00
Compare commits
2 Commits
ae8a6689dc
...
fef6ac515c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fef6ac515c | ||
|
|
94552b2384 |
@@ -87,7 +87,7 @@ namespace
|
||||
QPointer<SearchPluginManager> SearchPluginManager::m_instance = nullptr;
|
||||
|
||||
SearchPluginManager::SearchPluginManager()
|
||||
: m_updateUrl(u"https://searchplugins.qbittorrent.org/nova3/engines/"_s)
|
||||
: m_updateUrl(u"https://raw.githubusercontent.com/qbittorrent/search-plugins/refs/heads/master/nova3/engines/"_s)
|
||||
, m_proxyEnv {QProcessEnvironment::systemEnvironment()}
|
||||
{
|
||||
Q_ASSERT(!m_instance); // only one instance is allowed
|
||||
|
||||
@@ -2127,9 +2127,11 @@ Use ';' to split multiple entries. Can use wildcard '*'.)QBT_TR[CONTEXT=OptionsD
|
||||
};
|
||||
|
||||
const generateRandomPort = () => {
|
||||
const min = 1024;
|
||||
const max = 65535;
|
||||
const port = Math.floor(Math.random() * (max - min + 1) + min);
|
||||
// don't use modulo operations to avoid 'modulo bias'
|
||||
const buffer = new Uint16Array(1);
|
||||
let port = crypto.getRandomValues(buffer)[0];
|
||||
while (port < 1024)
|
||||
port = crypto.getRandomValues(buffer)[0];
|
||||
document.getElementById("portValue").value = port;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user