Commit Graph
321 Commits
Author SHA1 Message Date
Marcelo C. a203de90e1 Added support for Topic ID on Telegram
This adds support for TopicID as specified in parameter "send-telegram-topid-id" which allows the messages to be organized in topics on a group.

Finding out your topic ID in a group can be rather tricky the easiest way is to use curl to create it.

```bash
export CHAT_ID="-99999999"
export TOPIC_NAME="Your Topic"
export BOT_TOKEN="7777777777:AAAAAAAAA-4WwwwwwwwwwwwwwwwwwwwwwwQ"

curl -X POST \
    -H "Content-Type: application/json" \
    -d "{\"chat_id\":\"$CHAT_ID\",\"name\":\"$TOPIC_NAME\"}" \
    https://api.telegram.org/bot$BOT_TOKEN/createForumTopic
```
Which will response with a json where message_thread_id is the Topic ID
```bash
{"ok":true,"result":{"message_thread_id":33,"name":.....
```
2025-02-03 11:05:27 -03: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 SkovhedeandGitHub 610f3b47d1 Update reporting module (#5910)
* Updated reporting values.

The reporter module can now emit the following extra values:
- operating-system
- installation-type
- destination-type
- next-scheduled-run

When running from the built-in scheduler, it will automatically set `--next-scheduled-run` so it is applied to the reporting data.

* Implemented an improved machine name reader.
This fixes #5907

* Added a guard against sending too much of the destination url as the destination.

* Fixed reading Windows Machine name

* Removed extra Windows logic as it has no effect
2025-01-28 08:56:42 +01:00
Kenneth SkovhedeandGitHub 997891525a Updated license-updater to update csproj files (#5898)
* Updated license-updater to update csproj files

* License updates
2025-01-22 21:04:19 +01:00
Kenneth SkovhedeandGitHub 6bbd64a655 Fixed nullability warnings in Utility.cs (#5861)
* Fixed nullability warnings in `Utility.cs`

* Fixed a number of nullability issues and warnings

* More nullable fixes

* Fixed the overwrite issue

* Fixed additional nullability issues

* Removed additional nullability issues

* More nullability fixes and added some xmldoc

* Added more xmldocs and removed an unused argument

* Removed more warnings
2025-01-14 14:03:48 +01:00
Kenneth SkovhedeandGitHub 9464caf622 Feature/update license 2025 (#5851)
* Fixed some minor whitespace issues

* Updated all copyright to 2025
2025-01-07 09:40:39 +01:00
Kenneth SkovhedeandGitHub ff1b2b7990 Simplified task control (#5753)
* Simplified task control by having all logic in a single class and using async control mechanism
* Fixed the tests
* Made the marking of a backup partial explicitly communicated if the enumeration process is stopped.
* Added support for pausing active transfers
* Introduced transfer token to abort operations.
* Updated the way LiveControl is emitting events.
* Retains the paused state of the server across reboots, this fixes #5760.
* Reworked the way throttle speeds are propagated through LiveControls.
* Added option to pause transfers in the UI.
* Removed throttle settings from the LiveControls class so it is exclusively handled by the ApplicationSettings.
* Removed `thread-priority` as it does not work at all when tasks are used.
* Fixed the stop dialog and API to only support stop and abort.
* Removed unused variables
2024-12-18 08:27:59 +01:00
Marcelo C. a3967527e8 Renaming the options to scope them down to the send-http module 2024-12-05 10:26:37 -03:00
Marcelo C. aa22766939 Adding support for self-signed or specific by hash certificates
This will add support for the parameters  accept-any-ssl-certificate and accept-specified-ssl-hash to the Http sender used in reporting.
2024-12-04 13:25:55 -03:00
Kenneth Skovhede ea2ba06ff6 Suppress HyperV warning option
This adds a new option to suppress the normal warning that is issues on client-version of Windows.

This fixes #5692
2024-11-25 21:25:02 +01:00
Kenneth SkovhedeandGitHub e9163e611a Merge pull request #5659 from marceloduplicati/feature/send-script-messages-tolog
Add feature to send messages to Log/Report from script
2024-11-09 07:47:12 +01:00
Marcelo Ceccon 671c88eeff Add feature to send messages to Log/Report from script
This works by parsing the stdout stream, line by line, looking for lines that start with the prefixes LOG:WARN, LOG:ERROR, LOG:INFO and forwarding them to the Log/Report.

In a script that could be used with a simple echo "LOG:WARN Some warning" or even if its an executable application, if it outputs to sdtout lines with the prefix, it will of course also be captured.
2024-11-08 10:49:58 +01:00
Marcelo Ceccon 28414dd744 Fix to telegram notification
Fixes the Telegram notification to use the correct API URL and to send the message in chunks if it is too long.

Will add this to the documentation.

First create your telegram bot by messaging the @BotFather

For more information https://core.telegram.org/bots

Once you have created your bot you will have a bot token.

Now on the bot channel, send one message, “Hello”. This is important because the bot cannot initiate a conversation, it can only respond, so therefore that is the only way to obtain the chatId which needs to be configured on Duplicati.

Now on a browser or curl, access:

https://api.telegram.org/botYOURBOTTOKEN/getUpdates

Look for the property

"chat":{"id”:111122233,

One way to get that with curl is:

BOT_TOKEN="YOURBOTTOKEN" curl -s "https://api.telegram.org/bot$BOT_TOKEN/getUpdates" | grep -o '"id":[0-9]*' | head -1 | cut -d':' -f2
2024-11-07 14:57:23 +01:00
Kenneth Skovhede bc7137d140 Disabled the Telegram notification destination as it is not currently working 2024-11-05 22:26:17 +01:00
Kenneth Skovhede f251d34b57 Implemented support for including the machine hostname in reports for simpler identification. 2024-10-16 16:22:47 +02:00
Kenneth Skovhede d46188427f Merge remote-tracking branch 'origin/master' into feature/remote-control-support 2024-10-02 14:53:00 +02:00
Kenneth Skovhede f49359eaf3 Removed use of Environment.OSVersion which is now deprecated.
Fallback to getting Windows version with `cmd /v ver`, which should be supported way back to DOS v6.
2024-09-18 16:02:01 +02:00
Kenneth Skovhede 8c0e4329f7 Fixed additional ReadOnly issues 2024-09-18 11:39:26 +02:00
Suguru Hirahara 6a703689a2 Replace 'channel id' with 'channel ID'
Signed-off-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2024-08-30 13:14:20 -04:00
Kenneth Skovhede 1e8bffbb67 Fixed an issue where the option value would be parsed case-sensitive.
This fixes #5500
2024-08-29 14:35:03 +02:00
87c6767f66 Update Duplicati/Library/Modules/Builtin/Strings.cs
Co-authored-by: Suguru Hirahara <luixxiul@users.noreply.github.com>
2024-08-15 15:05:09 +02:00
Kenneth Skovhede 1dc03ea0cf Add Telegram reporting module. 2024-08-15 13:12:34 +02:00
Kenneth SkovhedeandGitHub d60bbeb215 Merge pull request #5428 from luixxiul/Strings.cs
Remove conjugation from Strings.cs files
2024-08-14 21:27:25 +02:00
Suguru Hirahara b05c8f30ad Update FailedToLookupMXServer 2024-08-14 05:29:06 -04:00
Suguru Hirahara 0a9425b944 Remove remaining conjugation 2024-08-13 10:16:20 -04:00
Suguru Hirahara a6b8f61646 Remove conjugation more 2024-08-13 08:09:04 -04:00
Suguru Hirahara 42e898d6c7 Remove conjugation - Builtin/Strings.cs 2024-08-13 08:08:54 -04:00
Suguru Hirahara 14a2114c71 Remove conjugation 2024-08-13 08:07:10 -04:00
Suguru Hirahara ac499e666d Add 'Use this option to set' to SendhttpurlsformLong 2024-08-06 11:58:18 -04:00
Suguru Hirahara 630468f785 Replace "property" with "option" 2024-08-06 11:56:17 -04:00
Suguru Hirahara 0d348a4615 Add 'Use this option to ...' to strings 2024-08-05 09:12:12 -04:00
Suguru Hirahara c122245a50 Update a string on Builtin/Strings.cs 2024-07-31 05:15:12 -04:00
Suguru Hirahara 534c8e0d5d Fix strings on Builtin/Strings.cs 2024-07-31 01:53:21 -04:00
Suguru Hirahara f48fac6a02 Change 'i.e.' to 'e.g.' where an example is indicated 2024-07-30 01:01:20 -04:00
Suguru Hirahara dc67fb300a Change 'url' to 'URL' 2024-07-30 00:55:48 -04:00
Suguru Hirahara fba20d6b60 Fix SendxmpptoLong on Builtin/Strings.cs 2024-07-30 00:29:09 -04:00
Suguru Hirahara a35f21a76d Add periods between double quotes 2024-07-29 23:51:10 -04:00
Suguru Hirahara 1c181c5fcc Add periods to strings whose suffix is 'Long' on Builtin/Strings.cs 2024-07-29 23:45:12 -04:00
Suguru Hirahara 8e85c10754 Set arguments for strings 2024-07-29 11:30:43 -04:00
Kenneth Skovhede 2a79e3e4c3 Fixed options to be string type to allow the UI to present multi-value input.
This fixes #5342
2024-07-29 14:05:40 +02:00
Suguru Hirahara 43337dca90 Move strings 'Description' and 'DisplayName' up to the top inside the block 2024-07-29 02:23:07 -04:00
Kenneth SkovhedeandGitHub ffc8159a52 Merge pull request #5334 from luixxiul/eg
Fix minor details related to "e.g." and "API"
2024-07-29 07:47:59 +02:00
Kenneth SkovhedeandGitHub 02eda4a107 Merge pull request #5330 from luixxiul/Builtin/Strings.cs
Sort strings on Builtin/Strings.cs
2024-07-29 07:45:27 +02:00
Suguru Hirahara eeb092bf3d Remove class CheckMonoSSL 2024-07-28 23:36:40 -04:00
Suguru Hirahara 556f1ee958 Change eg. to e.g. 2024-07-27 22:51:10 -04:00
Suguru Hirahara 2d22b8cdd6 Sort strings on Builtin/Strings.cs - part 2 2024-07-27 09:57:06 -04:00
Suguru Hirahara 9bc2158f9b Sort strings on Builtin/Strings.cs - part 1 2024-07-27 09:56:58 -04:00
Kenneth SkovhedeandGitHub 1299ba469a Merge pull request #5302 from luixxiul/whitespace
Remove redundant space characters from *.cs and *.html
2024-07-26 12:46:07 +02:00
Suguru Hirahara ae57dee0f0 Remove redundant space characters from *.cs and *.html 2024-07-26 00:10:31 -04:00
Suguru Hirahara 1506c67bfc Order OptionLoglevelShort after OptionLoglevelLong 2024-07-24 22:34:02 -04:00