Commit Graph
151 Commits
Author SHA1 Message Date
Kenneth Skovhede 43d38efdd3 Fixed remaining warnings 2025-11-14 16:09:05 +01:00
Kenneth Skovhede 1ea74a3c63 Updated to .NET10 2025-11-14 15:05:39 +01:00
Kenneth Skovhede bb70bbc0cc Added option to disable console control
This PR adds an option to disable control from the console.
With this option it is possible to keep a connection to the console, but not allow remote administration.
2025-11-04 14:47:28 +01:00
Kenneth Skovhede 247131118e Fixed edge cases for Clone 2025-11-03 19:24:16 +01:00
Kenneth Skovhede d39f6f4719 Temporary backups return deep copies
This PR fixes an issue with restore from config that would mask the internal objects passphrase and cause all requests to fail due to invalid passphrase.
2025-11-03 19:03:16 +01:00
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 55478523aa Fixed masked passwords breaking test function
This updates the masked password feature to be better at detecting variations of the password mask, such as removing one or more asterisks from the string.

This also updates the "Test destination" endpoints to support a backupId so the call can unmask the target urls.
2025-09-25 13:11:39 +02:00
Kenneth SkovhedeandGitHub 060d83e0d9 Merge branch 'master' into feature/simplify-webmodule-lookups 2025-09-23 13:14:44 +02:00
Kenneth Skovhede 34b6f9ea55 Implemented remotely managed backup configurations
This PR adds the ability to manage backup configurations outside of the the client.

The implementation ensures that locally created configurations cannot be affected by the remotely managed backups.

If the instance is not connected to a remote console, this has no effect.

This PR updates the local database to add the column `ExternalID` that tracks backups that are managed remotely.
2025-09-17 15:07:09 +02:00
Kenneth Skovhede 2822e95626 Simplify webmodule lookups
This PR adds the lookup data to the module output, such that the FE does not need to call a webmodule to get the dictionaries with lookup values.
2025-09-05 10:49:20 +02:00
Kenneth Skovhede 45f902594e Mask passwords to avoid leaking them in the UI
This PR adds a masking function that replaces sensitive parameters with a masking string, such that the passwords are never submitted to the client during edits.

For now, the export feature (both as JSON and as commandline) do not mask the sensitive parameters.

This fixes #2024
2025-09-04 22:03:10 +02:00
Kenneth SkovhedeandGitHub 99d8be79d5 Merge pull request #6364 from duplicati/0nbrsf-codex/find-outdated-packages
Update .NET packages
2025-08-08 17:05:14 +02:00
Kenneth SkovhedeandGitHub 61b7e806fc Merge branch 'master' into 0nbrsf-codex/find-outdated-packages 2025-08-07 23:17:33 +02:00
Kenneth Skovhede e3f1aefec2 Implemented a nonce for refresh tokens
This adds a nonce to the refresh token such that each request to obtain a refresh token must now also provide a matching nonce.

When using non-persisted logins, the request to the server is the same, but the "remember me" flag toggles a shorter duration for the refresh token.

The FE can then store the nonce in either local storage for persisted logins or in session storage for non-persisted logins.

The default is currently to always issue refresh tokens with a nonce, but this can be toggled with the JWT configuration.

The ngax client does not have the non-persisted login so it stores the nonce in local storage, using a name that is compatible with ngclient so the user can swap between them without needing to re-login.

The server util was updated to also store the nonce.

This fixes #6451
2025-08-07 23:10:54 +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 SkovhedeandGitHub ba7bee397c Merge branch 'master' into 0nbrsf-codex/find-outdated-packages 2025-08-07 10:48:59 +02:00
Kenneth Skovhede 89b2dd80d4 Track status per backup
This PR changes the logic to dismiss previous notifications for a the same backup once the backup completes.

This fixes #6420
2025-07-11 13:44:27 +02:00
Kenneth SkovhedeandGitHub e64d4b48de Merge pull request #6408 from duplicati/feature/report-errors
Throw exception on error
2025-07-08 18:05:19 +02:00
Kenneth Skovhede 6835615b6d Throw exception on error
This PR changs the logic for queued tasks, so they throw if they fail. Without this fix, some tasks may look like the succeeded, when they actually failed.
2025-07-08 17:01:35 +02:00
Kenneth Skovhede e14c8bb6c7 Faster progress update
The default is to report progress every second.
In some cases the report output is stuck at the "Starting backup..." phase.

This PR adds a new `Starting_Operation` enum to indicate that we do not yet know which operation is starting.

Then an additional trigger is added to flush the progress when the pahse changes. This means that as soon as we know which operation is active, this will be flushed to the UI.
2025-07-08 14:20:06 +02:00
Kenneth Skovhede af20de27e1 Run backups in order after startup
This changes the order that backups are queue to better match their intended execution order.

If the machine is off for a day, the next time Duplicati starts, it will find all backups that were supposed to have run and queues these.

Before, the order of backups being queued would depend on the database order, essentially creation order.

This PR changes the logic to keep track of when they were supposed to run (first triggered time if multiple slots were skipped), and then adds the backups into the queue, so the job that was supposed to run first, will now be queued first.

This fixes #1476
2025-07-07 11:27:13 +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 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
Kenneth Skovhede 80c070e514 Expand envvars for UI commandline
This PR adds expansion of the UI "commandline" feature when running a backup, similar to what the regular runner does when running the backup.
2025-06-25 10:06:36 +02:00
Carl Johnsen e55c36081f Merge branch 'master' into performance/mssqlite-async 2025-06-24 14:24:09 +02:00
Kenneth Skovhede 819af9e66f Update .NET dependencies 2025-06-24 07:51:26 +02:00
Kenneth SkovhedeandGitHub 66b4d34af3 Merge pull request #6358 from duplicati/feature/add-completed-task-event
Add completed-task event to websocket
2025-06-19 14:51:19 +02:00
Kenneth Skovhede dc19695ddb Add completed-task event to websocket
This adds support for subscribing to a "completed task" event, that is triggered when a task completes.

Using this subscription removes the need to poll for task state.
2025-06-18 21:15:56 +02:00
Kenneth Skovhede b72ad5fe75 Signal update after metadata change
This adds a notification message that is sent after a task has completed and the metadata is updated. This makes the websocket get a fresh list of backups, sorted as prefered.
2025-06-17 14:46:41 +02:00
Carl Johnsen bd493638af Merge branch 'master' into performance/mssqlite-async 2025-06-02 10:39:33 +02:00
Kenneth Skovhede fb08a0b174 Fixed an issue with retry downloads causing errors 2025-05-28 12:49:29 +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 c8b9fb5c73 Websocket subscriptions
This PR adds the ability to subscribe to messages over a websocket.

To prevent polling data, the server can now push messages through the websocket, so the client can instantly update when new data is available.

The change is backwards compatible, still serving the status updates over the socket. If the client is providing the authentication token, it is auto-subscried to the legacy status message.

If the client is using the new authentication message, it needs to subscribe to get the status updates (and any other services it needs).

The event system has been extended to support new, and more accurate, events. This is the first step towards removing the general status update and the long-poll mechanism.

This also re-introduces the blocking marker, so the client can know if the operation is halted due to too many pending transfers.

Some endpoints have been moved to service implementations, to allow serving the exact same data from both endpoints and websocket.

This PR also updates the way the progress is handled, so that all transfers are returned to the client, and the transfer speeds for each transfer is calculated based on a small sample buffer, so the values are more accurate even if the program is paused during transfers.
2025-05-27 12:13:07 +02:00
Carl Johnsen ee40767412 Merge branch 'master' into performance/mssqlite-async 2025-05-27 12:04:50 +02:00
Carl Johnsen a4e608d7c4 Updated transaction propagation logic, as all commands must have a transaction 2025-05-27 06:23:49 +02:00
Kenneth Skovhede 9723b78279 Fixed nullability issues 2025-05-24 13:54:59 +02:00
Kenneth Skovhede d34b20d38a Remove Sia backend
The Sia backend implementation is based on the previous version of Sia and will no longer work after the hard fork later this year.
2025-05-22 15:28:59 +02:00
Carl Johnsen a37f0dda31 Merge branch 'master' into performance/mssqlite-async 2025-05-22 14:09:17 +02:00
Carl Johnsen b399adf534 BeginTransactionSafe() was a legacy helper method that called BeginTransaction() directly 2025-05-22 13:27:36 +02:00
Carl Johnsen 37039f467e Removed whitespace 2025-05-22 13:26:55 +02:00
Kenneth Skovhede ef631a1199 Added feature to suppress warnings
This PR adds the option to suppress warnings by their log id. Warning IDs that are supplied to `--suppress-warnings` will be converted to information messages before being logged.

If a specific warning is disabled, such as `CompressionReadErrorFallback`, this will then no longer count as a warning for the job, and the log file will see the warning as an information message.

This PR also adds two simpler filter options that makes it possible to filter log messages by supplying the log IDs. This can already be achieved with log filters, but the ID filter is a bit simpler to apply, as you only need to know the ID.

Finally, this PR also adds common logging for errors in the categories:
- Permission denied, id = `PermissionDenied`
- File locked, id = `FileLocked`
- Path not found, id = `PathNotFound`
- Path too long, id = `PathTooLong`

These new log ids makes it simpler to ignore warnings about locked or inaccesible files.
2025-05-20 14:26:10 +02:00
Carl-Johannes JohnsenandGitHub 3de03e51de Merge pull request #6258 from carljohnsen/cleanup/remove-legacy-dependencies 2025-05-16 18:01:27 +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
Carl Johnsen 388e849324 Converted tabs to spaces 2025-05-16 10:25:08 +02:00
Carl Johnsen 8be97bcefd Whitespace changes 2025-05-16 10:22:51 +02:00
Carl Johnsen 58db4c9753 Restructured ItemGroups 2025-05-16 10:15:31 +02:00
Kenneth Skovhede 236d6e6086 Fixed an outdated string 2025-05-12 15:26:04 +02:00
Kenneth Skovhede 5630c5e34a Fixed default config no longer loading 2025-05-12 15:11:46 +02:00