Commit Graph
273 Commits
Author SHA1 Message Date
Kenneth SkovhedeandGitHub b00a0ffbdb Merge pull request #6550 from duplicati/feature/add-power-mode-provider-selection
Add PowerMode provider selection
2025-10-20 08:25:29 +02:00
Kenneth Skovhede 6ed507c0b3 Add option to limit modules
This PR adds the option to limit the available modules to just the set of specified choices.

If no option is set, all modules are available (default).
If the option is set, only those in the list are available (whitelisting).

The options are:
- `--allowed-backend-modules`
- `--allowed-encryption-modules`
- `--allowed-compression-modules`
2025-10-17 10:01:31 +02:00
Kenneth Skovhede 3269c87329 Add PowerMode provider selection
This PR adds settings to choose a Power Mode provider, which will detect if the system is in a paused/suspended state and avoid starting tasks while being suspended.

This currently only works for Windows, where the previous inplementation is named `NET` (for .NET) and the new mode is named `Native` and using the Windows documented approach with a hidden window that listens for `WM_POWERBROADCAST` messages.

The default is `Native` but can now also be disabled by choosing the `None` provider.
2025-10-15 17:58:24 +02:00
Kenneth Skovhede d675b3926e Fix a typo
This fixes #6502
2025-09-16 09:51:44 +02:00
Kenneth Skovhede 3ae93f0102 Prevent thread leak in TrayIcon
This PR changes the termination signal to a `CancellationToken` instead of a `ManualResetEvent` as the former works better with async code.

With this change there is no longer a thread being captured during each long poll operation.

This fixes #6452
2025-08-07 11:50:01 +02:00
Kenneth Skovhede 260ac36836 Fixed datafolder help showing the env var name
This fixes #6431
2025-07-27 11:45:18 +02:00
Kenneth Skovhede fc478146f3 Update ServerUtil probing
This PR updates the probing logic to not try the database if a password is supplied on the commandline.

It also fixes a crash that could happen at an unwanted place, if the user does not have write access to the supplied data folder. After this, the application will still crash due to not having  a place to write information, but it does not crash in the preloader logic. This also prevents creating the folder while probing for the database.

This PR also fixes a case where the database could become encrypted, if the ServerUtil was providing an encryption key to an unencrypted database. Before this fix, the database would be encrypted with the key provided to ServerUtil, which would most likely cause the Server/TrayIcon to fail starting and perhaps crash.

This fixes #6377
2025-07-10 21:03:16 +02:00
Kenneth SkovhedeandGitHub 5ff613b5da Merge pull request #6360 from carljohnsen/performance/mssqlite-async
Performance/Asynchronous database backend
2025-07-03 11:07:26 +02:00
Kenneth SkovhedeandGitHub ffde75a7ee Merge branch 'master' into feature/pkill-termination-issues 2025-07-01 15:18:58 +02:00
Kenneth Skovhede 395a95b723 Configureable refresh token timeout
This PR adds an option to define the timeout for the refresh token. The token is default set to 30 days.

If the user interacts with Duplicati (i.e., loads the page) the refresh token is regenerated, meaning that the user is not asked to log in again unless the refresh token has expired fully.

With this PR it is possible to configure this duration to be a shorter period, but not longer than the 30 days.
2025-06-29 16:57:47 +02:00
Marcelo C. f7bb2d0e6b Ammending changes 2025-06-27 11:19:24 -03:00
Marcelo C. 3863dbe7ce Addresses shutdown and thread safety issues
Improvement on AvaloniaRunner, HttpServerConnection, and HostedInstanceKeeper to prevent race conditions during shutdown.

Adds cancellation tokens and locking mechanisms to ensure that operations are properly stopped and resources are released in a controlled manner.

Also handles a NullReferenceException during Avalonia shutdown, and avoids invoking `InstanceShutdown` or `ConnectionClosed` multiple times.
2025-06-25 15:24:04 -03:00
Carl Johnsen 90721af98d Updated Server and ImportExportTests to use the async database backend 2025-06-11 08:58:32 +02:00
Carl Johnsen 94420be76d Removed whitespace 2025-06-11 08:58:07 +02:00
Kenneth Skovhede 55d821add1 Added support for disabling API extensions from the commandline
Also added extension that signals if websocket is supported.

Also removed the option to disable visual captcha as it is no longer used.
2025-05-28 12:47:42 +02:00
Kenneth Skovhede 948f74b57e Ensure claim link is emitted 2025-05-16 13:31:34 +02:00
Kenneth Skovhede 6750779982 Register remote control for TrayIcon
This adds the option to register for remote control on the TrayIcon or Server via commandline arguments.

This fixes #6255
2025-05-16 11:42:50 +02:00
Kenneth Skovhede c9f985ecdd Final removal of FIXMEGlobal 2025-05-05 16:13:46 +02:00
Kenneth Skovhede 4191ed31cb Removed unused ServerName property 2025-05-05 14:21:24 +02:00
Kenneth Skovhede 0bc335598a Removed the LogWriteHandler from FIXMEGlobal 2025-05-05 13:41:28 +02:00
Kenneth Skovhede 467c6eb44c One more removal from FIXMEGlobal 2025-05-04 12:21:06 +02:00
Kenneth Skovhede 1947b93a73 One more FIXMEGlobal fix 2025-05-04 12:17:44 +02:00
Kenneth Skovhede eaf6fe5f26 One more FIXMEGlobal removal 2025-05-03 16:25:24 +02:00
Kenneth Skovhede 16acb282c9 More FIXMEGlobal cleanup 2025-05-03 15:54:23 +02:00
Kenneth Skovhede 072f89c747 Remove WorkerThread class
This removes the WorkerThread class and many of the complications around it.

Instead of having a generic worker, there is now the `QueueRunnerService` which takes on all the resposibilities for handling queued tasks.

This is one step towards removing `FIXMEGlobal`
2025-05-03 15:01:09 +02:00
Kenneth Skovhede 4ecb85d2de Added task metadata
This adds the task start and finish time.

The tracking of completed tasks has been moved to a separate service to reduce the use of FIXMEGlobal.
2025-05-02 15:11:34 +02:00
Kenneth Skovhede ba298df915 Added an upgrade command to the database tool 2025-04-25 12:30:03 +02:00
Kenneth SkovhedeandGitHub cfc322c629 Merge pull request #6122 from duplicati/feature/remove-positional-sql-arguments
Remove positional arguments from SQL queries
2025-04-04 11:49:36 +02:00
Kenneth SkovhedeandGitHub 50024dd901 Merge pull request #6097 from duplicati/feature/add-pre-auth-headers
Add support for pre-authenticated headers
2025-04-03 17:17:48 +02:00
Kenneth SkovhedeandGitHub 4779fe96a1 Merge branch 'master' into feature/remove-positional-sql-arguments 2025-04-03 17:09:32 +02:00
Kenneth Skovhede 0b735d79ff More cleanup and a few bug fixes 2025-04-03 16:38:51 +02:00
Marcelo C. bf22d7e178 Changed parameter from boolean to Enum for clarity of purpose 2025-04-02 10:15:21 -03:00
Marcelo C. 2da12c12bb Refactoring of how permissions are set whilst obtaining DataFolder
This addresses [Issue](https://github.com/duplicati/duplicati/issues/6114).

Whenever in non-write context, the permissions of the folder are not set.

Changing pattern from static constructor execution.
2025-04-01 15:21:40 -03:00
Kenneth Skovhede d12b57cb71 Add support for pre-authenticated headers
This adds support for providing a custom defined token instead of using the JWT tokens.

The intended use is for deployments where the authentication is provide by a different layer (a proxy service).
2025-03-28 13:47:27 +01:00
Kenneth Skovhede e056e651f9 Fixed issues with cross-talk options from TrayIcon and Server 2025-03-25 11:36:44 +01:00
Kenneth Skovhede 1a38df7709 Cleaned up some callbacks to not use events with async methods.
Implemented argument validation for the TrayIcon and server startup.
2025-03-25 11:14:03 +01:00
Kenneth Skovhede 9501470d0d Added listen interface to startup message 2025-02-14 11:28:22 +01:00
Kenneth Skovhede 3da02c552c Added force terminate support for Windows 2025-02-09 11:01:21 +01:00
Kenneth Skovhede da1f6562ea Added option to log to console 2025-02-09 10:29:04 +01:00
Kenneth Skovhede 273280c9b7 Added handler for ctrl+c 2025-02-09 10:28:44 +01:00
Kenneth Skovhede 5c4a0594a5 Improved TrayIcon detached.
Implemented support for disconneted state with TrayIcon.
Added some notification support (Windows and Linux).
Changed some logic to prevent hangs on clicks.
2025-02-08 17:30:27 +01:00
Kenneth Skovhede abe79b1a15 Added option to disable update check
This fixes #3983
2025-02-06 11:50:38 +01:00
Kenneth SkovhedeandGitHub 28e3fa1063 Merge pull request #5914 from duplicati/feature/prevent-windows-subfolder-storage
Improve data folder assignment
2025-01-31 14:52:45 +01:00
marceloduplicatiandGitHub 03b7fac65c Merge pull request #5889 from marceloduplicati/feature/unified-help-arguments
Help Command unification
2025-01-30 10:23:10 -03:00
Kenneth Skovhede fac866a5cd Merge remote-tracking branch 'origin/master' into feature/add-support-for-cors 2025-01-30 08:39:15 +01:00
Kenneth Skovhede fac12ba772 Further consolidated the data folder.
Added support for `--portable-mode` and `--server-datafolder` for the CLI, ServerUtil, and Agent.

Fixed a few places where file reads were not cached properly.

Moved some responsibilities of UpdaterManager into DataFolderManager.

This now supports storing `machineid.txt` and `installation.txt` inside the path pointed to by `--server-datafolder` or alternatively with `--portable-mode`.

It is possible that some fringe backwards compatibility is lost with this update.

Fixed an issue with AutoUpdater crashing on check/download.

This fixes #5902
2025-01-28 13:01:35 +01:00
Kenneth Skovhede 7a78f72f19 Updated warning message based on review 2025-01-27 23:17:23 +01:00
Kenneth Skovhede 27f0bb4ea0 Unified code to find the data folder.
The `machineid.txt` and `installation.txt` files are now default located in same folder where the database is default located.
2025-01-27 22:51:45 +01:00
Kenneth Skovhede a819f34b37 Improved logging for WindowsServer 2025-01-27 22:49:29 +01:00
Kenneth Skovhede db3d74e34c Moved warning emit call as the server may not be fully configured yet 2025-01-27 13:00:10 +01:00