Commit Graph

106 Commits

Author SHA1 Message Date
Charles Kerr 50dca24f50
refactor: aggregate crypto handles when computing digests (#6662)
* refactor: aggregate per-crypto-pkg fields instead of using inheritance
2024-03-04 16:59:51 -06:00
Charles Kerr c14d445cf5
refactor: libtransmission Settings (#6592)
* refactor: make tr_session_settings a libtransmission::Settings

* refactor: make VariantConverter private in settings.cc
2024-02-15 11:31:09 -06:00
Cœur ee1e762394
chore: crash report messages are now unsupported (#6583) 2024-02-10 21:15:31 -06:00
Charles Kerr 340d0d4966
refactor: add libtransmission::Settings (#6575)
* refactor: add libtransmission::Settings

* refactor: move RPC server's settings into tr_rpc_server::Settings

* build: update project.pbxproj

---------

Co-authored-by: Dzmitry Neviadomski <nevack.d@gmail.com>
2024-02-07 10:14:47 -06:00
Geoffrey Bonneville 7030b53e2e
android patches for ndk (#6024)
* android patches for ndk

* Update libtransmission/file-capacity.cc

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros: Move common & android vars

* Build android in CI

* Use vcpkg packages for curl & openssl

* Update CI for android

* Fix ndkVersion used with gradle

* Restore actions triggers events

* CMakeLists: Remove cond where curl is not found

* Use vcpkg tag instead of commit hash

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* TrMacros.cmake: clean unused variables & add vcpkg cond

* Remove quotes around VcpkgAndroid inclusion

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>

* actions: split steps to install vcpkg packages

* Build for android arm64

* actions: add make-android condition

* Revert "Use vcpkg tag instead of commit hash"

This reverts commit 65819026b1.

* build.gradle: use cmake version 3.22.1

* actions: use vcpkg 2024.01.12

* actions: Add ninja-build dependency

---------

Co-authored-by: Mike Gelfand <mikedld@users.noreply.github.com>
2024-01-21 15:27:24 +00:00
Cœur 376d806b2e
build: fix libtransmission build on very old cmake versions (#6418)
* Fix libtransmission build requirements

* code review: keeping compatibility with deprecated cmake
2024-01-01 21:58:22 -06:00
Charles Kerr e14806c409
refactor: c++ify libtransmission's tr_ctor struct (#6295) 2023-11-26 15:43:37 -06:00
Charles Kerr 2e32789193
refactor: add libtransmission::Values (#6215) 2023-11-09 08:39:06 -06:00
Yat Ho 2130eb941a
refactor: drop jsonsl in favour of RapidJSON (#6138) 2023-10-21 14:00:12 -05:00
Charles Kerr a4d205612a
refactor: add tr_variant_serde (#5903) 2023-08-17 11:02:45 -05:00
Cœur 84f9d01e7d
fix: -fobjc-arc with GCC (#5632) 2023-07-29 20:57:43 -05:00
Charles Kerr 56b27057fd
refactor: add lightweight observable / observer for decoupling (#5716) 2023-07-04 15:47:18 -05:00
Charles Kerr 22bb9e5757
refactor: rename tr_dirSpace() to tr_sys_path_capacity() (#5689) 2023-06-29 10:23:00 -05:00
Charles Kerr 432fc9bafc
refactor: add libsmall dependency (#5649)
* refactor: add small dependency

* refactor: use small in variant.cc

* refactor: use small in cache.h
2023-06-20 22:50:36 -05:00
tearfur 474a30ab2d
feat: add global IP cache, fix UDP connection failure warnings 2023-05-05 12:17:40 -05:00
Charles Kerr 1b6b85989c
feat: add generic favicon_cache class for reuse between Qt, GTK app (#5294) 2023-04-22 21:11:16 -05:00
Charles Kerr d72cb67cfb
chore: include directory name in libtransmission #includes (#5308) 2023-04-14 14:33:23 -05:00
Cœur 91717fe91d
fix: potential NSString leak in tr_strv_convert_utf8() 2023-04-11 17:36:22 -05:00
Cœur c60bb5b834
fix: crash when magnet dn isn't utf-8 (#5244) 2023-03-19 10:36:16 -05:00
Thomas Klausner 62a60b4ea4
fix: link libquota on NetBSD to fix FTBFS (#4863) 2023-02-13 12:04:14 -06:00
Charles Kerr 8b1290c895
build: remove explicit iconv dependency in libtransmission (#4565) 2023-01-08 22:21:31 -06:00
Charles Kerr 1e521b9030
fix: -Wredundant-decls warning when building with g++ (#4526) 2023-01-03 15:26:04 -06:00
Mike Gelfand 57e6b06921
Modernize CMake code (ongoing refactoring) (#4515)
* Use imported CMake target for CURL

* Use imported CMake target for fmtlib

* Use imported CMake target for WideInteger

* Use imported CMake target for FastFloat

* Use imported CMake target for UtfCpp

* Use imported CMake target for Threads

* Use imported CMake target for Iconv

* Use imported CMake target for crypto backend

* Use imported CMake target for GTK

* Use imported CMake target for Qt

* Use imported CMake target for deflate

* Use imported CMake target for libevent

* Use imported CMake target for natpmp

* Use imported CMake target for miniupnpc

* Use imported CMake target for dht

* Use imported CMake target for psl

* Use imported CMake target for libutp

* Use imported CMake target for libb64

* Use include directories from libtransmission target
2023-01-02 16:23:51 +00:00
Charles Kerr 47ebb3f63a
refactor: remove obsolete lightweight build option (#4509) 2023-01-01 16:24:12 -06:00
Mike Gelfand bc380511db
Modernize CMake code (ongoing refactoring) (#4507)
* Reformat CMake code

* Bump minimum CMake version to 3.12

* Add target sources separately via `target_source()`

* Make `tr_win32_app_info()` add target sources on its own

* Don't use `include_directories()`

* Don't use `add_definitions()`

* Limit use of `add_compile_options()`

* Move VDKQueue target declaration to a subdirectory

* Add `tr_disable_source_files_compile()` helper

* Add `tr_target_glib_resources()` helper

* Add `tr_gettext_msgfmt()` helper

* Enable AUTOUIC for Qt client

* Enable AUTORCC for Qt client

* Remove AUTO{MOC,RCC,UIC} source group overrides

* Add `tr_target_idl_files()` helper

* Move source group setup to `tr_qt_add_translation()`

* Add `tr_target_xib_files()` helper

* Prefer `target_sources()` to intermediate variables

* Use explicit visibility versions of `target_*()` commands

* Prefer genexes to conditions in `target_*()` commands

* Add `tr_allow_compile_if()` helper

* Leave only top-level `project()`, remove the rest

* Minor fixups

* Fixup Mac QL plugin install

* Fixup IDE target folders and source groups
2023-01-01 19:49:48 +00:00
Mike Gelfand f7edcfcb2a
Drop obsolete CyaSSL and PolarSSL crypto backends (#4495)
* Drop support for CyaSSL (keep WolfSSL)

* Drop support for PolarSSL (keep MbedTLS)
2022-12-29 22:38:04 +00:00
Mike Gelfand 128cf34123
Move jsonsl and wildmat to third-party (#4402)
* Move jsonsl to third-party

This treats it as proper 3rd-party code to which our warning and style
settings don't extend.

* Move wildmat to third-party

This treats it as proper 3rd-party code to which our warning and style
settings don't extend.

* Fixup Xcode project to match new project structure
2022-12-18 19:19:07 +00:00
Mike Gelfand e694c3e3a0
Use C++ (not C) warning flags for GTK client (#4395)
Use the opportunity to reduce duplication.
2022-12-18 01:02:03 +00:00
Charles Kerr 9a5d9a0ba2
refactor: tr_peer_socket (#4325)
* refactor: make tr_peer_socket.type private

* refactor: reimplement tr_peerIo::address() as a wrapper around tr_peer_socket::address()

* refactor: remove tr_address, tr_port from tr_peerIo

* refactor: replace tr_netClosePeerSocket() with tr_peer_socket::close()
2022-12-05 18:53:31 -06:00
Charles Kerr a45cc2a79d
refactor: try again to use getaddrinfo in announcer_udp (#4201) 2022-11-16 15:13:31 -06:00
Charles Kerr d2125ee965
perf: revert e065565cd to restore async dns lookups (#4182) 2022-11-15 11:16:49 -06:00
Charles Kerr 4d8509c180
refactor: add libtransmission::evhelpers (#4104) 2022-11-06 15:11:30 -06:00
Charles Kerr 831eb8d40f
refactor: make `tr_session_thread` a unique_ptr owned by tr_session (#4069) 2022-11-04 16:20:27 -05:00
Charles Kerr e065565cd4
reafctor: use getaddrinfo() instead of evdns (#4094) 2022-11-04 13:29:56 -05:00
Charles Kerr 611d36ac84
refactor: decouple session settings from the session class (#4053) 2022-11-01 19:32:26 -05:00
Charles Kerr 450f1dcadc
refactor: extract `tr_buffer` class from `tr_peerIo` (#3986) 2022-10-19 11:42:08 -05:00
Charles Kerr c8e652c820
refactor: add dns interface class (#3977) 2022-10-17 14:41:42 -05:00
Charles Kerr bf156a97cf
refactor: port forwarding (#3850)
* refactor: rename state enum type as tr_port_forwarding_state

* chore: use snake_case for tr_shared struct fields

* refactor: replace tr_shared with tr_port_forwarding

* refactor: make tr_natpmp_state an enum class

* refactor: uniform naming for port-forwarding module

* refactor: move output-only parameters in tr_natpmp::pulse() to return struct

* fix: use a nullptr multicastif if bindaddr is empty

* chore: use PascalCase for enum class values

* chore: clean up port-forwarding #includes

* chore: remove unused tr_port_forwarding::peerPort()
2022-09-30 08:59:10 -05:00
Dmitry Antipov 243ab1058d
refactor: fold session UDP innards into C++ class (#3794)
* Use std::unique_ptr to manage UDP core object

N.B.: it's no longer valid to call socket adjustments quirks from
tr_sessionSetUTPEnabled() because the corresponding object may be
not created yet. We have to create (or re-create) it explicitly
(like it's done in tr_sessionSetDHTEnabled()) or just set
is_utp_enabled_ flag of the session and assume that socket
adjustments will be done later when the object is constructed.
2022-09-21 13:25:53 -05:00
Charles Kerr e8686095ed
refactor: local peer discovery (#3696) 2022-08-24 16:03:30 -05:00
Charles Kerr 5bcbb7e34b
refactor: aggregate arc4 into libtransmission (#3684) 2022-08-20 13:41:40 -05:00
Charles Kerr c66303fae2
refactor: watchdir (#3606) 2022-08-10 08:34:51 -05:00
Charles Kerr b49cccbd3e
refactor: add timer class (#3603)
Wraps around evtimer so that some of the codebase can use libevent without coupling to it.
2022-08-08 17:53:20 -05:00
Charles Kerr 2bcab6be7e
refactor: remove tr_dh code (#3443)
Refactor the MSE handshake Diffie-Hellman key code.
2022-07-14 19:54:10 -05:00
Charles Kerr 34cb56b2af
refactor: remove unused tr_ptrArray class (#3262)
* refactor: remove unused tr_ptrArray class

* fixup! build: add sanitizer CI runs when libtransmission-test changes (#3260)
2022-06-11 21:45:00 -05:00
Charles Kerr 19db28c04d
perf: faster detection of invalid filenames (#3126)
* refactor: move file_info into tr_torrent_files

* chore: rename files-test as torrent-files-test.cc

* test: add tests for tr_torrent_files::isSubpathPortable()
2022-05-23 17:53:26 -05:00
Charles Kerr 2293f4336a
perf: use fast_float to parse floating-point numbers (#3092) 2022-05-16 00:06:17 -05:00
Charles Kerr 5dbe1f4669
refactor: replace tr_fdlimit with tr_open_files (#3016) 2022-04-28 21:35:47 -05:00
Charles Kerr 2866638e1b
refactor: add tr_torrent_files::move() and remove() (#2919) 2022-04-15 18:39:04 -05:00
Charles Kerr 4a65956cc9
refactor: extract some file management into tr_files class (#2906) 2022-04-12 10:00:02 -05:00