You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-23 22:32:16 +02:00
Compare commits
45 Commits
release-3.
...
release-3.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dbfaf35db4 | ||
|
|
f3b4c4acfc | ||
|
|
b37c395118 | ||
|
|
d6ab0d6f02 | ||
|
|
1b8c61c390 | ||
|
|
cbfdc8f721 | ||
|
|
cfae8c6399 | ||
|
|
246a19d685 | ||
|
|
8b6e06cfff | ||
|
|
7e8f2ecc76 | ||
|
|
0f061aa40d | ||
|
|
256211c16a | ||
|
|
bd684df315 | ||
|
|
8eb9117033 | ||
|
|
83ae15550d | ||
|
|
3783541c30 | ||
|
|
cc388fe772 | ||
|
|
78f2afa239 | ||
|
|
245e8e09bb | ||
|
|
986cff9e66 | ||
|
|
73f477072f | ||
|
|
7e9ece2701 | ||
|
|
ba8641f1ac | ||
|
|
76c6041031 | ||
|
|
2ae8472a78 | ||
|
|
dc9df6d681 | ||
|
|
aed9e8f1b7 | ||
|
|
a94d14acaf | ||
|
|
317689bd5d | ||
|
|
1ad66ba791 | ||
|
|
b4fb193d4a | ||
|
|
ab47559bf2 | ||
|
|
ac87728150 | ||
|
|
1559205114 | ||
|
|
54e8b6944e | ||
|
|
164e8156db | ||
|
|
c83bb22e80 | ||
|
|
166c2a72ac | ||
|
|
6b659804c7 | ||
|
|
0831320f17 | ||
|
|
8d2fb06f65 | ||
|
|
bf6f103142 | ||
|
|
c4b12b854e | ||
|
|
de514e29c2 | ||
|
|
03d020f0f2 |
@@ -3,7 +3,7 @@ version: '{branch}-{build}'
|
||||
# Do not build on tags (GitHub only)
|
||||
skip_tags: true
|
||||
|
||||
os: Visual Studio 2015
|
||||
image: Visual Studio 2017
|
||||
|
||||
environment:
|
||||
REPO_DIR: &REPO_DIR c:\qbittorrent
|
||||
@@ -36,7 +36,7 @@ install:
|
||||
|
||||
before_build:
|
||||
# setup env
|
||||
- CALL "c:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\vcvars32.bat"
|
||||
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars32.bat"
|
||||
- SET PATH=%PATH%;c:\qbt\qt5_32\bin;%CACHE_DIR%\jom;
|
||||
# setup project
|
||||
- COPY /Y "%CACHE_DIR%\winconf.pri" "%REPO_DIR%"
|
||||
|
||||
14
.travis.yml
14
.travis.yml
@@ -132,15 +132,15 @@ install:
|
||||
cp "version" $HOME/hombebrew_cache ;
|
||||
cd "$HOME/hombebrew_cache" ;
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar.rb ;
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz ;
|
||||
wget https://builds.shiki.hu/homebrew/qt5.rb ;
|
||||
wget https://builds.shiki.hu/homebrew/qt5-5.7.1_1.el_capitan.bottle.tar.gz ;
|
||||
wget https://builds.shiki.hu/homebrew/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz
|
||||
wget https://builds.shiki.hu/homebrew/qt.rb
|
||||
wget https://builds.shiki.hu/homebrew/qt-5.9.1.el_capitan.bottle.tar.gz
|
||||
fi
|
||||
|
||||
# Copy custom libtorrent bottle to homebrew's cache so it can find and install it
|
||||
# Also install our custom libtorrent formula by passing the local path to it
|
||||
# These 2 files are restored from Travis' cache.
|
||||
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.10.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
|
||||
cp "$HOME/hombebrew_cache/libtorrent-rasterbar-1.0.11+git20172003.8736a59adc.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
||||
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb" ;
|
||||
|
||||
# Qt
|
||||
@@ -149,9 +149,9 @@ install:
|
||||
# Copy custom qt5 bottle to homebrew's cache so it can find and install it
|
||||
# Also install our custom qt5 formula by passing the local path to it
|
||||
# These 2 files are restored from Travis' cache.
|
||||
cp "$HOME/hombebrew_cache/qt5-5.7.1_1.el_capitan.bottle.tar.gz" "$(brew --cache)" ;
|
||||
brew install "$HOME/hombebrew_cache/qt5.rb" ;
|
||||
brew link --force qt5 ;
|
||||
cp "$HOME/hombebrew_cache/qt-5.9.1.el_capitan.bottle.tar.gz" "$(brew --cache)"
|
||||
brew install "$HOME/hombebrew_cache/qt.rb"
|
||||
brew link --force qt
|
||||
fi
|
||||
fi
|
||||
- |
|
||||
|
||||
28
Changelog
28
Changelog
@@ -1,3 +1,31 @@
|
||||
* Thu Sep 07 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.16
|
||||
- BUGFIX: Better memory footprint when using libtorrent 1.1.x. The cache is turned off by default(`0 (disabled)` value in the settings). The value `-1 (auto)` makes it use 1/8 of your RAM. (sledgehammer999)
|
||||
- BUGFIX: Skip user input events when adding torrent. Closes #7327. (glassez)
|
||||
- BUGFIX: Avoid memory leak in the speed graph. (Chocobo1)
|
||||
- WEBUI: Fix validating wrong header field. X-Forwarded-Host is a foreign proxy setting, it isn't the same as qbt's local setting and thus it makes no sense to verify it. Closes #7311. (Chocobo1)
|
||||
- WINDOWS: Fix connection problems when a specific interface/ip is configured. (sledgehammer999)
|
||||
- WINDOWS: Disable skipping of loopback interfaces. This fixes the absence of VPN tunnel interfaces under Windows and works around the QTBUG-32349. Fixes #7291. (Evengard)
|
||||
- WINDOWS: The installer detects the 64bit running process too. (vlakoff)
|
||||
|
||||
* Thu Aug 03 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.15
|
||||
- BUGFIX: Temporary subfolder wasn't being deleted. (glassez)
|
||||
|
||||
* Tue Jul 18 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.14
|
||||
- BUGFIX: Set interface for outgoing traffic(libtorrent 1.1.x series). (evsh)
|
||||
- WEBUI: Fix KEEP_ALIVE_DURATION value (Chocobo1)
|
||||
- WEBUI: Relax CSRF defense. Closes #6882. Allow HTTP request which has neither Origin nor Referer header included. (Chocobo1)
|
||||
- WEBUI: Skip username/password check for active sessions (closes #6860) (Thomas Piccirello)
|
||||
- WEBUI: Fix javascript errors and follow best practices (Thomas Piccirello)
|
||||
- WEBUI: Fix value comparison. Closes #7081. (Chocobo1)
|
||||
- WEBUI: Avoid modifying request headers (Chocobo1)
|
||||
- WEBUI: Implement HTTP host header filtering. This filtering is required to defend against DNS rebinding attack. Fixes security issues reported by @beardog108 privately. (Chocobo1)
|
||||
- WEBUI: Add Status column to webui (addresses #6815) (#7032) (Tom Piccirello)
|
||||
- WEBUI: Bump API_VERSION and API_VERSION_MIN to 15.
|
||||
- SEARCH: Pad shorter python versions. Closes #6877. (sledgehammer999)
|
||||
- WINDOWS: Updated Arabic, Turkish, Greek, Russian, Danish languages of the installer. (KingLucius, BouRock, thalieht, Andrei Stepanov, scootergrisen)
|
||||
- WINDOWS: Raise total stack size on Windows to 8 MB. Closes #7021. (Chocobo1)
|
||||
- LINUX: Systemd service with user switch and other fixes/optimizations. (anton.latukha)
|
||||
|
||||
* Thu Jun 01 2017 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.13
|
||||
- BUGFIX: Fixed UI glitch about torrent numbers in the sidepanel. Fixes #6454. (evsh)
|
||||
- BUGFIX: Fix downloaded/uploaded columns were not highlighted properly when selected. (Chocobo1)
|
||||
|
||||
4
configure
vendored
4
configure
vendored
@@ -6962,7 +6962,7 @@ $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
|
||||
fi
|
||||
|
||||
if test "x$enable_systemd" = "xyes"; then :
|
||||
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox.service"
|
||||
ac_config_files="$ac_config_files dist/unix/systemd/qbittorrent-nox@.service"
|
||||
|
||||
cat >confcache <<\_ACEOF
|
||||
# This file is a shell script that caches the results of configure
|
||||
@@ -7716,7 +7716,7 @@ do
|
||||
case $ac_config_target in
|
||||
"depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
|
||||
"conf.pri") CONFIG_FILES="$CONFIG_FILES conf.pri" ;;
|
||||
"dist/unix/systemd/qbittorrent-nox.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox.service" ;;
|
||||
"dist/unix/systemd/qbittorrent-nox@.service") CONFIG_FILES="$CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service" ;;
|
||||
|
||||
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
|
||||
esac
|
||||
|
||||
@@ -260,7 +260,7 @@ AC_SUBST(QBT_REMOVE_DEFINES)
|
||||
|
||||
AC_OUTPUT(conf.pri)
|
||||
AS_IF([test "x$enable_systemd" = "xyes"],
|
||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox.service)])
|
||||
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
|
||||
|
||||
|
||||
|
||||
|
||||
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -45,7 +45,7 @@
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>3.3.13</string>
|
||||
<string>3.3.16</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
||||
4
dist/unix/CMakeLists.txt
vendored
4
dist/unix/CMakeLists.txt
vendored
@@ -2,8 +2,8 @@ if (SYSTEMD)
|
||||
find_package(Systemd)
|
||||
if (SYSTEMD_FOUND)
|
||||
set(EXPAND_BINDIR ${CMAKE_INSTALL_FULL_BINDIR})
|
||||
configure_file(systemd/qbittorrent-nox.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox.service
|
||||
configure_file(systemd/qbittorrent-nox@.service.in ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service @ONLY)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/qbittorrent-nox@.service
|
||||
DESTINATION ${SYSTEMD_SERVICES_INSTALL_DIR}
|
||||
COMPONENT data)
|
||||
endif(SYSTEMD_FOUND)
|
||||
|
||||
11
dist/unix/systemd/qbittorrent-nox.service.in
vendored
11
dist/unix/systemd/qbittorrent-nox.service.in
vendored
@@ -1,11 +0,0 @@
|
||||
[Unit]
|
||||
Description=qBittorrent Daemon Service
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=forking
|
||||
User=1000
|
||||
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox -d
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
14
dist/unix/systemd/qbittorrent-nox@.service.in
vendored
Normal file
14
dist/unix/systemd/qbittorrent-nox@.service.in
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
[Unit]
|
||||
Description=qBittorrenti-nox service for user %I
|
||||
|
||||
Documentation=man:qbittorrent-nox(1)
|
||||
After=network.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
PrivateTmp=false
|
||||
User=%i
|
||||
ExecStart=@EXPAND_BINDIR@/qbittorrent-nox
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
@@ -17,13 +17,13 @@ LangString inst_firewallinfo ${LANG_ARABIC} "جاري اضافة القاعدة
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ARABIC} "البرنامج يعمل. يرجى اغلاقه قبل البدء في التنصيب"
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_ARABIC} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_ARABIC} "يوجد نسخة سابقة من البرنامج. سيتم إزالتها دون حذف إعدادات المستخدم"
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ARABIC} "جاري ازالة النسخة السابقة من البرنامج"
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ARABIC} "تشغيل البرنامج"
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ARABIC} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ARABIC} "هذا المثبت يعمل فقط في نسخ ويندوز 64 بت"
|
||||
|
||||
|
||||
;------------------------------------
|
||||
|
||||
46
dist/windows/installer-translations/danish.nsi
vendored
46
dist/windows/installer-translations/danish.nsi
vendored
@@ -1,53 +1,53 @@
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (påkrævet)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_DANISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_DANISH} "Opret skrivebordsgenvej"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_DANISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_DANISH} "Opret genvej i menuen Start"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_DANISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_DANISH} "Åbn .torrent-filer med qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_DANISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_DANISH} "Åbn magnet-links med qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_DANISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_DANISH} "Tilføj Windows Firewall-regel"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_DANISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_DANISH} "Tilføjer Windows Firewall-regel"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_DANISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_DANISH} "qBittorrent kører. Luk venligst programmet inden installation."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_DANISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_DANISH} "En tidligere installation blev registreret. Den vil blive afinstalleret uden at brugerindstillingerne slettes."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_DANISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_DANISH} "Afinstallerer tidligere version."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_DANISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_DANISH} "Start qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_DANISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_DANISH} "Dette installationsprogram virker kun i 64-bit Windows versioner."
|
||||
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
;LangString remove_files ${LANG_ENGLISH} "Remove files"
|
||||
LangString remove_files ${LANG_DANISH} "Remove files"
|
||||
LangString remove_files ${LANG_DANISH} "Fjern filer"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_DANISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_DANISH} "Fjern genveje"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_DANISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_DANISH} "Fjern filtilknytninger"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_DANISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_DANISH} "Fjern registreringsnøgler"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_DANISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_DANISH} "Fjern konfigurationsfiler"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_DANISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_DANISH} "Fjern Windows Firewall-regel"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_DANISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_DANISH} "Fjerner Windows Firewall-regel"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_DANISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_DANISH} "Fjern torrents og mellemlagret data"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_DANISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_DANISH} "qBittorrent kører. Luk venligst programmet inden afinstallation."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_DANISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_DANISH} "Fjerner ikke .torrent-tilknytning. Det er tilknyttet:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_DANISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_DANISH} "Fjerner ikke magnet-tilknytning. Det er tilknyttet:"
|
||||
|
||||
46
dist/windows/installer-translations/greek.nsi
vendored
46
dist/windows/installer-translations/greek.nsi
vendored
@@ -1,53 +1,53 @@
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (απαιτείται)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GREEK} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GREEK} "Δημιουργία συντόμευσης στην Επιφάνεια Εργασίας"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GREEK} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GREEK} "Δημιουργία συντόμευσης στο Μενού Έναρξης"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_GREEK} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_GREEK} "Άνοιγμα των αρχείων .torrent με το qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_GREEK} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_GREEK} "Άνοιγμα των μαγνητικών συνδέσμων με το qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_GREEK} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_GREEK} "Προσθήκη κανόνα εξαίρεσης στο Τείχος Προστασίας των Windows"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_GREEK} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_GREEK} "Προστίθεται κανόνας εξαίρεσης στο Τείχος Προστασίας των Windows"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_GREEK} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_GREEK} "Το qBittorrent βρίσκεται σε εκτέλεση. Παρακαλούμε κλείστε την εφαρμογή πριν την εγκατάσταση."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_GREEK} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_GREEK} "Ανιχνεύθηκε προηγούμενη εγκατάσταση. Θα απεγκατασταθεί χωρίς να διαγραφούν οι ρυθμίσεις του χρήστη."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_GREEK} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_GREEK} "Γίνεται απεγκατάσταση της προηγούμενης έκδοσης."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_GREEK} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_GREEK} "Εκκίνηση του qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_GREEK} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_GREEK} "Αυτό το αρχείο εγκατάστασης λειτουργεί μόνο σε 64-bit εκδόσεις των Windows."
|
||||
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
;LangString remove_files ${LANG_ENGLISH} "Remove files"
|
||||
LangString remove_files ${LANG_GREEK} "Remove files"
|
||||
LangString remove_files ${LANG_GREEK} "Να διαγραφούν τα αρχεία"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_GREEK} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_GREEK} "Να διαγραφούν οι συντομεύσεις"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_GREEK} "Remove file associations"
|
||||
LangString remove_associations ${LANG_GREEK} "Να καταργηθούν οι συσχετίσεις αρχείων"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_GREEK} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_GREEK} "Να διαγραφούν τα κλειδιά μητρώου"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_GREEK} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_GREEK} "Να διαγραφούν τα αρχεία ρυθμίσεων"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_GREEK} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_GREEK} "Να διαγραφεί ο κανόνας εξαίρεσης στο Τείχος Προστασίας των Windows"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_GREEK} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_GREEK} "Γίνεται διαγραφή του κανόνα εξαίρεσης στο Τείχος Προστασίας των Windows"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_GREEK} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_GREEK} "Να διαγραφούν τα torrents και τα δεδομένα προσωρινής αποθήκευσης"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_GREEK} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_GREEK} "Το qBittorrent βρίσκεται σε εκτέλεση. Παρακαλούμε κλείστε την εφαρμογή πριν την απεγκατάσταση."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_GREEK} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_GREEK} "Δεν θα καταργηθεί η συσχέτιση με τα αρχεία .torrent. Είναι συσχετισμένα με το:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_GREEK} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_GREEK} "Δεν θα καταργηθεί η συσχέτιση με τους μαγνητικούς συνδέσμους. Είναι συσχετισμένοι με το:"
|
||||
|
||||
12
dist/windows/installer-translations/russian.nsi
vendored
12
dist/windows/installer-translations/russian.nsi
vendored
@@ -7,9 +7,9 @@ LangString inst_dekstop ${LANG_RUSSIAN} "Создать ярлык на рабо
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_RUSSIAN} "Создать ярлык в меню Пуск"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_RUSSIAN} "Открывать торрент файлы с помощью qBittorrent"
|
||||
LangString inst_torrent ${LANG_RUSSIAN} "Открывать торрент-файлы с помощью qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_RUSSIAN} "Открывать magnet ссылки с помощью qBittorrent"
|
||||
LangString inst_magnet ${LANG_RUSSIAN} "Открывать magnet-ссылки с помощью qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_RUSSIAN} "Добавить в список исключений брандмауера"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
@@ -23,7 +23,7 @@ LangString inst_unist ${LANG_RUSSIAN} "Деинсталлируем старую
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_RUSSIAN} "Запустить qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_RUSSIAN} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_RUSSIAN} "Этот установщик работает только на 64-битных версиях Windows."
|
||||
|
||||
|
||||
;------------------------------------
|
||||
@@ -44,10 +44,10 @@ LangString remove_firewall ${LANG_RUSSIAN} "Удалить из списка и
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_RUSSIAN} "Удаление из списка исключений брандмауера"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_RUSSIAN} "Удалить сохраненные торрент файлы"
|
||||
LangString remove_cache ${LANG_RUSSIAN} "Удалить сохранённые торрент-файлы"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу удаления."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_RUSSIAN} "Ассоциации торрент файлов не сброшены. Уже ассоциированы с:"
|
||||
LangString uninst_tor_warn ${LANG_RUSSIAN} "Ассоциации торрент-файлов не сброшены. Уже ассоциированы с:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_RUSSIAN} "Ассоциации magnet ссылок не сброшены. Уже ассоциированы с:"
|
||||
LangString uninst_mag_warn ${LANG_RUSSIAN} "Ассоциации magnet-ссылок не сброшены. Уже ассоциированы с:"
|
||||
|
||||
@@ -23,7 +23,7 @@ LangString inst_unist ${LANG_TURKISH} "Önceki sürüm kaldırılıyor."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i çalıştır."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_TURKISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_TURKISH} "Bu yükleyici sadece 64-bit Windows sürümlerinde çalışır."
|
||||
|
||||
|
||||
;------------------------------------
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z
vendored
Normal file
BIN
dist/windows/nsis plugins/FindProcDLL_mod_by_hnedka.7z
vendored
Normal file
Binary file not shown.
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -27,7 +27,7 @@ XPStyle on
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
; Program specific
|
||||
!define PROG_VERSION "3.3.13"
|
||||
!define PROG_VERSION "3.3.16"
|
||||
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
|
||||
@@ -42,6 +42,7 @@
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
#include <QTimer>
|
||||
#include <QUuid>
|
||||
|
||||
#include <cstdlib>
|
||||
#include <queue>
|
||||
@@ -88,6 +89,14 @@
|
||||
#include "tracker.h"
|
||||
#include "trackerentry.h"
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
#include <iphlpapi.h>
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_WIN) && (_WIN32_WINNT < 0x0600)
|
||||
using NETIO_STATUS = LONG;
|
||||
#endif
|
||||
|
||||
static const char PEER_ID[] = "qB";
|
||||
static const char RESUME_FOLDER[] = "BT_backup";
|
||||
static const char USER_AGENT[] = "qBittorrent/" QBT_VERSION_2;
|
||||
@@ -105,6 +114,10 @@ namespace
|
||||
void torrentQueuePositionTop(const libt::torrent_handle &handle);
|
||||
void torrentQueuePositionBottom(const libt::torrent_handle &handle);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString convertIfaceNameToGuid(const QString &name);
|
||||
#endif
|
||||
|
||||
inline SettingsStorage *settings() { return SettingsStorage::instance(); }
|
||||
|
||||
QStringMap map_cast(const QVariantMap &map)
|
||||
@@ -313,6 +326,10 @@ Session::Session(QObject *parent)
|
||||
sessionSettings.connection_speed = 20; // default is 10
|
||||
sessionSettings.no_connect_privileged_ports = false;
|
||||
sessionSettings.seed_choking_algorithm = libt::session_settings::fastest_upload;
|
||||
// Disk cache pool is rarely tested in libtorrent and doesn't free buffers
|
||||
// Soon to be deprecated there
|
||||
// More info: https://github.com/arvidn/libtorrent/issues/2251
|
||||
sessionSettings.use_disk_cache_pool = false;
|
||||
configure(sessionSettings);
|
||||
m_nativeSession->set_settings(sessionSettings);
|
||||
configureListeningInterface();
|
||||
@@ -340,6 +357,10 @@ Session::Session(QObject *parent)
|
||||
pack.set_int(libt::settings_pack::connection_speed, 20); // default is 10
|
||||
pack.set_bool(libt::settings_pack::no_connect_privileged_ports, false);
|
||||
pack.set_int(libt::settings_pack::seed_choking_algorithm, libt::settings_pack::fastest_upload);
|
||||
// Disk cache pool is rarely tested in libtorrent and doesn't free buffers
|
||||
// Soon to be deprecated there
|
||||
// More info: https://github.com/arvidn/libtorrent/issues/2251
|
||||
pack.set_bool(libt::settings_pack::use_disk_cache_pool, false);
|
||||
configure(pack);
|
||||
|
||||
m_nativeSession = new libt::session(pack, 0);
|
||||
@@ -900,6 +921,10 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
|
||||
{
|
||||
Logger* const logger = Logger::instance();
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString chosenIP;
|
||||
#endif
|
||||
|
||||
if (m_listenInterfaceChanged) {
|
||||
const ushort port = this->port();
|
||||
std::pair<int, int> ports(port, port);
|
||||
@@ -929,10 +954,31 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
|
||||
.arg(ip).arg(port)
|
||||
, Log::INFO);
|
||||
settingsPack.set_str(libt::settings_pack::listen_interfaces, interfacesStr);
|
||||
#ifdef Q_OS_WIN
|
||||
chosenIP = ip;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// On Vista+ versions and after Qt 5.5 QNetworkInterface::name() returns
|
||||
// the interface's Luid and not the GUID.
|
||||
// Libtorrent expects GUIDs for the 'outgoing_interfaces' setting.
|
||||
if (!networkInterface().isEmpty()) {
|
||||
QString guid = convertIfaceNameToGuid(networkInterface());
|
||||
if (!guid.isEmpty()) {
|
||||
settingsPack.set_str(libt::settings_pack::outgoing_interfaces, guid.toStdString());
|
||||
}
|
||||
else {
|
||||
settingsPack.set_str(libt::settings_pack::outgoing_interfaces, chosenIP.toStdString());
|
||||
LogMsg(tr("Could not get GUID of configured network interface. Binding to IP %1").arg(chosenIP)
|
||||
, Log::WARNING);
|
||||
}
|
||||
}
|
||||
#else
|
||||
settingsPack.set_str(libt::settings_pack::outgoing_interfaces, networkInterface().toStdString());
|
||||
#endif
|
||||
m_listenInterfaceChanged = false;
|
||||
}
|
||||
|
||||
@@ -998,8 +1044,8 @@ void Session::configure(libtorrent::settings_pack &settingsPack)
|
||||
settingsPack.set_bool(libt::settings_pack::announce_to_all_trackers, announceToAll);
|
||||
settingsPack.set_bool(libt::settings_pack::announce_to_all_tiers, announceToAll);
|
||||
|
||||
const int cacheSize = diskCacheSize();
|
||||
settingsPack.set_int(libt::settings_pack::cache_size, (cacheSize > 0) ? cacheSize * 64 : -1);
|
||||
const int cacheSize = (diskCacheSize() > -1) ? diskCacheSize() * 64 : -1;
|
||||
settingsPack.set_int(libt::settings_pack::cache_size, cacheSize);
|
||||
settingsPack.set_int(libt::settings_pack::cache_expiry, diskCacheTTL());
|
||||
qDebug() << "Using a disk cache size of" << cacheSize << "MiB";
|
||||
|
||||
@@ -1145,8 +1191,8 @@ void Session::configure(libtorrent::session_settings &sessionSettings)
|
||||
bool announceToAll = announceToAllTrackers();
|
||||
sessionSettings.announce_to_all_trackers = announceToAll;
|
||||
sessionSettings.announce_to_all_tiers = announceToAll;
|
||||
int cacheSize = diskCacheSize();
|
||||
sessionSettings.cache_size = (cacheSize > 0) ? cacheSize * 64 : -1;
|
||||
const int cacheSize = (diskCacheSize() > -1) ? diskCacheSize() * 64 : -1;
|
||||
sessionSettings.cache_size = cacheSize;
|
||||
sessionSettings.cache_expiry = diskCacheTTL();
|
||||
qDebug() << "Using a disk cache size of" << cacheSize << "MiB";
|
||||
libt::session_settings::io_buffer_mode_t mode = useOSCache() ? libt::session_settings::enable_os_cache
|
||||
@@ -1715,7 +1761,7 @@ bool Session::findIncompleteFiles(TorrentInfo &torrentInfo, QString &savePath) c
|
||||
torrentInfo.renameFile(i, filePath + QB_EXT);
|
||||
}
|
||||
if ((i % 100) == 0)
|
||||
qApp->processEvents();
|
||||
qApp->processEvents(QEventLoop::ExcludeUserInputEvents);
|
||||
}
|
||||
|
||||
return found;
|
||||
@@ -2216,10 +2262,10 @@ QString Session::networkInterface() const
|
||||
return m_networkInterface;
|
||||
}
|
||||
|
||||
void Session::setNetworkInterface(const QString &interface)
|
||||
void Session::setNetworkInterface(const QString &iface)
|
||||
{
|
||||
if (interface != networkInterface()) {
|
||||
m_networkInterface = interface;
|
||||
if (iface != networkInterface()) {
|
||||
m_networkInterface = iface;
|
||||
configureListeningInterface();
|
||||
}
|
||||
}
|
||||
@@ -2412,27 +2458,27 @@ void Session::setAnnounceToAllTrackers(bool val)
|
||||
}
|
||||
}
|
||||
|
||||
uint Session::diskCacheSize() const
|
||||
int Session::diskCacheSize() const
|
||||
{
|
||||
uint size = m_diskCacheSize;
|
||||
int size = m_diskCacheSize;
|
||||
// These macros may not be available on compilers other than MSVC and GCC
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
size = qMin(size, 4096u); // 4GiB
|
||||
size = qMin(size, 4096); // 4GiB
|
||||
#else
|
||||
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes
|
||||
// allocate 1536MiB and leave 512MiB to the rest of program data in RAM
|
||||
size = qMin(size, 1536u);
|
||||
size = qMin(size, 1536);
|
||||
#endif
|
||||
return size;
|
||||
}
|
||||
|
||||
void Session::setDiskCacheSize(uint size)
|
||||
void Session::setDiskCacheSize(int size)
|
||||
{
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
size = qMin(size, 4096u); // 4GiB
|
||||
size = qMin(size, 4096); // 4GiB
|
||||
#else
|
||||
// allocate 1536MiB and leave 512MiB to the rest of program data in RAM
|
||||
size = qMin(size, 1536u);
|
||||
size = qMin(size, 1536);
|
||||
#endif
|
||||
if (size != m_diskCacheSize) {
|
||||
m_diskCacheSize = size;
|
||||
@@ -3601,4 +3647,32 @@ namespace
|
||||
qDebug() << Q_FUNC_INFO << " fails: " << exc.what();
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
QString convertIfaceNameToGuid(const QString &name)
|
||||
{
|
||||
// Under Windows XP or on Qt version <= 5.5 'name' will be a GUID already.
|
||||
QUuid uuid(name);
|
||||
if (!uuid.isNull())
|
||||
return uuid.toString().toUpper(); // Libtorrent expects the GUID in uppercase
|
||||
|
||||
using PCONVERTIFACENAMETOLUID = NETIO_STATUS (WINAPI *)(const WCHAR *, PNET_LUID);
|
||||
PCONVERTIFACENAMETOLUID ConvertIfaceNameToLuid = reinterpret_cast<PCONVERTIFACENAMETOLUID>(::GetProcAddress(::GetModuleHandleW(L"Iphlpapi.dll"), "ConvertInterfaceNameToLuidW"));
|
||||
if (!ConvertIfaceNameToLuid) return QString();
|
||||
|
||||
using PCONVERTIFACELUIDTOGUID = NETIO_STATUS (WINAPI *)(const NET_LUID *, GUID *);
|
||||
PCONVERTIFACELUIDTOGUID ConvertIfaceLuidToGuid = reinterpret_cast<PCONVERTIFACELUIDTOGUID>(::GetProcAddress(::GetModuleHandleW(L"Iphlpapi.dll"), "ConvertInterfaceLuidToGuid"));
|
||||
if (!ConvertIfaceLuidToGuid) return QString();
|
||||
|
||||
NET_LUID luid;
|
||||
LONG res = ConvertIfaceNameToLuid(name.toStdWString().c_str(), &luid);
|
||||
if (res == 0) {
|
||||
GUID guid;
|
||||
if (ConvertIfaceLuidToGuid(&luid, &guid) == 0)
|
||||
return QUuid(guid).toString().toUpper();
|
||||
}
|
||||
|
||||
return QString();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -279,8 +279,8 @@ namespace BitTorrent
|
||||
void setIPFilterFile(QString path);
|
||||
bool announceToAllTrackers() const;
|
||||
void setAnnounceToAllTrackers(bool val);
|
||||
uint diskCacheSize() const;
|
||||
void setDiskCacheSize(uint size);
|
||||
int diskCacheSize() const;
|
||||
void setDiskCacheSize(int size);
|
||||
uint diskCacheTTL() const;
|
||||
void setDiskCacheTTL(uint ttl);
|
||||
bool useOSCache() const;
|
||||
@@ -508,7 +508,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<bool> m_isTrackerFilteringEnabled;
|
||||
CachedSettingValue<QString> m_IPFilterFile;
|
||||
CachedSettingValue<bool> m_announceToAllTrackers;
|
||||
CachedSettingValue<uint> m_diskCacheSize;
|
||||
CachedSettingValue<int> m_diskCacheSize;
|
||||
CachedSettingValue<uint> m_diskCacheTTL;
|
||||
CachedSettingValue<bool> m_useOSCache;
|
||||
CachedSettingValue<bool> m_isAnonymousModeEnabled;
|
||||
|
||||
@@ -1330,7 +1330,7 @@ void TorrentHandle::handleStorageMovedAlert(libtorrent::storage_moved_alert *p)
|
||||
}
|
||||
|
||||
qDebug("Torrent is successfully moved from %s to %s", qPrintable(m_oldPath), qPrintable(m_newPath));
|
||||
if (m_oldPath == m_session->torrentTempPath(hash())) {
|
||||
if (QDir(m_oldPath) == QDir(m_session->torrentTempPath(hash()))) {
|
||||
qDebug() << "Removing torrent temp folder:" << m_oldPath;
|
||||
Utils::Fs::smartRemoveEmptyFolderTree(m_oldPath);
|
||||
}
|
||||
|
||||
@@ -77,8 +77,8 @@ void Connection::read()
|
||||
break;
|
||||
|
||||
case RequestParser::NoError:
|
||||
Environment env;
|
||||
env.clientAddress = m_socket->peerAddress();
|
||||
const Environment env {m_socket->localAddress(), m_socket->localPort(), m_socket->peerAddress(), m_socket->peerPort()};
|
||||
|
||||
Response response = m_requestHandler->processRequest(request, env);
|
||||
if (acceptsGzipEncoding(request.headers["accept-encoding"]))
|
||||
response.headers[HEADER_CONTENT_ENCODING] = "gzip";
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
#include "connection.h"
|
||||
|
||||
static const int KEEP_ALIVE_DURATION = 7; // seconds
|
||||
static const int KEEP_ALIVE_DURATION = 7 * 1000; // milliseconds
|
||||
static const int CONNECTIONS_LIMIT = 500;
|
||||
static const int CONNECTIONS_SCAN_INTERVAL = 2; // seconds
|
||||
|
||||
@@ -126,7 +126,7 @@ bool Server::setupHttps(const QByteArray &certificates, const QByteArray &key)
|
||||
{
|
||||
QSslKey sslKey(key, QSsl::Rsa);
|
||||
if (sslKey.isNull())
|
||||
#ifdef QBT_USES_QT5
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0)
|
||||
sslKey = QSslKey(key, QSsl::Ec);
|
||||
#else
|
||||
{
|
||||
|
||||
@@ -37,20 +37,20 @@
|
||||
|
||||
namespace Http
|
||||
{
|
||||
const char HEADER_CACHE_CONTROL[] = "Cache-Control";
|
||||
const char HEADER_CONTENT_ENCODING[] = "Content-Encoding";
|
||||
const char HEADER_CONTENT_LENGTH[] = "Content-Length";
|
||||
const char HEADER_CONTENT_SECURITY_POLICY[] = "Content-Security-Policy";
|
||||
const char HEADER_CONTENT_TYPE[] = "Content-Type";
|
||||
const char HEADER_DATE[] = "Date";
|
||||
const char HEADER_CACHE_CONTROL[] = "cache-control";
|
||||
const char HEADER_CONTENT_ENCODING[] = "content-encoding";
|
||||
const char HEADER_CONTENT_LENGTH[] = "content-length";
|
||||
const char HEADER_CONTENT_SECURITY_POLICY[] = "content-security-policy";
|
||||
const char HEADER_CONTENT_TYPE[] = "content-type";
|
||||
const char HEADER_DATE[] = "date";
|
||||
const char HEADER_HOST[] = "host";
|
||||
const char HEADER_ORIGIN[] = "origin";
|
||||
const char HEADER_REFERER[] = "referer";
|
||||
const char HEADER_SET_COOKIE[] = "Set-Cookie";
|
||||
const char HEADER_X_CONTENT_TYPE_OPTIONS[] = "X-Content-Type-Options";
|
||||
const char HEADER_SET_COOKIE[] = "set-cookie";
|
||||
const char HEADER_X_CONTENT_TYPE_OPTIONS[] = "x-content-type-options";
|
||||
const char HEADER_X_FORWARDED_HOST[] = "x-forwarded-host";
|
||||
const char HEADER_X_FRAME_OPTIONS[] = "X-Frame-Options";
|
||||
const char HEADER_X_XSS_PROTECTION[] = "X-XSS-Protection";
|
||||
const char HEADER_X_FRAME_OPTIONS[] = "x-frame-options";
|
||||
const char HEADER_X_XSS_PROTECTION[] = "x-xss-protection";
|
||||
|
||||
const char CONTENT_TYPE_CSS[] = "text/css; charset=UTF-8";
|
||||
const char CONTENT_TYPE_GIF[] = "image/gif";
|
||||
@@ -65,7 +65,11 @@ namespace Http
|
||||
|
||||
struct Environment
|
||||
{
|
||||
QHostAddress localAddress;
|
||||
quint16 localPort;
|
||||
|
||||
QHostAddress clientAddress;
|
||||
quint16 clientPort;
|
||||
};
|
||||
|
||||
struct UploadedFile
|
||||
|
||||
@@ -439,6 +439,16 @@ void Preferences::setWebUiLocalAuthEnabled(bool enabled)
|
||||
setValue("Preferences/WebUI/LocalHostAuth", enabled);
|
||||
}
|
||||
|
||||
QString Preferences::getServerDomains() const
|
||||
{
|
||||
return value("Preferences/WebUI/ServerDomains", "*").toString();
|
||||
}
|
||||
|
||||
void Preferences::setServerDomains(const QString &str)
|
||||
{
|
||||
setValue("Preferences/WebUI/ServerDomains", str);
|
||||
}
|
||||
|
||||
quint16 Preferences::getWebUiPort() const
|
||||
{
|
||||
return value("Preferences/WebUI/Port", 8080).toInt();
|
||||
|
||||
@@ -175,6 +175,8 @@ public:
|
||||
void setWebUiEnabled(bool enabled);
|
||||
bool isWebUiLocalAuthEnabled() const;
|
||||
void setWebUiLocalAuthEnabled(bool enabled);
|
||||
QString getServerDomains() const;
|
||||
void setServerDomains(const QString &str);
|
||||
quint16 getWebUiPort() const;
|
||||
void setWebUiPort(quint16 port);
|
||||
bool useUPnPForWebUIPort() const;
|
||||
|
||||
@@ -313,11 +313,24 @@ QString Utils::Misc::pythonVersionComplete()
|
||||
// Software 'Anaconda' installs its own python interpreter
|
||||
// and `python --version` returns a string like this:
|
||||
// `Python 3.4.3 :: Anaconda 2.3.0 (64-bit)`
|
||||
const QList<QByteArray> verSplit = output.split(' ');
|
||||
if (verSplit.size() > 1) {
|
||||
version = verSplit.at(1).trimmed();
|
||||
const QList<QByteArray> outSplit = output.split(' ');
|
||||
if (outSplit.size() > 1) {
|
||||
version = outSplit.at(1).trimmed();
|
||||
Logger::instance()->addMessage(QCoreApplication::translate("misc", "Python version: %1").arg(version), Log::INFO);
|
||||
}
|
||||
|
||||
// If python doesn't report a 3-piece version e.g. 3.6.1
|
||||
// then fill the missing pieces with zero
|
||||
const QStringList verSplit = version.split('.', QString::SkipEmptyParts);
|
||||
if (verSplit.size() < 3) {
|
||||
for (int i = verSplit.size(); i < 3; ++i) {
|
||||
if (version.endsWith('.'))
|
||||
version.append('0');
|
||||
else
|
||||
version.append(".0");
|
||||
}
|
||||
Logger::instance()->addMessage(QCoreApplication::translate("misc", "Normalized Python version: %1").arg(version), Log::INFO);
|
||||
}
|
||||
}
|
||||
}
|
||||
return version;
|
||||
|
||||
@@ -190,7 +190,9 @@ void AdvancedSettings::saveAdvancedSettings()
|
||||
|
||||
void AdvancedSettings::updateCacheSpinSuffix(int value)
|
||||
{
|
||||
if (value <= 0)
|
||||
if (value == 0)
|
||||
spin_cache.setSuffix(tr(" (disabled)"));
|
||||
else if (value < 0)
|
||||
spin_cache.setSuffix(tr(" (auto)"));
|
||||
else
|
||||
spin_cache.setSuffix(tr(" MiB"));
|
||||
@@ -251,7 +253,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
labelLibtorrentLink.setText(QString("<a href=\"%1\">%2</a>").arg("http://www.libtorrent.org/reference.html").arg(tr("Open documentation")));
|
||||
labelLibtorrentLink.setOpenExternalLinks(true);
|
||||
// Disk write cache
|
||||
spin_cache.setMinimum(0);
|
||||
spin_cache.setMinimum(-1);
|
||||
// When build as 32bit binary, set the maximum at less than 2GB to prevent crashes.
|
||||
// These macros may not be available on compilers other than MSVC and GCC
|
||||
#if defined(__x86_64__) || defined(_M_X64)
|
||||
@@ -323,7 +325,6 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
// https://github.com/qbittorrent/qBittorrent/pull/5135
|
||||
if (iface.addressEntries().isEmpty()) continue;
|
||||
|
||||
if (iface.flags() & QNetworkInterface::IsLoopBack) continue;
|
||||
combo_iface.addItem(iface.humanReadableName(), iface.name());
|
||||
if (!current_iface.isEmpty() && (iface.name() == current_iface)) {
|
||||
combo_iface.setCurrentIndex(i);
|
||||
|
||||
@@ -319,6 +319,7 @@ OptionsDialog::OptionsDialog(QWidget *parent)
|
||||
connect(m_ui->textTrackers, SIGNAL(textChanged()), this, SLOT(enableApplyButton()));
|
||||
#ifndef DISABLE_WEBUI
|
||||
// Web UI tab
|
||||
connect(m_ui->textServerDomains, SIGNAL(textChanged(QString)), this, SLOT(enableApplyButton()));
|
||||
connect(m_ui->checkWebUi, SIGNAL(toggled(bool)), this, SLOT(enableApplyButton()));
|
||||
connect(m_ui->spinWebUiPort, SIGNAL(valueChanged(int)), this, SLOT(enableApplyButton()));
|
||||
connect(m_ui->checkWebUIUPnP, SIGNAL(toggled(bool)), SLOT(enableApplyButton()));
|
||||
@@ -603,6 +604,7 @@ void OptionsDialog::saveOptions()
|
||||
// Web UI
|
||||
pref->setWebUiEnabled(isWebUiEnabled());
|
||||
if (isWebUiEnabled()) {
|
||||
pref->setServerDomains(m_ui->textServerDomains->text());
|
||||
pref->setWebUiPort(webUiPort());
|
||||
pref->setUPnPForWebUIPort(m_ui->checkWebUIUPnP->isChecked());
|
||||
pref->setWebUiHttpsEnabled(m_ui->checkWebUiHttps->isChecked());
|
||||
@@ -975,6 +977,7 @@ void OptionsDialog::loadOptions()
|
||||
// End Bittorrent preferences
|
||||
|
||||
// Web UI preferences
|
||||
m_ui->textServerDomains->setText(pref->getServerDomains());
|
||||
m_ui->checkWebUi->setChecked(pref->isWebUiEnabled());
|
||||
m_ui->spinWebUiPort->setValue(pref->getWebUiPort());
|
||||
m_ui->checkWebUIUPnP->setChecked(pref->useUPnPForWebUIPort());
|
||||
|
||||
@@ -2605,8 +2605,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>438</width>
|
||||
<height>543</height>
|
||||
<width>518</width>
|
||||
<height>602</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_23">
|
||||
@@ -2622,6 +2622,28 @@
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_1">
|
||||
<item>
|
||||
<widget class="QLabel" name="labelServerDomains">
|
||||
<property name="text">
|
||||
<string>Server domains:</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="textServerDomains">
|
||||
<property name="toolTip">
|
||||
<string>Whitelist for filtering HTTP Host header values.
|
||||
In order to defend against DNS rebinding attack,
|
||||
you should put in domain names used by WebUI server.
|
||||
|
||||
Use ';' to split multiple entries. Can use wildcard '*'.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
||||
@@ -86,7 +86,7 @@ SpeedWidget::SpeedWidget(PropertiesWidget *parent)
|
||||
m_graphsMenu->addAction(tr("Tracker Download"));
|
||||
|
||||
m_graphsMenuActions = m_graphsMenu->actions();
|
||||
m_graphsSignalMapper = new QSignalMapper();
|
||||
m_graphsSignalMapper = new QSignalMapper(this);
|
||||
|
||||
for (int id = SpeedPlotView::UP; id < SpeedPlotView::NB_GRAPHS; ++id) {
|
||||
QAction *action = m_graphsMenuActions.at(id);
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
|
||||
#include "abstractwebapplication.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDateTime>
|
||||
#include <QDebug>
|
||||
@@ -91,6 +93,9 @@ AbstractWebApplication::AbstractWebApplication(QObject *parent)
|
||||
QTimer *timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), SLOT(removeInactiveSessions()));
|
||||
timer->start(60 * 1000); // 1 min.
|
||||
|
||||
reloadDomainList();
|
||||
connect(Preferences::instance(), SIGNAL(changed()), this, SLOT(reloadDomainList()));
|
||||
}
|
||||
|
||||
AbstractWebApplication::~AbstractWebApplication()
|
||||
@@ -115,7 +120,7 @@ Http::Response AbstractWebApplication::processRequest(const Http::Request &reque
|
||||
header(Http::HEADER_CONTENT_SECURITY_POLICY, "default-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; script-src 'self' 'unsafe-inline'; object-src 'none';");
|
||||
|
||||
// block cross-site requests
|
||||
if (isCrossSiteRequest(request_)) {
|
||||
if (isCrossSiteRequest(request_) || !validateHostHeader(request_, env, domainList)) {
|
||||
status(401, "Unauthorized");
|
||||
return response();
|
||||
}
|
||||
@@ -153,6 +158,12 @@ void AbstractWebApplication::removeInactiveSessions()
|
||||
}
|
||||
}
|
||||
|
||||
void AbstractWebApplication::reloadDomainList()
|
||||
{
|
||||
domainList = Preferences::instance()->getServerDomains().split(';', QString::SkipEmptyParts);
|
||||
std::for_each(domainList.begin(), domainList.end(), [](QString &entry){ entry = entry.trimmed(); });
|
||||
}
|
||||
|
||||
bool AbstractWebApplication::sessionInitialize()
|
||||
{
|
||||
if (session_ == 0)
|
||||
@@ -391,14 +402,14 @@ bool AbstractWebApplication::isCrossSiteRequest(const Http::Request &request) co
|
||||
&& (left.host() == right.host()));
|
||||
};
|
||||
|
||||
const QString targetOrigin = request.headers.value(Http::HEADER_X_FORWARDED_HOST, request.headers[Http::HEADER_HOST]);
|
||||
const QString targetOrigin = request.headers.value(Http::HEADER_X_FORWARDED_HOST, request.headers.value(Http::HEADER_HOST));
|
||||
const QString originValue = request.headers.value(Http::HEADER_ORIGIN);
|
||||
const QString refererValue = request.headers.value(Http::HEADER_REFERER);
|
||||
|
||||
if (originValue.isEmpty() && refererValue.isEmpty()) {
|
||||
if ((request.path == QLatin1String("/")) || (request.path == QLatin1String("/favicon.ico")))
|
||||
return false; // normal request
|
||||
return true;
|
||||
// owasp.org recommends to block this request, but doing so will inevitably lead Web API users to spoof headers
|
||||
// so lets be permissive here
|
||||
return false;
|
||||
}
|
||||
|
||||
// sent with CORS requests, as well as with POST requests
|
||||
@@ -411,6 +422,44 @@ bool AbstractWebApplication::isCrossSiteRequest(const Http::Request &request) co
|
||||
return true;
|
||||
}
|
||||
|
||||
bool AbstractWebApplication::validateHostHeader(const Http::Request &request, const Http::Environment &env, const QStringList &domains) const
|
||||
{
|
||||
const QUrl hostHeader = QUrl::fromUserInput(request.headers.value(Http::HEADER_HOST));
|
||||
|
||||
// (if present) try matching host header's port with local port
|
||||
const int requestPort = hostHeader.port();
|
||||
if ((requestPort != -1) && (env.localPort != requestPort))
|
||||
return false;
|
||||
|
||||
// try matching host header with local address
|
||||
const QString requestHost = hostHeader.host();
|
||||
|
||||
#if (QT_VERSION >= QT_VERSION_CHECK(5, 8, 0))
|
||||
const bool sameAddr = env.localAddress.isEqual(QHostAddress(requestHost));
|
||||
#else
|
||||
const auto equal = [](const Q_IPV6ADDR &l, const Q_IPV6ADDR &r) -> bool {
|
||||
for (int i = 0; i < 16; ++i) {
|
||||
if (l[i] != r[i])
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
const bool sameAddr = equal(env.localAddress.toIPv6Address(), QHostAddress(requestHost).toIPv6Address());
|
||||
#endif
|
||||
|
||||
if (sameAddr)
|
||||
return true;
|
||||
|
||||
// try matching host header with domain list
|
||||
for (const auto &domain : domains) {
|
||||
QRegExp domainRegex(domain, Qt::CaseInsensitive, QRegExp::Wildcard);
|
||||
if (requestHost.contains(domainRegex))
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
QStringMap AbstractWebApplication::initializeContentTypeByExtMap()
|
||||
{
|
||||
QStringMap map;
|
||||
@@ -432,7 +481,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
||||
// [rfc6265] 4.2.1. Syntax
|
||||
QStringMap ret;
|
||||
const QString cookieStr = request.headers.value(QLatin1String("cookie"));
|
||||
#ifdef QBT_USES_QT5
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||
const QVector<QStringRef> cookies = cookieStr.splitRef(';', QString::SkipEmptyParts);
|
||||
#else
|
||||
const QStringList cookies = cookieStr.split(';', QString::SkipEmptyParts);
|
||||
@@ -442,7 +491,7 @@ QStringMap AbstractWebApplication::parseCookie(const Http::Request &request) con
|
||||
const int idx = cookie.indexOf('=');
|
||||
if (idx < 0)
|
||||
continue;
|
||||
#ifdef QBT_USES_QT5
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)
|
||||
const QString name = cookie.left(idx).trimmed().toString();
|
||||
const QString value = Utils::String::unquote(cookie.mid(idx + 1).trimmed())
|
||||
.toString();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user