You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-16 20:32:23 +02:00
Compare commits
101 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4eac2cab31 | ||
![]() |
87f4f57f8e | ||
![]() |
a6e250fa43 | ||
![]() |
b118079379 | ||
![]() |
cb2d39f2a7 | ||
![]() |
4cf549ff25 | ||
![]() |
b5c6342dca | ||
![]() |
46ec556921 | ||
![]() |
33ae1a7bee | ||
![]() |
87a3a67668 | ||
![]() |
055b1e0163 | ||
![]() |
2bd5ea2c68 | ||
![]() |
1479a74198 | ||
![]() |
9a0d25284c | ||
![]() |
284e836992 | ||
![]() |
43f5b31843 | ||
![]() |
cada6cfc88 | ||
![]() |
99f157927f | ||
![]() |
664664394c | ||
![]() |
a790901691 | ||
![]() |
fdc70eaa62 | ||
![]() |
b05a23e1ab | ||
![]() |
9f6a0882e2 | ||
![]() |
b351b21e55 | ||
![]() |
ef22f06e92 | ||
![]() |
8ea7426bc1 | ||
![]() |
79e7e1727f | ||
![]() |
98c33dd77c | ||
![]() |
9c6504f6dd | ||
![]() |
76c350bdcb | ||
![]() |
106dcfd00e | ||
![]() |
668c8cb0e2 | ||
![]() |
3159bdf4dd | ||
![]() |
97d2c0d187 | ||
![]() |
0041ee3636 | ||
![]() |
1ed523bec3 | ||
![]() |
b131a6e9df | ||
![]() |
56d9d370e9 | ||
![]() |
a6efc4d92d | ||
![]() |
a77db6e822 | ||
![]() |
95a558941e | ||
![]() |
867d69d0f2 | ||
![]() |
a6d381da38 | ||
![]() |
f0eb708b07 | ||
![]() |
1d70698bd0 | ||
![]() |
79871c8e21 | ||
![]() |
25d5524213 | ||
![]() |
8d21b73434 | ||
![]() |
2ef01a314c | ||
![]() |
a8b4aca5e6 | ||
![]() |
67e7315eae | ||
![]() |
a25a15d1c6 | ||
![]() |
086588eeed | ||
![]() |
44fa308681 | ||
![]() |
6188287094 | ||
![]() |
17d10afd65 | ||
![]() |
89bd0e4397 | ||
![]() |
1c1917f885 | ||
![]() |
642377bd65 | ||
![]() |
bb4668c071 | ||
![]() |
689316db09 | ||
![]() |
ad0c008a3e | ||
![]() |
09e3698b37 | ||
![]() |
6450ebfc6c | ||
![]() |
e9f38ebcfd | ||
![]() |
4dba31f534 | ||
![]() |
04c1aad0dd | ||
![]() |
6763f3ac33 | ||
![]() |
afca704db0 | ||
![]() |
eaec8fcddd | ||
![]() |
f86fd52d6f | ||
![]() |
f3f175570c | ||
![]() |
729c80f910 | ||
![]() |
fcaca558a0 | ||
![]() |
983df9113e | ||
![]() |
acf9874252 | ||
![]() |
d7cf6bb11b | ||
![]() |
558ea53cc2 | ||
![]() |
87a6478430 | ||
![]() |
cea673b267 | ||
![]() |
4a5ab93c62 | ||
![]() |
4c86fc8973 | ||
![]() |
1c485ffb07 | ||
![]() |
f283734f13 | ||
![]() |
dca4ff0649 | ||
![]() |
1975f2269e | ||
![]() |
6fac9b42da | ||
![]() |
dabae4c914 | ||
![]() |
b1e9b4493d | ||
![]() |
2fa207e728 | ||
![]() |
7adcd909e7 | ||
![]() |
50805fc2b5 | ||
![]() |
3a1b7b6159 | ||
![]() |
498b7c2436 | ||
![]() |
4f17364305 | ||
![]() |
9ebc115719 | ||
![]() |
a6fa8c3a8e | ||
![]() |
8187366c89 | ||
![]() |
366ad01120 | ||
![]() |
4da05e5914 | ||
![]() |
3fb19b6a28 |
@@ -9,8 +9,8 @@ environment:
|
||||
REPO_DIR: &REPO_DIR c:\qbittorrent
|
||||
CACHE_DIR: &CACHE_DIR c:\qbt_cache
|
||||
|
||||
QBT_VER_URL: http://builds.shiki.hu/appveyor/version
|
||||
QBT_LIB_URL: http://builds.shiki.hu/appveyor/qbt_libraries.7z
|
||||
QBT_VER_URL: https://builds.shiki.hu/appveyor/version
|
||||
QBT_LIB_URL: https://builds.shiki.hu/appveyor/qbt_libraries.7z
|
||||
|
||||
# project directory
|
||||
clone_folder: *REPO_DIR
|
26
.travis.yml
26
.travis.yml
@@ -3,7 +3,7 @@ language: cpp
|
||||
os:
|
||||
- linux
|
||||
- osx
|
||||
osx_image: xcode7
|
||||
osx_image: xcode7.3
|
||||
|
||||
env:
|
||||
matrix:
|
||||
@@ -30,7 +30,10 @@ notifications:
|
||||
|
||||
# container-based builds
|
||||
#sudo: false
|
||||
cache: ccache
|
||||
cache:
|
||||
ccache: true
|
||||
directories:
|
||||
- $HOME/hombebrew_cache
|
||||
|
||||
# opt-in Ubuntu Trusty
|
||||
sudo: required
|
||||
@@ -117,16 +120,29 @@ install:
|
||||
fi
|
||||
- |
|
||||
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
mkdir -p "$HOME/hombebrew_cache" ;
|
||||
wget https://builds.shiki.hu/homebrew/version ;
|
||||
if ! cmp --quiet "version" "$HOME/hombebrew_cache/version" ; then
|
||||
echo "Cached files are different from server. Downloading new ones." ;
|
||||
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 ;
|
||||
fi
|
||||
|
||||
# dependencies
|
||||
brew update > /dev/null ;
|
||||
brew install colormake ccache ;
|
||||
brew outdated "pkg-config" || brew upgrade "pkg-config" ;
|
||||
# libtorrent-rasterbar 1.0.9
|
||||
brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/477d5060fa093883204d70323965375353e03084/Formula/libtorrent-rasterbar.rb ;
|
||||
# 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)" ;
|
||||
brew install "$HOME/hombebrew_cache/libtorrent-rasterbar.rb" ;
|
||||
|
||||
# Qt
|
||||
if [ "$qt" = 4 ]; then brew install qt && ln -s /usr/local/Cellar/qt/4.8.7_2/plugins /usr/local ; fi ;
|
||||
if [ "$qt" = 5 ]; then brew install qt5 && brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.6.0/plugins /usr/local ; fi ;
|
||||
if [ "$qt" = 5 ]; then brew install qt5 && brew link --force qt5 && ln -s /usr/local/Cellar/qt5/5.7.0/plugins /usr/local ; fi ;
|
||||
|
||||
# ccache
|
||||
if [ "$TRAVIS_BRANCH" != "$coverity_branch" ]; then
|
||||
|
49
Changelog
49
Changelog
@@ -1,3 +1,52 @@
|
||||
* Sat Dec 17 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.10
|
||||
- BUGFIX: Fix share ratio limiting. Broken by commit 259b5e51c49b744. Closes #6039 #6048. (sledgehammer999)
|
||||
- BUGFIX: Case insensitive sort for client column. Closes #6054. (Oke Atime)
|
||||
- BUGFIX: Make resume/pause menu items clickable. Closes #6040. (Oke Atime)
|
||||
- WINDOWS: Make the updater to look for the x64 installer if running x64 version. (sledgehammer999)
|
||||
|
||||
* Wed Dec 14 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.9
|
||||
- BUGFIX: Fix slider for per torrent speed limits when no global speed limit has been set. Closes #6046. (sledgehammer999)
|
||||
- BUGFIX: Fix GUI for proxy settings. Closes #6045. (sledgehammer999)
|
||||
- OSX: Correctly migrate settings/rss/usage stats in macOS. Closes #6041. (sledgehammer999)
|
||||
|
||||
* Wed Dec 14 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.8
|
||||
- FEATURE: Start using new libtorrent 1.1.x APIs (needs at least 1.1.2). Still unofficial support. (glassez, sledgehammer999)
|
||||
- FEATURE: Add a new DHT bootstrap node run by libtorrent author arvidn. (sledgehammer999)
|
||||
- FEATURE: Option to disable tracker's favicon download. (sledgehammer999)
|
||||
- FEATURE: Shift + scroll = horizontal scroll. Closes #5980. Only for TransferListWidget, PeerListWidget. (Chocobo1)
|
||||
- BUGFIX: Actually set new path as default when checkBox is enabled in Add New Torrent dialog. (erikssm)
|
||||
- BUGFIX: Properly fix the handling of default save path store/load. (sledgehammer999)
|
||||
- BUGFIX: Fix crash when restoring from tray. Closes #5854. (Chocobo1)
|
||||
- BUGFIX: Export torrents added only after the setting was enabled. (sledgehammer999)
|
||||
- BUGFIX: Delete old rss favicon before assigning new one. (sledgehammer999)
|
||||
- BUGFIX: Don't revert save path value in the Dialog when metadata are received. Closes #5482. (sledgehammer999)
|
||||
- BUGFIX: Don't ever stop seeding forced torrents. Closes #5784. (sledgehammer999)
|
||||
- BUGFIX: Fix potential crash in TransferList widget. Closes #5873. (Chocobo1)
|
||||
- BUGFIX: Sort torrent names case insensitively. (Yez Ezey)
|
||||
- BUGFIX: Fix mistake in getting values for sorting in TransferList widget. (Anton Lashkov)
|
||||
- BUGFIX: Fix memory leaks. (dzmat, Chocobo1)
|
||||
- WEBUI: Fix webui port overflow. (thalieht)
|
||||
- WEBUI: Changed meaning of the value of the 'dl_limit', 'up_limit', 'alt_dl_limit' and 'alt_up_limit' tokens. The value is expressed in bytes and not in KiB. (sledgehammer999)
|
||||
- WEBUI: Don't request client SSL certificate. Closes #3883. (borouhin)
|
||||
- WEBUI: Bump API_VERSION and API_VERSION_MIN to 11.
|
||||
- SEARCH: Fixed extratorrent search not working Closes #5736 #5753. (Yez Ezey)
|
||||
- SEARCH: Update Demonoid plugin. (ngosang)
|
||||
- SEARCH: Remove TorrentReactor plugin. (ngosang)
|
||||
- SEARCH: Fix python auto install, deletion of installer and use 3.5.x series for Vista+. Closes #5871. (sledgehammer999)
|
||||
- SEARCH: Set /usr/local/bin before default PATH on macOS. closes #5639 #5571. This enables finding newer python installs. (Yez Ezey)
|
||||
- COSMETIC: Log: set embedded Tracker [OFF] msg type as info. (thalieht)
|
||||
- COSMETIC: Remove (mostly) useless log warnings about tracker's favicon. (sledgehammer999)
|
||||
- COSMETIC: Change RSS view layout to horizontal. Closes #5920. (Chocobo1)
|
||||
- OSX: Fix crash on exit using Qt4. (Yez Ezey)
|
||||
- OSX: Change QSettings to IniFormat on macOS. Closes #5770 #5808. (Yez Ezey)
|
||||
- LINUX: Workaround a Qt5 bug which results in a flood of network interface change singals. (Eugene Shalygin)
|
||||
- OTHER: Turkish translation for installer. (Burak Yavuz)
|
||||
- OTHER: Update portugueseBR for installer. (DaRKSoM)
|
||||
- OTHER: Update portuguese for installer. (EdwardLinux)
|
||||
- OTHER: Add --disable-qt-dbus to configure if $host_os is macOS. (Yez Ezey)
|
||||
- OTHER: New translations: Icelandic, Latvian, Malay, Occitan, Uzbek.
|
||||
- OTHER: A whole lot of code refactoring by various people.
|
||||
|
||||
* Sun Sep 11 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.7
|
||||
- FEATURE: Delete torrent+files with Shift+Delete (pieniacy)
|
||||
- BUGFIX: Fix 6-hour speedplot point push rate. Close #5545 (Daniel Segesdi)
|
||||
|
@@ -9,6 +9,8 @@ QMAKE_CXXFLAGS += @QBT_CONF_EXTRA_CFLAGS@
|
||||
|
||||
EXTERNAL_INCLUDES = @QBT_CONF_INCLUDES@
|
||||
EXTERNAL_INCLUDES -= $$QMAKE_DEFAULT_INCDIRS
|
||||
# added /usr/local/include due to Qt 5.7.0 bug on macOS
|
||||
macx: EXTERNAL_INCLUDES += "/usr/local/include"
|
||||
INCLUDEPATH += $$EXTERNAL_INCLUDES
|
||||
|
||||
EXTERNAL_LIBS = @LDFLAGS@ @LIBS@
|
||||
|
13
configure
vendored
13
configure
vendored
@@ -4257,6 +4257,17 @@ else
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS is macOS" >&5
|
||||
$as_echo_n "checking whether OS is macOS... " >&6; }
|
||||
if expr "$host_os" : ".*darwin.*" > /dev/null; then :
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
|
||||
$as_echo "yes" >&6; }
|
||||
enable_qt_dbus=no
|
||||
else
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
|
||||
$as_echo "no" >&6; }
|
||||
fi
|
||||
|
||||
# Require 0.23 pkg-config
|
||||
|
||||
|
||||
@@ -5090,7 +5101,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
|
||||
int
|
||||
main ()
|
||||
{
|
||||
boost::system::system_category
|
||||
boost::system::error_category *a = 0;
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
|
@@ -67,6 +67,12 @@ AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
|
||||
LIBS="-lexecinfo $LIBS"],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
AC_MSG_CHECKING([whether OS is macOS])
|
||||
AS_IF([expr "$host_os" : ".*darwin.*" > /dev/null],
|
||||
[AC_MSG_RESULT([yes])
|
||||
enable_qt_dbus=no],
|
||||
[AC_MSG_RESULT([no])])
|
||||
|
||||
# Require 0.23 pkg-config
|
||||
PKG_PROG_PKG_CONFIG([0.23])
|
||||
AS_IF([test "x$PKG_CONFIG" = "x"],
|
||||
|
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.7</string>
|
||||
<string>3.3.10</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>qBit</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
|
29
dist/windows/README.txt
vendored
29
dist/windows/README.txt
vendored
@@ -1,12 +1,12 @@
|
||||
TRANSLATORS:
|
||||
|
||||
1. Use an editor that has NSIS syntax highlighting(eg Notepad++/Geany). This will
|
||||
1. Use an editor that has NSIS syntax highlighting(eg Notepad++/Geany). This will
|
||||
make your life easier.
|
||||
2. Open the relevant .nsi file that exists in the folder named
|
||||
2. Open the relevant .nsi file that exists in the folder named
|
||||
"installer-translations"
|
||||
3. Lines starting with ";" are considered comments. These include the
|
||||
3. Lines starting with ";" are considered comments. These include the
|
||||
english message to help you with the translation.
|
||||
4. Edit only the part inside the quotation marks(""). Unless you know
|
||||
4. Edit only the part inside the quotation marks(""). Unless you know
|
||||
what you are doing.
|
||||
5. Save the files with utf8 encoding and BOM.
|
||||
6. Submit your changes: 1) as a pull request to the official git repo or
|
||||
@@ -16,17 +16,13 @@ TRANSLATORS:
|
||||
PACKAGERS:
|
||||
|
||||
You will need NSIS and upx to make the installer. You need a unicode version of NSIS.
|
||||
I tested with NSIS 3.0a0.
|
||||
I tested with NSIS 3.0 (final).
|
||||
|
||||
1. Open the options.nsi file in an editor and change line that contains
|
||||
"!define PROG_VERSION "3.0.3"" to the version of qbittorrent you just built.
|
||||
2. Extract the plugins found in the folder "nsis plugins" into your
|
||||
"!define PROG_VERSION "3.0.3"" to the version of qbittorrent you just built.
|
||||
2. Extract the plugins found in the folder "nsis plugins" into your
|
||||
NSIS's unicode Plugin directory(usually C:\Program Files\NSIS\Plugins\x86-unicode).
|
||||
Only the *.dll files are needed. Don't use the .dll from UAC.zip, use the one from "UAC Unicode.zip".
|
||||
NOTE: To build the unicode version of UAC with MSVC2008 you need:
|
||||
a) the sources from UAC.zip
|
||||
b) apply the util.cpp.diff from "UAC Unicode.zip" to util.cpp
|
||||
c) in a msvc command prompt issue: cl.exe /O1s /GS- /GR- /EHs-c- /Zl /LD /DUNICODE RunAs.cpp uac.cpp util.cpp /link kernel32.lib user32.lib shell32.lib advapi32.lib ole32.lib /DLL /MANIFEST:NO /OUT:uac.dll
|
||||
Only the *.dll files are needed. Use the unicode version of the dlls.
|
||||
3. The script you need to compile is "qbittorrent.nsi". It includes all other necessary scripts.
|
||||
4. The script expects the following file tree:
|
||||
|
||||
@@ -53,10 +49,11 @@ qbittorrent.exe
|
||||
qbittorrent.nsi
|
||||
qt.conf
|
||||
translations.nsi
|
||||
UAC.nsh
|
||||
uninstaller.nsi
|
||||
|
||||
|
||||
5. "license.txt" is a text file that contains the text rendered
|
||||
5. "license.txt" is a text file that contains the text rendered
|
||||
from src\gui\gpl.html or the text contained in COPYING
|
||||
6. "qbittorrent.exe" is the compiled binary file.
|
||||
|
||||
@@ -64,7 +61,7 @@ SCRIPT HACKERS:
|
||||
|
||||
If you add any new LangString variable to the scripts you NEED to provide
|
||||
"translations" of it to all the .nsi files inside "installer-translations.
|
||||
You can always leave the english string but you have to use all the LANG_<lang name>
|
||||
for the given variable. Otherwise, if the user chooses a language that you
|
||||
haven't provided a LANG_<lang name> for your variable then your string will be empty.
|
||||
You can always leave the english string but you have to use all the LANG_<lang name>
|
||||
for the given variable. Otherwise, if the user chooses a language that you
|
||||
haven't provided a LANG_<lang name> for your variable then your string will be empty.
|
||||
Don't worry though, NSIS throws warnings for this when compiling the scripts.
|
||||
|
2
dist/windows/UAC.nsh
vendored
2
dist/windows/UAC.nsh
vendored
@@ -228,6 +228,8 @@ pop $_LOGICLIB_TEMP
|
||||
!undef _UAC_ParseDefineFlags_orin_this
|
||||
!ifdef _UAC_ParseDefineFlags_orin_f1
|
||||
!undef _UAC_ParseDefineFlags_orin_f1
|
||||
!endif
|
||||
!ifdef _UAC_ParseDefineFlags_orin_f2
|
||||
!undef _UAC_ParseDefineFlags_orin_f2
|
||||
!endif
|
||||
!macroend
|
||||
|
@@ -17,7 +17,7 @@ LangString inst_firewallinfo ${LANG_PORTUGUESE} "Adicionando regra à firewall d
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_PORTUGUESE} "O qBittorrent está a ser executado. Feche a aplicação antes de instalar esta versão."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESE} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESE} "Uma antiga instalação foi encontrada.Essa mesma será desinstalada sem apagar as definições do usuário."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_PORTUGUESE} "A desinstalar versão anterior."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
|
@@ -17,7 +17,7 @@ LangString inst_firewallinfo ${LANG_PORTUGUESEBR} "Adicionando regra no firewall
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_PORTUGUESEBR} "qBittorrent está rodando. Por favor feche a aplicação antes de instalar."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESEBR} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_PORTUGUESEBR} "Uma instalação anterior foi detectada. Ela será desistalada sem deletar as configurações de usuário."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_PORTUGUESEBR} "Desinstalando versão anterior."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
|
44
dist/windows/installer-translations/turkish.nsi
vendored
44
dist/windows/installer-translations/turkish.nsi
vendored
@@ -1,51 +1,51 @@
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_TURKISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_TURKISH} "qBittorrent (zorunlu)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_TURKISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_TURKISH} "Masaüstü Kısayolu oluştur"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_TURKISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_TURKISH} "Başlangıç Menüsü Kısayolu oluştur"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_TURKISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_TURKISH} ".torrent dosyalarını qBittorrent ile aç"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_TURKISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_TURKISH} "Magnet bağlantılarını qBittorrent ile aç"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_TURKISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı ekle"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_TURKISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı ekleniyor"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_TURKISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_TURKISH} "qBittorrent çalışıyor. Lütfen yüklemeden önce uygulamayı kapatın."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_TURKISH} "A previous installation was detected. It will be uninstalled without deleting user settings."
|
||||
LangString inst_uninstall_question ${LANG_TURKISH} "Önceki bir kurulum algılandı. Kullanıcı ayarları silinmeden kaldırılacaktır."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_TURKISH} "Uninstalling previous version."
|
||||
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} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i çalıştır."
|
||||
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
;LangString remove_files ${LANG_ENGLISH} "Remove files"
|
||||
LangString remove_files ${LANG_TURKISH} "Remove files"
|
||||
LangString remove_files ${LANG_TURKISH} "Dosyaları kaldır"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_TURKISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_TURKISH} "Kısayolları kaldır"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_TURKISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_TURKISH} "Dosya ilişkilendirmelerini kaldır"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_TURKISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_TURKISH} "Kayıt defteri anahtarlarını kaldır"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_TURKISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_TURKISH} "Yapılandırma dosyalarını kaldır"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_TURKISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralını kaldır"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_TURKISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı kaldırılıyor"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_TURKISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_TURKISH} "Torrentleri ve önbelleklenen verileri kaldır"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_TURKISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_TURKISH} "qBittorrent çalışıyor. Lütfen kaldırmadan önce uygulamayı kapatın."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_TURKISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_TURKISH} ".torrent ilişkilendirmesi kaldırılmıyor. Şununla ilişkilendirildi:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_TURKISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_TURKISH} "Magnet ilişkilendirmesi kaldırılmıyor. Şununla ilişkilendirildi:"
|
||||
|
BIN
dist/windows/nsis plugins/UAC Unicode.zip
vendored
BIN
dist/windows/nsis plugins/UAC Unicode.zip
vendored
Binary file not shown.
BIN
dist/windows/nsis plugins/UAC.zip
vendored
BIN
dist/windows/nsis plugins/UAC.zip
vendored
Binary file not shown.
2
dist/windows/options.nsi
vendored
2
dist/windows/options.nsi
vendored
@@ -19,7 +19,7 @@ XPStyle on
|
||||
!define CSIDL_APPDATA '0x1A' ;Application Data path
|
||||
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
|
||||
|
||||
!define PROG_VERSION "3.3.7"
|
||||
!define PROG_VERSION "3.3.10"
|
||||
!define MUI_FINISHPAGE_RUN
|
||||
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
|
||||
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
|
||||
|
@@ -31,7 +31,7 @@
|
||||
# and this notice are preserved. This file is offered as-is, without any
|
||||
# warranty.
|
||||
|
||||
#serial 17
|
||||
#serial 18
|
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
[
|
||||
@@ -68,9 +68,10 @@ AC_DEFUN([AX_BOOST_SYSTEM],
|
||||
ax_cv_boost_system,
|
||||
[AC_LANG_PUSH([C++])
|
||||
CXXFLAGS_SAVE=$CXXFLAGS
|
||||
CXXFLAGS=
|
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]],
|
||||
[[boost::system::system_category]])],
|
||||
[[boost::system::error_category *a = 0;]])],
|
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no)
|
||||
CXXFLAGS=$CXXFLAGS_SAVE
|
||||
AC_LANG_POP([C++])
|
||||
|
@@ -70,6 +70,7 @@
|
||||
#include "base/net/smtp.h"
|
||||
#include "base/net/downloadmanager.h"
|
||||
#include "base/net/geoipmanager.h"
|
||||
#include "base/net/proxyconfigurationmanager.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/bittorrent/torrenthandle.h"
|
||||
|
||||
@@ -263,7 +264,7 @@ void Application::runExternalProgram(BitTorrent::TorrentHandle *const torrent) c
|
||||
#elif defined(Q_OS_WIN) // test cmd: `echo "%F" > "c:\ab ba.txt"`
|
||||
program.prepend(QLatin1String("\"")).append(QLatin1String("\""));
|
||||
program.prepend(Utils::Misc::windowsSystemPath() + QLatin1String("\\cmd.exe /C "));
|
||||
const uint cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
||||
const int cmdMaxLength = 32768; // max length (incl. terminate char) for `lpCommandLine` in `CreateProcessW()`
|
||||
if ((program.size() + 1) > cmdMaxLength) {
|
||||
logger->addMessage(tr("Torrent: %1, run external program command too long (length > %2), execution failed.").arg(torrent->name()).arg(cmdMaxLength), Log::CRITICAL);
|
||||
return;
|
||||
@@ -395,6 +396,7 @@ void Application::processParams(const QStringList ¶ms)
|
||||
|
||||
int Application::exec(const QStringList ¶ms)
|
||||
{
|
||||
Net::ProxyConfigurationManager::initInstance();
|
||||
Net::DownloadManager::initInstance();
|
||||
#ifdef DISABLE_GUI
|
||||
IconProvider::initInstance();
|
||||
@@ -621,6 +623,7 @@ void Application::cleanup()
|
||||
Net::GeoIPManager::freeInstance();
|
||||
#endif
|
||||
Net::DownloadManager::freeInstance();
|
||||
Net::ProxyConfigurationManager::freeInstance();
|
||||
Preferences::freeInstance();
|
||||
SettingsStorage::freeInstance();
|
||||
delete m_fileLogger;
|
||||
|
@@ -135,6 +135,12 @@ int main(int argc, char *argv[])
|
||||
// We must save it here because QApplication constructor may change it
|
||||
bool isOneArg = (argc == 2);
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// On macOS 10.12 Sierra, Apple changed the behaviour of CFPreferencesSetValue() https://bugreports.qt.io/browse/QTBUG-56344
|
||||
// Due to this, we have to move from native plist to IniFormat
|
||||
macMigratePlists();
|
||||
#endif
|
||||
|
||||
// Create Application
|
||||
QString appId = QLatin1String("qBittorrent-") + Utils::Misc::getUserIDString();
|
||||
QScopedPointer<Application> app(new Application(appId, argc, argv));
|
||||
@@ -230,6 +236,17 @@ int main(int argc, char *argv[])
|
||||
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
|
||||
#endif
|
||||
|
||||
#if defined(Q_OS_MAC)
|
||||
{
|
||||
// Since Apple made difficult for users to set PATH, we set here for convenience.
|
||||
// Users are supposed to install Homebrew Python for search function.
|
||||
// For more info see issue #5571.
|
||||
QByteArray path = "/usr/local/bin:";
|
||||
path += qgetenv("PATH");
|
||||
qputenv("PATH", path.constData());
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
if (!upgrade()) return EXIT_FAILURE;
|
||||
#else
|
||||
|
@@ -29,24 +29,31 @@
|
||||
#ifndef UPGRADE_H
|
||||
#define UPGRADE_H
|
||||
|
||||
#include <libtorrent/lazy_entry.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
#if LIBTORRENT_VERSION_NUM >= 10100
|
||||
#include <libtorrent/bdecode.hpp>
|
||||
#endif
|
||||
#include <libtorrent/bencode.hpp>
|
||||
#include <libtorrent/entry.hpp>
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
#include <libtorrent/lazy_entry.hpp>
|
||||
#endif
|
||||
|
||||
|
||||
#include <QString>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QRegExp>
|
||||
#ifndef DISABLE_GUI
|
||||
#include <QMessageBox>
|
||||
#endif
|
||||
#include <QRegExp>
|
||||
#include <QString>
|
||||
|
||||
#include "base/logger.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/misc.h"
|
||||
#include "base/utils/string.h"
|
||||
#include "base/qinisettings.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/qinisettings.h"
|
||||
|
||||
bool userAcceptsUpgrade()
|
||||
{
|
||||
@@ -86,10 +93,16 @@ bool upgradeResumeFile(const QString &filepath, const QVariantHash &oldTorrent =
|
||||
QByteArray data = file1.readAll();
|
||||
file1.close();
|
||||
|
||||
libtorrent::lazy_entry fastOld;
|
||||
libtorrent::error_code ec;
|
||||
libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
|
||||
if (ec || (fastOld.type() != libtorrent::lazy_entry::dict_t)) return false;
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
libtorrent::lazy_entry fastOld;
|
||||
libtorrent::lazy_bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
|
||||
if (ec || (fastOld.type() != libtorrent::lazy_entry::dict_t)) return false;
|
||||
#else
|
||||
libtorrent::bdecode_node fastOld;
|
||||
libtorrent::bdecode(data.constData(), data.constData() + data.size(), fastOld, ec);
|
||||
if (ec || (fastOld.type() != libtorrent::bdecode_node::dict_t)) return false;
|
||||
#endif
|
||||
|
||||
libtorrent::entry fastNew;
|
||||
fastNew = fastOld;
|
||||
@@ -143,7 +156,12 @@ bool upgrade(bool ask = true)
|
||||
upgradeResumeFile(backupFolderDir.absoluteFilePath(backupFile));
|
||||
// ****************************************************************************************
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
// native .plist
|
||||
QSettings *oldResumeSettings = new QSettings("qBittorrent", "qBittorrent-resume");
|
||||
#else
|
||||
QIniSettings *oldResumeSettings = new QIniSettings("qBittorrent", "qBittorrent-resume");
|
||||
#endif
|
||||
QString oldResumeFilename = oldResumeSettings->fileName();
|
||||
QVariantHash oldResumeData = oldResumeSettings->value("torrents").toHash();
|
||||
delete oldResumeSettings;
|
||||
@@ -210,4 +228,34 @@ bool upgrade(bool ask = true)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
#ifdef Q_OS_MAC
|
||||
void migratePlistToIni(const QString &application)
|
||||
{
|
||||
QIniSettings iniFile("qBittorrent", application);
|
||||
if (!iniFile.allKeys().isEmpty()) return; // We copy the contents of plist, only if inifile does not exist(is empty).
|
||||
|
||||
QSettings *plistFile = new QSettings("qBittorrent", application);
|
||||
plistFile->setFallbacksEnabled(false);
|
||||
const QStringList plist = plistFile->allKeys();
|
||||
if (!plist.isEmpty()) {
|
||||
foreach (const QString &key, plist)
|
||||
iniFile.setValue(key, plistFile->value(key));
|
||||
plistFile->clear();
|
||||
}
|
||||
|
||||
QString plistPath = plistFile->fileName();
|
||||
delete plistFile;
|
||||
Utils::Fs::forceRemove(plistPath);
|
||||
}
|
||||
|
||||
void macMigratePlists()
|
||||
{
|
||||
migratePlistToIni("qBittorrent-data");
|
||||
migratePlistToIni("qBittorrent-rss");
|
||||
migratePlistToIni("qBittorrent");
|
||||
}
|
||||
#endif // Q_OS_MAC
|
||||
|
||||
|
||||
#endif // UPGRADE_H
|
||||
|
@@ -30,6 +30,7 @@ net/downloadmanager.h
|
||||
net/geoipmanager.h
|
||||
net/portforwarder.h
|
||||
net/private/geoipdatabase.h
|
||||
net/proxyconfigurationmanager.h
|
||||
net/reverseresolution.h
|
||||
net/smtp.h
|
||||
rss/private/rssparser.h
|
||||
@@ -88,6 +89,7 @@ net/downloadmanager.cpp
|
||||
net/geoipmanager.cpp
|
||||
net/portforwarder.cpp
|
||||
net/private/geoipdatabase.cpp
|
||||
net/proxyconfigurationmanager.cpp
|
||||
net/reverseresolution.cpp
|
||||
net/smtp.cpp
|
||||
rss/private/rssparser.cpp
|
||||
|
@@ -5,6 +5,7 @@ HEADERS += \
|
||||
$$PWD/qinisettings.h \
|
||||
$$PWD/logger.h \
|
||||
$$PWD/settingsstorage.h \
|
||||
$$PWD/settingvalue.h \
|
||||
$$PWD/preferences.h \
|
||||
$$PWD/indexrange.h \
|
||||
$$PWD/iconprovider.h \
|
||||
@@ -20,6 +21,7 @@ HEADERS += \
|
||||
$$PWD/net/downloadhandler.h \
|
||||
$$PWD/net/geoipmanager.h \
|
||||
$$PWD/net/portforwarder.h \
|
||||
$$PWD/net/proxyconfigurationmanager.h \
|
||||
$$PWD/net/reverseresolution.h \
|
||||
$$PWD/net/smtp.h \
|
||||
$$PWD/net/private/geoipdatabase.h \
|
||||
@@ -74,6 +76,7 @@ SOURCES += \
|
||||
$$PWD/net/downloadhandler.cpp \
|
||||
$$PWD/net/geoipmanager.cpp \
|
||||
$$PWD/net/portforwarder.cpp \
|
||||
$$PWD/net/proxyconfigurationmanager.cpp \
|
||||
$$PWD/net/reverseresolution.cpp \
|
||||
$$PWD/net/smtp.cpp \
|
||||
$$PWD/net/private/geoipdatabase.cpp \
|
||||
|
@@ -31,13 +31,13 @@
|
||||
#include <QTime>
|
||||
#include <QDateTime>
|
||||
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/preferences.h"
|
||||
#include "bandwidthscheduler.h"
|
||||
|
||||
BandwidthScheduler::BandwidthScheduler(QObject *parent)
|
||||
: QTimer(parent)
|
||||
{
|
||||
Q_ASSERT(Preferences::instance()->isSchedulerEnabled());
|
||||
// Single shot, we call start() again manually
|
||||
setSingleShot(true);
|
||||
// Connect Signals/Slots
|
||||
@@ -47,8 +47,7 @@ BandwidthScheduler::BandwidthScheduler(QObject *parent)
|
||||
void BandwidthScheduler::start()
|
||||
{
|
||||
const Preferences* const pref = Preferences::instance();
|
||||
Q_ASSERT(pref->isSchedulerEnabled());
|
||||
bool alt_bw_enabled = pref->isAltBandwidthEnabled();
|
||||
bool alt_bw_enabled = BitTorrent::Session::instance()->isAltGlobalSpeedLimitEnabled();
|
||||
|
||||
QTime start = pref->getSchedulerStartTime();
|
||||
QTime end = pref->getSchedulerEndTime();
|
||||
|
@@ -55,10 +55,10 @@ FilterParserThread::~FilterParserThread()
|
||||
}
|
||||
|
||||
// Parser for eMule ip filter in DAT format
|
||||
int FilterParserThread::parseDATFilterFile(QString m_filePath, libt::ip_filter &filter)
|
||||
int FilterParserThread::parseDATFilterFile(QString filePath, libt::ip_filter &filter)
|
||||
{
|
||||
int ruleCount = 0;
|
||||
QFile file(m_filePath);
|
||||
QFile file(filePath);
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
@@ -149,10 +149,10 @@ int FilterParserThread::parseDATFilterFile(QString m_filePath, libt::ip_filter &
|
||||
}
|
||||
|
||||
// Parser for PeerGuardian ip filter in p2p format
|
||||
int FilterParserThread::parseP2PFilterFile(QString m_filePath, libt::ip_filter &filter)
|
||||
int FilterParserThread::parseP2PFilterFile(QString filePath, libt::ip_filter &filter)
|
||||
{
|
||||
int ruleCount = 0;
|
||||
QFile file(m_filePath);
|
||||
QFile file(filePath);
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly | QIODevice::Text)) {
|
||||
@@ -257,10 +257,10 @@ int FilterParserThread::getlineInStream(QDataStream &stream, std::string &name,
|
||||
}
|
||||
|
||||
// Parser for PeerGuardian ip filter in p2p format
|
||||
int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter &filter)
|
||||
int FilterParserThread::parseP2BFilterFile(QString filePath, libt::ip_filter &filter)
|
||||
{
|
||||
int ruleCount = 0;
|
||||
QFile file(m_filePath);
|
||||
QFile file(filePath);
|
||||
if (!file.exists()) return ruleCount;
|
||||
|
||||
if (!file.open(QIODevice::ReadOnly)) {
|
||||
@@ -369,7 +369,7 @@ int FilterParserThread::parseP2BFilterFile(QString m_filePath, libt::ip_filter &
|
||||
// * eMule IP list (DAT): http://wiki.phoenixlabs.org/wiki/DAT_Format
|
||||
// * PeerGuardian Text (P2P): http://wiki.phoenixlabs.org/wiki/P2P_Format
|
||||
// * PeerGuardian Binary (P2B): http://wiki.phoenixlabs.org/wiki/P2B_Format
|
||||
void FilterParserThread::processFilterFile(QString _filePath)
|
||||
void FilterParserThread::processFilterFile(QString filePath)
|
||||
{
|
||||
if (isRunning()) {
|
||||
// Already parsing a filter, m_abort first
|
||||
@@ -378,27 +378,11 @@ void FilterParserThread::processFilterFile(QString _filePath)
|
||||
}
|
||||
|
||||
m_abort = false;
|
||||
m_filePath = _filePath;
|
||||
m_filePath = filePath;
|
||||
// Run it
|
||||
start();
|
||||
}
|
||||
|
||||
void FilterParserThread::processFilterList(libt::session *s, const QStringList &IPs)
|
||||
{
|
||||
// First, import current filter
|
||||
libt::ip_filter filter = s->get_ip_filter();
|
||||
foreach (const QString &ip, IPs) {
|
||||
qDebug("Manual ban of peer %s", ip.toLocal8Bit().constData());
|
||||
boost::system::error_code ec;
|
||||
libt::address addr = libt::address::from_string(ip.toLocal8Bit().constData(), ec);
|
||||
Q_ASSERT(!ec);
|
||||
if (!ec)
|
||||
filter.add_rule(addr, addr, libt::ip_filter::blocked);
|
||||
}
|
||||
|
||||
s->set_ip_filter(filter);
|
||||
}
|
||||
|
||||
QString FilterParserThread::cleanupIPAddress(QString _ip)
|
||||
{
|
||||
_ip = _ip.trimmed();
|
||||
|
@@ -54,8 +54,7 @@ public:
|
||||
int parseP2PFilterFile(QString filePath, libtorrent::ip_filter &filter);
|
||||
int getlineInStream(QDataStream &stream, std::string &name, char delim);
|
||||
int parseP2BFilterFile(QString filePath, libtorrent::ip_filter &filter);
|
||||
void processFilterFile(QString _filePath);
|
||||
static void processFilterList(libtorrent::session *s, const QStringList &IPs);
|
||||
void processFilterFile(QString filePath);
|
||||
|
||||
signals:
|
||||
void IPFilterParsed(int ruleCount);
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -752,7 +752,7 @@ void TorrentHandle::updateState()
|
||||
m_state = isSeed() ? TorrentState::PausedUploading : TorrentState::PausedDownloading;
|
||||
}
|
||||
else {
|
||||
if (m_session->isQueueingEnabled() && isQueued() && !isChecking()) {
|
||||
if (m_session->isQueueingSystemEnabled() && isQueued() && !isChecking()) {
|
||||
m_state = isSeed() ? TorrentState::QueuedUploading : TorrentState::QueuedDownloading;
|
||||
}
|
||||
else {
|
||||
|
@@ -239,7 +239,7 @@ QVector<int> TorrentInfo::fileIndicesForPiece(int pieceIndex) const
|
||||
std::vector<libt::file_slice> files(
|
||||
nativeInfo()->map_block(pieceIndex, 0, nativeInfo()->piece_size(pieceIndex)));
|
||||
QVector<int> res;
|
||||
res.reserve(files.size());
|
||||
res.reserve(int(files.size()));
|
||||
std::transform(files.begin(), files.end(), std::back_inserter(res),
|
||||
[](const libt::file_slice &s) { return s.file_index; });
|
||||
|
||||
|
@@ -91,6 +91,7 @@ void Server::incomingConnection(int socketDescriptor)
|
||||
#else
|
||||
static_cast<QSslSocket*>(serverSocket)->setLocalCertificate(m_certificates.first());
|
||||
#endif
|
||||
static_cast<QSslSocket*>(serverSocket)->setPeerVerifyMode(QSslSocket::VerifyNone);
|
||||
static_cast<QSslSocket*>(serverSocket)->startServerEncryption();
|
||||
}
|
||||
#endif
|
||||
|
@@ -27,20 +27,21 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include "downloadmanager.h"
|
||||
|
||||
#include <QDateTime>
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkProxy>
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QNetworkReply>
|
||||
#include <QDebug>
|
||||
#include <QNetworkCookie>
|
||||
#include <QNetworkCookieJar>
|
||||
#include <QNetworkProxy>
|
||||
#include <QNetworkReply>
|
||||
#include <QNetworkRequest>
|
||||
#include <QSslError>
|
||||
#include <QUrl>
|
||||
#include <QDebug>
|
||||
|
||||
#include "base/preferences.h"
|
||||
#include "downloadhandler.h"
|
||||
#include "downloadmanager.h"
|
||||
#include "proxyconfigurationmanager.h"
|
||||
|
||||
// Spoof Firefox 38 user agent to avoid web server banning
|
||||
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0";
|
||||
@@ -208,16 +209,16 @@ bool DownloadManager::deleteCookie(const QNetworkCookie &cookie)
|
||||
|
||||
void DownloadManager::applyProxySettings()
|
||||
{
|
||||
auto proxyManager = ProxyConfigurationManager::instance();
|
||||
ProxyConfiguration proxyConfig = proxyManager->proxyConfiguration();
|
||||
QNetworkProxy proxy;
|
||||
const Preferences* const pref = Preferences::instance();
|
||||
|
||||
if (pref->isProxyEnabled() && !pref->isProxyOnlyForTorrents()) {
|
||||
if (!proxyManager->isProxyOnlyForTorrents() && (proxyConfig.type != ProxyType::None)) {
|
||||
// Proxy enabled
|
||||
proxy.setHostName(pref->getProxyIp());
|
||||
proxy.setPort(pref->getProxyPort());
|
||||
proxy.setHostName(proxyConfig.ip);
|
||||
proxy.setPort(proxyConfig.port);
|
||||
// Default proxy type is HTTP, we must change if it is SOCKS5
|
||||
const int proxyType = pref->getProxyType();
|
||||
if ((proxyType == Proxy::SOCKS5) || (proxyType == Proxy::SOCKS5_PW)) {
|
||||
if ((proxyConfig.type == ProxyType::SOCKS5) || (proxyConfig.type == ProxyType::SOCKS5_PW)) {
|
||||
qDebug() << Q_FUNC_INFO << "using SOCKS proxy";
|
||||
proxy.setType(QNetworkProxy::Socks5Proxy);
|
||||
}
|
||||
@@ -226,10 +227,10 @@ void DownloadManager::applyProxySettings()
|
||||
proxy.setType(QNetworkProxy::HttpProxy);
|
||||
}
|
||||
// Authentication?
|
||||
if (pref->isProxyAuthEnabled()) {
|
||||
if (proxyManager->isAuthenticationRequired()) {
|
||||
qDebug("Proxy requires authentication, authenticating");
|
||||
proxy.setUser(pref->getProxyUsername());
|
||||
proxy.setPassword(pref->getProxyPassword());
|
||||
proxy.setUser(proxyConfig.username);
|
||||
proxy.setPassword(proxyConfig.password);
|
||||
}
|
||||
}
|
||||
else {
|
||||
|
@@ -45,7 +45,6 @@
|
||||
static const char DATABASE_URL[] = "https://geolite.maxmind.com/download/geoip/database/GeoLite2-Country.mmdb.gz";
|
||||
static const char GEOIP_FOLDER[] = "GeoIP";
|
||||
static const char GEOIP_FILENAME[] = "GeoLite2-Country.mmdb";
|
||||
static const int CACHE_SIZE = 1000;
|
||||
static const int UPDATE_INTERVAL = 30; // Days between database updates
|
||||
|
||||
using namespace Net;
|
||||
|
@@ -26,13 +26,17 @@
|
||||
* exception statement from your version.
|
||||
*/
|
||||
|
||||
#include "portforwarder.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
#include <libtorrent/session.hpp>
|
||||
#include <libtorrent/version.hpp>
|
||||
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
#include "portforwarder.h"
|
||||
#include "base/settingsstorage.h"
|
||||
|
||||
static const QString KEY_ENABLED = QLatin1String("Network/PortForwardingEnabled");
|
||||
|
||||
namespace libt = libtorrent;
|
||||
using namespace Net;
|
||||
@@ -42,8 +46,8 @@ PortForwarder::PortForwarder(libtorrent::session *provider, QObject *parent)
|
||||
, m_active(false)
|
||||
, m_provider(provider)
|
||||
{
|
||||
configure();
|
||||
connect(Preferences::instance(), SIGNAL(changed()), SLOT(configure()));
|
||||
if (SettingsStorage::instance()->loadValue(KEY_ENABLED, true).toBool())
|
||||
start();
|
||||
}
|
||||
|
||||
PortForwarder::~PortForwarder()
|
||||
@@ -70,7 +74,24 @@ PortForwarder *PortForwarder::instance()
|
||||
return m_instance;
|
||||
}
|
||||
|
||||
void PortForwarder::addPort(qint16 port)
|
||||
bool PortForwarder::isEnabled() const
|
||||
{
|
||||
return m_active;
|
||||
}
|
||||
|
||||
void PortForwarder::setEnabled(bool enabled)
|
||||
{
|
||||
if (m_active != enabled) {
|
||||
if (enabled)
|
||||
start();
|
||||
else
|
||||
stop();
|
||||
|
||||
SettingsStorage::instance()->storeValue(KEY_ENABLED, enabled);
|
||||
}
|
||||
}
|
||||
|
||||
void PortForwarder::addPort(quint16 port)
|
||||
{
|
||||
if (!m_mappedPorts.contains(port)) {
|
||||
m_mappedPorts.insert(port, 0);
|
||||
@@ -79,7 +100,7 @@ void PortForwarder::addPort(qint16 port)
|
||||
}
|
||||
}
|
||||
|
||||
void PortForwarder::deletePort(qint16 port)
|
||||
void PortForwarder::deletePort(quint16 port)
|
||||
{
|
||||
if (m_mappedPorts.contains(port)) {
|
||||
if (m_active)
|
||||
@@ -88,23 +109,19 @@ void PortForwarder::deletePort(qint16 port)
|
||||
}
|
||||
}
|
||||
|
||||
void PortForwarder::configure()
|
||||
{
|
||||
bool enable = Preferences::instance()->isUPnPEnabled();
|
||||
if (m_active != enable) {
|
||||
if (enable)
|
||||
start();
|
||||
else
|
||||
stop();
|
||||
}
|
||||
}
|
||||
|
||||
void PortForwarder::start()
|
||||
{
|
||||
qDebug("Enabling UPnP / NAT-PMP");
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
m_provider->start_upnp();
|
||||
m_provider->start_natpmp();
|
||||
foreach (qint16 port, m_mappedPorts.keys())
|
||||
#else
|
||||
libt::settings_pack settingsPack = m_provider->get_settings();
|
||||
settingsPack.set_bool(libt::settings_pack::enable_upnp, true);
|
||||
settingsPack.set_bool(libt::settings_pack::enable_natpmp, true);
|
||||
m_provider->apply_settings(settingsPack);
|
||||
#endif
|
||||
foreach (quint16 port, m_mappedPorts.keys())
|
||||
m_mappedPorts[port] = m_provider->add_port_mapping(libt::session::tcp, port, port);
|
||||
m_active = true;
|
||||
Logger::instance()->addMessage(tr("UPnP / NAT-PMP support [ON]"), Log::INFO);
|
||||
@@ -113,8 +130,15 @@ void PortForwarder::start()
|
||||
void PortForwarder::stop()
|
||||
{
|
||||
qDebug("Disabling UPnP / NAT-PMP");
|
||||
#if LIBTORRENT_VERSION_NUM < 10100
|
||||
m_provider->stop_upnp();
|
||||
m_provider->stop_natpmp();
|
||||
#else
|
||||
libt::settings_pack settingsPack = m_provider->get_settings();
|
||||
settingsPack.set_bool(libt::settings_pack::enable_upnp, false);
|
||||
settingsPack.set_bool(libt::settings_pack::enable_natpmp, false);
|
||||
m_provider->apply_settings(settingsPack);
|
||||
#endif
|
||||
m_active = false;
|
||||
Logger::instance()->addMessage(tr("UPnP / NAT-PMP support [OFF]"), Log::INFO);
|
||||
}
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user