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.
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.
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.
This PR removes the default value of `file` as a throttle exempt backend, so all backends are subject to throttle by default.
This change makes the option easier to work with as the empty string could not be used to undo the default value, and fixing this would make the options be applied inconsistently.
Also fixed two errors in the help text for the option.
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.
Now the file listing is always fetched from remote for temporary databases, to avoid cases where the local database exists.
This can happen if you refresh the page while on the restore selection page.
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.
This adds support for the `X-Forwaded-Prefix` that rewires the paths using a custom base, with a default of `/ngclient`.
This allows using ngclient behind a proxy.
This fixes#6278