Commit Graph
804 Commits
Author SHA1 Message Date
Kenneth Skovhede e9af50f9ac Added minor code cleanup
- Added missing cultureinformation on some date/time strings
- Added a check if a file exists to avoid an exception when probing for datafolder files
- Fixed a string that should be a constant
- Fixed a dirseparator append
- Fixed places where the exception message was logged into the log message itself creating double data
2026-01-23 11:43:59 +01:00
Kenneth Skovhede 734c761395 Fixed a warning 2025-12-16 21:22:50 +01:00
Kenneth Skovhede e5610b89a3 Fixed a visual startup issue on Linux 2025-12-08 13:37:54 +01:00
Kenneth Skovhede 8d7256f434 Added configureawait 2025-12-08 11:33:28 +01:00
Kenneth Skovhede 76dcf1c9ff Overwrite existing settings when saving 2025-12-07 22:57:25 +01:00
Kenneth Skovhede cf42426d1b Store password with TrayIcon
When using the TrayIcon with no hosted server (i.e., connecting to a running server), it is now possible to save the password and url in the secret provider.

There is a checkbox that allows saving the settings, and if checked, will save the settings to the secret provider (using the OS default if none is specifically provided).

This fixes #6379
2025-12-07 22:26:37 +01:00
Kenneth Skovhede 63789f9132 Add password dialog
Added a password dialog to get the server password if not provided on the commandline.

This also allows overriding the server url.

This is related to #6379
2025-12-05 13:22:13 +01:00
Kenneth Skovhede 178440f869 Fixed a number of warnings 2025-11-14 16:00:06 +01:00
Kenneth Skovhede 1ea74a3c63 Updated to .NET10 2025-11-14 15:05:39 +01:00
Kenneth SkovhedeandGitHub 61b7e806fc Merge branch 'master' into 0nbrsf-codex/find-outdated-packages 2025-08-07 23:17:33 +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 d94ca804ea Fixed CodeQL compile issue + a warning 2025-08-07 11:24:10 +02:00
Kenneth SkovhedeandGitHub ba7bee397c Merge branch 'master' into 0nbrsf-codex/find-outdated-packages 2025-08-07 10:48:59 +02:00
Kenneth SkovhedeandGitHub 07416dfdad Merge pull request #6416 from duplicati/feature/mac-template-icons
Use macOS template icons
2025-07-11 13:47:13 +02:00
Kenneth Skovhede e2ecd594c1 Use macOS template icons
This PR changes the macOS TrayIcon to use template icons that change automatically based on the darkness of the desktop background.

Also updates AvaloniaUI to latest version.

This fixes #6021
2025-07-11 10:04:54 +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 Skovhede 279351a8b6 Updated HttpServerConnection to support nullable.
Fixed an issue that caused crashing on start if the TrayIcon was not hosting the server.
2025-07-08 13:03:33 +02:00
Kenneth Skovhede 6502017c57 Merge remote-tracking branch 'origin/master' into feature/vanara-vss-backup 2025-07-03 17:09:30 +02:00
Kenneth Skovhede 19ac279939 Apply Secret Provider to TrayIcon
If the secret provider is used to supply arguments only used by the TrayIcon it does not work.

The secret provider is applied in the Server part, so any settings passed through are correctly resolved, but for the few options that apply directly to the TrayIcon this was not resolved.

With this PR, the secret provider is applied to TrayIcon options as well.

This applies to:
- `--hosturl`
- `--browser-command`
- `--host-cert-hash`
- `--webservice-password`
2025-07-02 20:42:35 +02:00
Kenneth SkovhedeandGitHub 29f5eb79e5 Merge branch 'master' into feature/vanara-vss-backup 2025-07-01 16:35:57 +02:00
Kenneth Skovhede 98deb8c576 Update support for VSS
This updates VSS to default use Vanara in favor of AlphaVSS which is no longer maintained.

The build for Vanara requires targeting `net8.0-windows7.0`, which will cause significant build overhead and complexity for cross platform builds.
To counter this, the setup is to have a single project, `Duplicati.Library.WindowsModules`, that is targeting `net8.0-windows7.0`.
The output from this project is then hoisted into the TrayIcon project for Windows builds so the files are available when debugging on Windows.
A top-level dummy executable project is added to ensure the project always builds.
The built modules are then loaded with reflection when requested.

With the use of Vanara there is now also support for using BackupRead to read files without making a VSS snapshot.
With BackupRead, it is possible to read locked files, but it still requires the SeBackupPrivilege as VSS does as well.

Unfortunately, the `vssapi.dll` file is not shipped for Arm64 on Windows, so even with Vanara this will not work, and only WMIC is supported on Arm64.
A workaround is to run Duplicati with x64 emulation if more advanced VSS features are needed (HyperV and MSSQL support).

This PR also updates options and filters out unsupported options for each operating system, so options that are not supported by the current OS are not reported and will give warnings if they are used, as opposed to just being ignored.

The release builder project has been updated to exclude the unused project, and purge unwanted outputs.
2025-07-01 16:32:19 +02:00
Kenneth SkovhedeandGitHub ffde75a7ee Merge branch 'master' into feature/pkill-termination-issues 2025-07-01 15:18:58 +02:00
Marcelo C. b7dc8e81fe Fixes typo and improves argument handling
Ensures the unmodified command-line arguments are passed to the help detect function.

Related to https://github.com/duplicati/duplicati/pull/5889#issuecomment-3020522797
2025-07-01 09:41:31 -03: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
Kenneth Skovhede 819af9e66f Update .NET dependencies 2025-06-24 07:51:26 +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 04153d2c12 Removed Microsoft.DotNet.Analyzers.Compatibility from csproj's as it's deprecated. 2025-05-16 09:53:26 +02:00
Kenneth Skovhede c9f985ecdd Final removal of FIXMEGlobal 2025-05-05 16:13:46 +02:00
Kenneth Skovhede 71e926beea One more FIXMEGlobal property removed 2025-05-04 12:13:15 +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 82be38cc99 Cache image handles
This attempts to reduce the number of allocated handles by caching the images used in Duplicati, so they cannot occupy more than a single handle each.
2025-03-26 16:17:48 +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 ee454e0f38 Fixed trayicon shutdown sequence, and made status updates async 2025-03-25 10:56:01 +01:00
Kenneth Skovhede b10f888d86 Updated HttpServerConnection to use async and channels instead of a locked queue with threads 2025-03-25 10:54:10 +01:00
Kenneth Skovhede 6881257c5a Prevent crashes in TrayIcon after stopping it 2025-03-25 10:52:54 +01:00
Kenneth Skovhede fca218dc60 Allow trayicon without server
This adds support for starting the trayicon even if there is no server.

The trayicon will start up in a disconnected state and stay like that until it manages to connect.

This fixes Support TrayIcon running with no connection	#5993
2025-03-25 10:40:45 +01:00
Kenneth Skovhede 5509693137 Added warning state back 2025-03-16 17:26:12 +01:00
Marcelo C. b035c69e4d Integrating the IPv6 & IPv4 detection
It should be noted that I was unable to completely remove IPv4 on Windows 11 to a state where it would not provide the 127.0.0.1 loopback, even when disabling Ipv4 in various ways, including with registry flags.

On ubuntu/linux, after completely disabling ipv4 the ipv6 loopback was returned.
2025-03-11 16:24:15 -03:00
Kenneth Skovhede ddd34ca9c6 Second instance of TrayIcon opens logged in view.
This fixes #6003
2025-03-05 14:53:51 +01:00
Kenneth SkovhedeandGitHub 88f91b5b9e Removed extra sln file 2025-02-18 22:33:47 +01:00
Alex-Heard 64dc7d094f Prevents double clicks from opening two windows by ignoring click events that happen within 1 second of last click 2025-02-17 22:11:41 -05:00
Kenneth Skovhede 68d11a2a8b Improved support for disabled signin tokens and trayicon with a hosted server 2025-02-10 10:22:16 +01:00
Kenneth Skovhede 42044543ff Added support for disabled signin tokens and trayicon 2025-02-09 11:35:27 +01:00
Kenneth Skovhede d9258bfad2 Removed desktop notifications, it did not work 2025-02-09 09:48:04 +01:00
Kenneth Skovhede 4be739ff2f Updated logic for reconnect.
This fixes a case where using a wrong password could cause an infinite loop.
2025-02-08 17:31:49 +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