From 0f3df0c75dfd7cd0ac65a1ffe49d6dd9e18ef72a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 01/80] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- 3 files changed, 16 insertions(+), 22 deletions(-) diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 779e246..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -RouterOS Scripts :: __TITLE__ - + +RouterOS Scripts :: __TITLE__ diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 507445b..eb00492 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Logo Color Changer + + +RouterOS Scripts :: Logo Color Changer + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +34,4 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

- - + diff --git a/contrib/notification.html b/contrib/notification.html index b7d6764..472ce48 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Notification Generator + + +RouterOS Scripts :: Notification Generator + - - + -

RouterOS-Scripts Notification Generator

+

Notification Generator

@@ -31,5 +29,4 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

- - + From de97ed6f19bf751873032e011ec24263acd8a4e6 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 02/80] contrib/{logo-color,notification}: add navigation structure --- contrib/logo-color.html | 6 ++++++ contrib/notification.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index eb00492..8ee1ba9 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -8,6 +8,8 @@

Logo Color Changer

+

⬅️ Go back to main README

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

@@ -34,4 +36,8 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

diff --git a/contrib/notification.html b/contrib/notification.html index 472ce48..3bc86fc 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -8,6 +8,8 @@

Notification Generator

+

⬅️ Go back to main README

+
@@ -29,4 +31,8 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

From 29a82d1a42d64969d5d8cad19ec3778e2a8390cb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:47 +0100 Subject: [PATCH 03/80] README: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 529bb4c..b77538d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,10 @@ download the certificates. > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the > trust for these builtin trust anchors: -> `/certificate/settings/set builtin-trust-anchors=trusted;` +> `/certificate/settings/set builtin-trust-anchors=trusted;` +> With RouterOS 7.21 the functionality was changed. Set this at minimum, +> but make sure not to drop other targets: +> `/certificate/settings/set builtin-trust-store=fetch;` If you intend to download the scripts from a different location (for example from github.com) install the corresponding From 2e1d59721f06316ba6b139375a6467c7870063cf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 04/80] contrib/notification: update date format --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index 3bc86fc..c86450c 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,7 +16,7 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 and may be obsolete.

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

✂️ The message was too long and has been truncated, cut off 13%!

@@ -25,7 +25,7 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

Then right-click, click "Take Screenshot" and finally select the From f7e9f529d0c1519ffaf8ef4389007ec796c8f0aa Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:38:31 +0100 Subject: [PATCH 05/80] INITIAL-COMMANDS: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- INITIAL-COMMANDS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/INITIAL-COMMANDS.md b/INITIAL-COMMANDS.md index 40f609b..6e70b66 100644 --- a/INITIAL-COMMANDS.md +++ b/INITIAL-COMMANDS.md @@ -22,8 +22,11 @@ Run the complete base installation: :local CertFileName "ISRG-Root-X2.pem"; :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470"; - :if (!(([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ - [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ + :local CertSettings [ /certificate/settings/get ]; + :if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ "fetch" || \ + ($CertSettings->"builtin-trust-store") = "all") && \ + [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ :put "Importing certificate..."; /tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value; :delay 1s; From 42ad0d310f857ad7b20d791e08c297a3afe86032 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 06/80] contrib/notification: format the values italic --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index c86450c..a4d0486 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,8 +16,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

-

✂️ The message was too long and has been truncated, cut off 13%!

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

+

✂️ The message was too long and has been truncated, cut off 13%!

From daf1cfb3810a8ec96e7271d23b14d3f545500105 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:47:55 +0100 Subject: [PATCH 07/80] global-functions: $CertificateAvailable: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- global-functions.rsc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index eb837aa..9f92b07 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -106,11 +106,15 @@ # check and download required certificate :set CertificateAvailable do={ :local CommonName [ :tostr $1 ]; + :local UseFor [ :tostr $2 ]; :global CertificateDownload; + :global EitherOr; :global LogPrint; :global ParseKeyValueStore; + :set UseFor [ $EitherOr $UseFor "undefined" ]; + :if ([ /system/resource/get free-hdd-space ] < 8388608 && \ [ /certificate/settings/get crl-download ] = true && \ [ /certificate/settings/get crl-store ] = "system") do={ @@ -123,7 +127,10 @@ :return false; } - :if (([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ + :local CertSettings [ /certificate/settings/get ]; + :if ((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ $UseFor || \ + ($CertSettings->"builtin-trust-store") = "all") && \ [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CommonName . "\" ] ]") ]] > 0) do={ :return true; } From 5c9825760fb09b9b22dd4c25d7b4b5c785e2e037 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:25:01 +0100 Subject: [PATCH 08/80] doc/mod/notification-telegram: use relative reference in link This may break, depending on site. --- doc/mod/notification-telegram.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 804104f..05180b2 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -107,7 +107,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) Have a look at my -[RouterOS-Scripts Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +[RouterOS-Scripts Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. See also From 0f1f9a467f3f978a2837b556bd94ee56e1b2361d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:59:28 +0100 Subject: [PATCH 09/80] global-functions: $DownloadPackage: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 9f92b07..412777c 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -404,7 +404,7 @@ :return true; } - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint error $0 ("Downloading required certificate failed."); :return false; } From b20f025fc5ed7681252e770c2effed85d2a237a5 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:27:59 +0100 Subject: [PATCH 10/80] contrib/logo-color: use relative reference in link ... without extra path elements. This may break, depending on site. --- contrib/logo-color.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 8ee1ba9..9962e99 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -33,7 +33,7 @@ logo and download it.

for other browsers may differ.)

See how to -Set +Set a profile photo for your Telegram bot.


From cf375cbdd1f2ad8b4adb0c411d5bd9a2f3ce84ae Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:11 +0100 Subject: [PATCH 11/80] global-functions: $GetMacVendor: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 412777c..d4c37a2 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -640,7 +640,7 @@ } :do { - :if ([ $CertificateAvailable "GTS Root R4" ] = false) do={ + :if ([ $CertificateAvailable "GTS Root R4" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 4de0b2e7be8c831fe4adfb7eca6af2fbf1de5ceb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 17:07:01 +0100 Subject: [PATCH 12/80] contrib/logo-color: place screenshots below each other... ... not side by side. --- contrib/logo-color.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 9962e99..f824e2d 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -24,9 +24,9 @@ something that differentiates? Color it!

Then right-click, click "Take Screenshot" and finally select the logo and download it.

-

Screenshot Browser 01 -Screenshot Browser 02 -Screenshot Browser 03

+

Screenshot Browser 01

+

Screenshot Browser 02

+

Screenshot Browser 03

(This example is with Firefox. The workflow From 87f28c234fad2d67adf05f5ae1ba15740ec498e7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:57 +0100 Subject: [PATCH 13/80] global-functions: $ScriptInstallUpdate: define certificate use --- global-functions.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index d4c37a2..48aaf7f 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1248,7 +1248,7 @@ :global SymbolForNotification; :global ValidateSyntax; - :if ([ $CertificateAvailable "ISRG Root X2" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } @@ -1299,7 +1299,7 @@ } :if ([ :len ($ScriptInfo->"certificate") ] > 0) do={ - :if ([ $CertificateAvailable ($ScriptInfo->"certificate") ] = false) do={ + :if ([ $CertificateAvailable ($ScriptInfo->"certificate") "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } } From a0b4d422b5f9e2723d320c22a7f623b38ffd20d8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:26:05 +0100 Subject: [PATCH 14/80] contrib: introduce Makefile... ... and update references in links. --- contrib/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/Makefile diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..aae3178 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,10 @@ +# Makefile + +HTML := $(wildcard *.html) + +.PHONY: all docs + +all: docs + +docs: $(HTML) + sed -i '/href=/s|\.md|\.html|' $(HTML) From b6be7ded9ad82c8269ee110ab8d459360bb60979 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:05:10 +0100 Subject: [PATCH 15/80] check-certificates: define certificate use --- check-certificates.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-certificates.rsc b/check-certificates.rsc index f2d5c1f..3300bee 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -189,7 +189,7 @@ fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ]; :local CertNewVal [ /certificate/get $CertNew ]; - :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={ + :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("The certificate chain is not available!"); } From e62a19257a04f5dc81b4c75f5e33f1fb4b623c63 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:06:03 +0100 Subject: [PATCH 16/80] fw-addr-lists: define certificate use --- fw-addr-lists.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index c85cc8b..e5a71aa 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -74,7 +74,7 @@ :if ([ :len ($List->"cert") ] > 0) do={ :set CheckCertificate true; - :if ([ $CertificateAvailable ($List->"cert") ] = false) do={ + :if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \ " / " . $List->"url" . ") failed, trying anyway."); } From 8a908be4e0d200eecc3ecca09d0e176e310bfdb3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 11:07:38 +0100 Subject: [PATCH 17/80] contrib/checksums.sh: output to stdout... ... and let the Makefile redirect. --- Makefile | 2 +- contrib/checksums.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 680d768..b799535 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json < $< > $@ checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh + contrib/checksums.sh > $@ clean: rm -f $(HTML) checksums.json diff --git a/contrib/checksums.sh b/contrib/checksums.sh index b472b49..ab4e973 100755 --- a/contrib/checksums.sh +++ b/contrib/checksums.sh @@ -6,4 +6,4 @@ set -e md5sum $(find -name '*.rsc' | sort) | \ sed -e "s| \./||" -e 's|.rsc$||' | \ - jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' > 'checksums.json' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' From 76f9d34a70ca6b8491183a5c7430c6d420066564 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:22 +0100 Subject: [PATCH 18/80] mod/notification-ntfy: define certificate use --- mod/notification-ntfy.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc index 7114020..dd10812 100644 --- a/mod/notification-ntfy.rsc +++ b/mod/notification-ntfy.rsc @@ -109,7 +109,7 @@ :onerror Err { :if ($Server = "ntfy.sh") do={ - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 74f343f6d5cce80234cafb6e69364364dff29507 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 2 Nov 2025 09:19:16 +0100 Subject: [PATCH 19/80] global-functions: $ScriptInstallUpdate: give hint on ignore Fixes: https://github.com/eworm-de/routeros-scripts/issues/112 --- global-functions.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 3089d2e..b5fc0eb 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1313,6 +1313,11 @@ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; } + :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ + [ :len $CheckSum ] = 0) do={ + $LogPrintOnce warning $0 \ + ("Added the script manually? Skip updates with 'ignore=true' in comment."); + } :error false; } From 066ef8cc4aff896c1ee1da757f6cde944a0d37e2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:09:43 +0100 Subject: [PATCH 20/80] mod/notification-telegram: define certificate use --- mod/notification-telegram.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index ff9b4da..b1996a3 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -30,7 +30,7 @@ :return false; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -72,7 +72,7 @@ :global CertificateAvailable; :global LogPrint; - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -197,7 +197,7 @@ "&reply_to_message_id=" . ($Notification->"replyto") . "&message_thread_id=" . $ThreadId . \ "&disable_web_page_preview=true&parse_mode=MarkdownV2"); :onerror Err { - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From a31f5559aa9a96cb39c348025f2dd631aa7b4736 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 00:00:03 +0100 Subject: [PATCH 21/80] global-functions: $ScriptInstallUpdate: either or... ... but not both. --- global-functions.rsc | 1 + 1 file changed, 1 insertion(+) diff --git a/global-functions.rsc b/global-functions.rsc index b5fc0eb..2379f9b 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1312,6 +1312,7 @@ :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; + :error false; } :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ [ :len $CheckSum ] = 0) do={ From ac9dfe491397259da61a5303f60a8fc389f75f44 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:07:22 +0100 Subject: [PATCH 22/80] netwatch-dns: define certificate use --- netwatch-dns.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 9e2f9bc..eee5f85 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -112,7 +112,7 @@ :foreach DohServer in=$DohServers do={ :if ([ :len ($DohServer->"doh-cert") ] > 0) do={ - :if ([ $CertificateAvailable ($DohServer->"doh-cert") ] = false) do={ + :if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={ $LogPrint warning $ScriptName ("Downloading certificate failed, trying without."); } } From 204977c68519f5615188d62e0816a83c3b01b941 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 3 Nov 2025 09:17:25 +0100 Subject: [PATCH 23/80] global-functions: $ScriptInstallUpdate: extra actions on 'not found' only --- global-functions.rsc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 2379f9b..eb837aa 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1309,6 +1309,10 @@ } } do={ $LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err); + :if ($Err != "Fetch failed with status 404") do={ + :error false; + } + :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; From c50844d46fd6003909d6872d846ec6fd560dda04 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:58 +0100 Subject: [PATCH 24/80] telegram-chat: define certificate use --- telegram-chat.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 7f7b7a7..54872fb 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -61,7 +61,7 @@ :set TelegramRandomDelay 0; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From c25d276d0e62550493ccfc0c2967640d61e30ab0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 6 Nov 2025 17:32:37 +0100 Subject: [PATCH 25/80] Makefile: clean up and add phony targets --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b799535..f841ca2 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,28 @@ # template scripts -> final scripts # markdown files -> html files -CAPSMAN = $(wildcard *.capsman.rsc) -LOCAL = $(wildcard *.local.rsc) -WIFI = $(wildcard *.wifi.rsc) +ALL_RSC := $(wildcard *.rsc */*.rsc) +GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc) -MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) +HTML := $(MARKDOWN:.md=.html) -all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json +.PHONY: all checksums docs rsc clean + +all: checksums docs rsc + +checksums: checksums.json + +checksums.json: contrib/checksums.sh $(ALL_RSC) + contrib/checksums.sh > $@ + +docs: $(HTML) %.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ +rsc: $(GEN_RSC) + %.capsman.rsc: %.template.rsc Makefile sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \ -e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \ @@ -32,8 +42,5 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ < $< > $@ -checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh > $@ - clean: rm -f $(HTML) checksums.json From 2b4ccfe7aa52514e7dc0232f8764f371b4691238 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:03:33 +0100 Subject: [PATCH 26/80] update-tunnelbroker: define certificate use --- update-tunnelbroker.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc index 9057e1e..5372f4c 100644 --- a/update-tunnelbroker.rsc +++ b/update-tunnelbroker.rsc @@ -28,7 +28,7 @@ :error false; } - :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint error $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From 7a8eecf55552a1588478a9161e4c2450fc1629ad Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:03:58 +0100 Subject: [PATCH 27/80] fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de --- fw-addr-lists.d/allow | 2 +- fw-addr-lists.d/block | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index 8b59ed7..f0239cd 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md git.eworm.de diff --git a/fw-addr-lists.d/block b/fw-addr-lists.d/block index 5e9fef2..86a6c62 100644 --- a/fw-addr-lists.d/block +++ b/fw-addr-lists.d/block @@ -1,5 +1,5 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md # example.net 93.184.216.34 From ca7c72338da9b7175a4590ef4172dcef48092752 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:11:38 +0100 Subject: [PATCH 28/80] CERTIFICATES: define certificate use --- CERTIFICATES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CERTIFICATES.md b/CERTIFICATES.md index 69d6c18..0e0a867 100644 --- a/CERTIFICATES.md +++ b/CERTIFICATES.md @@ -61,7 +61,7 @@ Import a certificate by CommonName Running the function `$CertificateAvailable` with that name as parameter makes sure the certificate is available in the device's store: - $CertificateAvailable "ISRG Root X2"; + $CertificateAvailable "ISRG Root X2" "fetch"; If the certificate is actually available already nothing happens, and there is no output. Otherwise the certificate is downloaded and imported. From ba89aa229cf8fba5b9003a7f57f5600a536a51b2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:05:56 +0100 Subject: [PATCH 29/80] fw-addr-lists.d/allow: use rsc.eworm.de in the list --- fw-addr-lists.d/allow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index f0239cd..8c4ca3c 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script # https://rsc.eworm.de/doc/fw-addr-lists.md -git.eworm.de +rsc.eworm.de From c9cf6b7023b6a7f4701b0ad0ae97d03f015fc272 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:08:49 +0100 Subject: [PATCH 30/80] doc/mod/notification-matrix: define certificate use --- doc/mod/notification-matrix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md index da6d6de..ad4cf4f 100644 --- a/doc/mod/notification-matrix.md +++ b/doc/mod/notification-matrix.md @@ -49,7 +49,7 @@ your server in device's certificate store. The example below is for `matrix.org`, which uses a trust chain from *Google Trust Services*. Run this to import the required certificate: - $CertificateAvailable "GTS Root R4"; + $CertificateAvailable "GTS Root R4" "fetch"; Replace the CA certificate name with what ever is needed for your server. You may want to find the From b5f6881f3d1ea642e914e8be8a82d0687c75d909 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:29 +0100 Subject: [PATCH 31/80] README: add a line break before command --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0d26bd..529bb4c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ download the certificates. > 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the -> trust for these builtin trust anchors: +> trust for these builtin trust anchors: > `/certificate/settings/set builtin-trust-anchors=trusted;` If you intend to download the scripts from a @@ -173,7 +173,7 @@ This last step is required when ever you make changes to your configuration. > ℹ️ **Info**: It is recommended to edit the configuration using the command > line interface. If using Winbox on Windows OS, the line endings may be -> missing. To fix this run: +> missing. To fix this run: > `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;` Updating scripts From 6fb70fe2a14e4723ce84e03c3be9006f0c856557 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:19:44 +0100 Subject: [PATCH 32/80] README: move the QR code --- README.md | 2 +- README.d/upstream.png => general/qr-code.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename README.d/upstream.png => general/qr-code.png (100%) diff --git a/README.md b/README.md index b77538d..36408ec 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ immediately remove the link in question. Upstream -------- -[![upstream](README.d/upstream.png)](https://rsc.eworm.de/) +[![upstream](general/qr-code.png)](https://rsc.eworm.de/) URL: [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts) diff --git a/README.d/upstream.png b/general/qr-code.png similarity index 100% rename from README.d/upstream.png rename to general/qr-code.png From 736c0ac08cd74aca32f9e4d0bbcf0ff0cb9fdf6e Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:08:11 +0100 Subject: [PATCH 33/80] contrib/html: add a head with eworm, QR code and caption --- contrib/html.sh | 2 ++ contrib/html.sh.d/head.html | 11 +++++++++++ general/eworm-meadow.avif | Bin 0 -> 3922 bytes general/style.css | 12 ++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 general/eworm-meadow.avif diff --git a/contrib/html.sh b/contrib/html.sh index 5b0b978..6276df1 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -7,6 +7,8 @@ sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ + -e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \ + -e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 0ce3ff7..1d4f93a 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -4,3 +4,14 @@ + + + + + + + + + +
eworm on meadowQR code: rsc.eworm.deRouterOS Scripts
a collection of scripts for MikroTik RouterOS
+


diff --git a/general/eworm-meadow.avif b/general/eworm-meadow.avif new file mode 100644 index 0000000000000000000000000000000000000000..f592d59b86c9d178954a09bfb30dd7b6268a3a0b GIT binary patch literal 3922 zcmYLF1y~c@_ufWLN>a*6w}Nyy=?*0&MaGyg*kHhzgtWvEBqfy;KR`x_bSW(iK?wnNzN)@xT|uyz9`?n1N@Jn&}WP`3gZbo zQ}QDH5&ymb05HP>gHV5ao^|a(V*D`_e2T=teJRL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 pre code { span.link { color: #863600; } +td.head-top { + height: 48px; + vertical-align: bottom; + font-size: 250%; + font-weight: bold; +} +td.head-bottom { + height: 48px; + vertical-align: top; + font-size: 125%; + color: #555; +} @media only screen and (orientation: landscape) { body { margin-left: 10vw; From b751a6d5b63390d1dd8c40ad732e61ff9c1b80ab Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:53:31 +0100 Subject: [PATCH 34/80] general/style: make the blockquote darker --- general/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/style.css b/general/style.css index d35e6c4..016ca63 100644 --- a/general/style.css +++ b/general/style.css @@ -18,7 +18,7 @@ a:hover { blockquote { border-left: 4px solid #ccc; padding: 0 10px; - color: #777; + color: #555; } code { margin: 0 2px; From 0a37b6c00842573e7e3080c7cf7b6f6909658618 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:19:32 +0100 Subject: [PATCH 35/80] contrib/*: unify html code --- contrib/html.sh.d/head.html | 4 ++-- contrib/logo-color.html | 17 +++++++---------- contrib/notification.html | 17 +++++++---------- doc/mod/notification-telegram.md | 2 +- 4 files changed, 17 insertions(+), 23 deletions(-) diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 779e246..0ce3ff7 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -1,6 +1,6 @@ -RouterOS Scripts :: __TITLE__ - + +RouterOS Scripts :: __TITLE__ diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 507445b..eb00492 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Logo Color Changer + + +RouterOS Scripts :: Logo Color Changer + - - + -

RouterOS-Scripts Logo Color Changer

+

Logo Color Changer

You want the logo for your own notifications? But you joined the Telegram Group and want @@ -36,5 +34,4 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

- - + diff --git a/contrib/notification.html b/contrib/notification.html index b7d6764..472ce48 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -1,14 +1,12 @@ - - - - -RouterOS-Scripts Notification Generator + + +RouterOS Scripts :: Notification Generator + - - + -

RouterOS-Scripts Notification Generator

+

Notification Generator

@@ -31,5 +29,4 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

- - + diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 804104f..7d5092d 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -107,7 +107,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) Have a look at my -[RouterOS-Scripts Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +[Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) to create a colored version of this scripts' logo. See also From ee6c66327a9bcd53105524c94bac88b3acbfce94 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 15:35:14 +0100 Subject: [PATCH 36/80] contrib/{logo-color,notification}: add navigation structure --- contrib/logo-color.html | 6 ++++++ contrib/notification.html | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index eb00492..8ee1ba9 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -8,6 +8,8 @@

Logo Color Changer

+

⬅️ Go back to main README

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

@@ -34,4 +36,8 @@ for other browsers may differ.)

Set a profile photo for your Telegram bot.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

diff --git a/contrib/notification.html b/contrib/notification.html index 472ce48..3bc86fc 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -8,6 +8,8 @@

Notification Generator

+

⬅️ Go back to main README

+
@@ -29,4 +31,8 @@

Then right-click, click "Take Screenshot" and finally select the notification and download it.

+
+ +

⬅️ Go back to main README
+⬆️ Go back to top

From 67551e58d8d26702687aa1fd8e153788ef105adf Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:47 +0100 Subject: [PATCH 37/80] README: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 529bb4c..b77538d 100644 --- a/README.md +++ b/README.md @@ -78,7 +78,10 @@ download the certificates. > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the > trust for these builtin trust anchors: -> `/certificate/settings/set builtin-trust-anchors=trusted;` +> `/certificate/settings/set builtin-trust-anchors=trusted;` +> With RouterOS 7.21 the functionality was changed. Set this at minimum, +> but make sure not to drop other targets: +> `/certificate/settings/set builtin-trust-store=fetch;` If you intend to download the scripts from a different location (for example from github.com) install the corresponding From 4b5333d971449303e5e8e161b80a580b87a32507 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:06:42 +0100 Subject: [PATCH 38/80] contrib/notification: update date format --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index 3bc86fc..c86450c 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,7 +16,7 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since oct/18/2022 18:30:48 and may be obsolete.

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

✂️ The message was too long and has been truncated, cut off 13%!

@@ -25,7 +25,7 @@

Subject:

Message:

Show link:

-

Queued since

+

Queued since

Cut-off with percent

Then right-click, click "Take Screenshot" and finally select the From 7f2cdf67cb7097c3d8731a9bbe3e0aca8072e998 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:38:31 +0100 Subject: [PATCH 39/80] INITIAL-COMMANDS: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- INITIAL-COMMANDS.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/INITIAL-COMMANDS.md b/INITIAL-COMMANDS.md index 40f609b..6e70b66 100644 --- a/INITIAL-COMMANDS.md +++ b/INITIAL-COMMANDS.md @@ -22,8 +22,11 @@ Run the complete base installation: :local CertFileName "ISRG-Root-X2.pem"; :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470"; - :if (!(([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ - [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ + :local CertSettings [ /certificate/settings/get ]; + :if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ "fetch" || \ + ($CertSettings->"builtin-trust-store") = "all") && \ + [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CertCommonName . "\" ] ]") ]] > 0)) do={ :put "Importing certificate..."; /tool/fetch ($BaseUrl . "certs/" . $CertFileName) dst-path=$CertFileName as-value; :delay 1s; From a7de16b58402eca77f8b6281a996d70ed076bec4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 29 Oct 2025 16:11:23 +0100 Subject: [PATCH 40/80] contrib/notification: format the values italic --- contrib/notification.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contrib/notification.html b/contrib/notification.html index c86450c..a4d0486 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -16,8 +16,8 @@

[MikroTik] ℹ️ Subject

Message
-

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

-

✂️ The message was too long and has been truncated, cut off 13%!

+

⏰ This message was queued since 2025-10-29 16:06:18 and may be obsolete.

+

✂️ The message was too long and has been truncated, cut off 13%!

From 959f0a257fed3d6f46288f045df36f3bd4a2e480 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:47:55 +0100 Subject: [PATCH 41/80] global-functions: $CertificateAvailable: support new builtin-trust-store... ... which was introduced with RouterOS 7.21beta7. --- global-functions.rsc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index eb837aa..9f92b07 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -106,11 +106,15 @@ # check and download required certificate :set CertificateAvailable do={ :local CommonName [ :tostr $1 ]; + :local UseFor [ :tostr $2 ]; :global CertificateDownload; + :global EitherOr; :global LogPrint; :global ParseKeyValueStore; + :set UseFor [ $EitherOr $UseFor "undefined" ]; + :if ([ /system/resource/get free-hdd-space ] < 8388608 && \ [ /certificate/settings/get crl-download ] = true && \ [ /certificate/settings/get crl-store ] = "system") do={ @@ -123,7 +127,10 @@ :return false; } - :if (([ /certificate/settings/get ]->"builtin-trust-anchors") = "trusted" && \ + :local CertSettings [ /certificate/settings/get ]; + :if ((($CertSettings->"builtin-trust-anchors") = "trusted" || \ + ($CertSettings->"builtin-trust-store") ~ $UseFor || \ + ($CertSettings->"builtin-trust-store") = "all") && \ [[ :parse (":return [ :len [ /certificate/builtin/find where common-name=\"" . $CommonName . "\" ] ]") ]] > 0) do={ :return true; } From 954c8e299f4a85df720a1061144103405c68dce2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:25:01 +0100 Subject: [PATCH 42/80] doc/mod/notification-telegram: use relative reference in link This may break, depending on site. --- doc/mod/notification-telegram.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index 7d5092d..bdf1331 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -106,8 +106,7 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. ![set profile photo](notification-telegram.d/setuserpic.avif) -Have a look at my -[Logo Color Changer](https://git.eworm.de/cgit/routeros-scripts/plain/contrib/logo-color.html) +Have a look at my [Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. See also From e69605ac4de2bff7850d3d85cf6f047f5bfd5255 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:59:28 +0100 Subject: [PATCH 43/80] global-functions: $DownloadPackage: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 9f92b07..412777c 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -404,7 +404,7 @@ :return true; } - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint error $0 ("Downloading required certificate failed."); :return false; } From 06d1bab537343def03bd6d04022b874dfa66cf67 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:27:59 +0100 Subject: [PATCH 44/80] contrib/logo-color: use relative reference in link ... without extra path elements. This may break, depending on site. --- contrib/logo-color.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 8ee1ba9..9962e99 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -33,7 +33,7 @@ logo and download it.

for other browsers may differ.)

See how to -Set +Set a profile photo for your Telegram bot.


From ab29a3fb82f8157af73d094e9edb70e408a1e7a2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:11 +0100 Subject: [PATCH 45/80] global-functions: $GetMacVendor: define certificate use --- global-functions.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/global-functions.rsc b/global-functions.rsc index 412777c..d4c37a2 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -640,7 +640,7 @@ } :do { - :if ([ $CertificateAvailable "GTS Root R4" ] = false) do={ + :if ([ $CertificateAvailable "GTS Root R4" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 2e808141b82ce27155b133d9ccdbe123651a5bcd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 17:07:01 +0100 Subject: [PATCH 46/80] contrib/logo-color: place screenshots below each other... ... not side by side. --- contrib/logo-color.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 9962e99..f824e2d 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -24,9 +24,9 @@ something that differentiates? Color it!

Then right-click, click "Take Screenshot" and finally select the logo and download it.

-

Screenshot Browser 01 -Screenshot Browser 02 -Screenshot Browser 03

+

Screenshot Browser 01

+

Screenshot Browser 02

+

Screenshot Browser 03

(This example is with Firefox. The workflow From ee77f7d72d87bdf61495589acc6f8d5f0eca2043 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:01:57 +0100 Subject: [PATCH 47/80] global-functions: $ScriptInstallUpdate: define certificate use --- global-functions.rsc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/global-functions.rsc b/global-functions.rsc index d4c37a2..48aaf7f 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1248,7 +1248,7 @@ :global SymbolForNotification; :global ValidateSyntax; - :if ([ $CertificateAvailable "ISRG Root X2" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } @@ -1299,7 +1299,7 @@ } :if ([ :len ($ScriptInfo->"certificate") ] > 0) do={ - :if ([ $CertificateAvailable ($ScriptInfo->"certificate") ] = false) do={ + :if ([ $CertificateAvailable ($ScriptInfo->"certificate") "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading certificate failed, trying without."); } } From 4ec1833ef82371c4a22fb48e60e4c8cdf45f0f0a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 16:26:05 +0100 Subject: [PATCH 48/80] contrib: introduce Makefile... ... and update references in links. --- contrib/Makefile | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 contrib/Makefile diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..aae3178 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,10 @@ +# Makefile + +HTML := $(wildcard *.html) + +.PHONY: all docs + +all: docs + +docs: $(HTML) + sed -i '/href=/s|\.md|\.html|' $(HTML) From 45ab635ba19df115430f7d5b9a22bc9d4c35b2cd Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:05:10 +0100 Subject: [PATCH 49/80] check-certificates: define certificate use --- check-certificates.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/check-certificates.rsc b/check-certificates.rsc index f2d5c1f..3300bee 100644 --- a/check-certificates.rsc +++ b/check-certificates.rsc @@ -189,7 +189,7 @@ fingerprint!=[ :tostr ($CertVal->"fingerprint") ] expires-after>$CertRenewTime ]; :local CertNewVal [ /certificate/get $CertNew ]; - :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") ] = false) do={ + :if ([ $CertificateAvailable ([ $ParseKeyValueStore ($CertNewVal->"issuer") ]->"CN") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("The certificate chain is not available!"); } From 85f3e1a5f4b986a25f803668ce15c908e5ed2373 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:06:03 +0100 Subject: [PATCH 50/80] fw-addr-lists: define certificate use --- fw-addr-lists.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index c85cc8b..e5a71aa 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -74,7 +74,7 @@ :if ([ :len ($List->"cert") ] > 0) do={ :set CheckCertificate true; - :if ([ $CertificateAvailable ($List->"cert") ] = false) do={ + :if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \ " / " . $List->"url" . ") failed, trying anyway."); } From 40a581e013d457150b65fffb5e0163d5cd5e226b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Oct 2025 11:07:38 +0100 Subject: [PATCH 51/80] contrib/checksums.sh: output to stdout... ... and let the Makefile redirect. --- Makefile | 2 +- contrib/checksums.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 680d768..b799535 100644 --- a/Makefile +++ b/Makefile @@ -33,7 +33,7 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json < $< > $@ checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh + contrib/checksums.sh > $@ clean: rm -f $(HTML) checksums.json diff --git a/contrib/checksums.sh b/contrib/checksums.sh index b472b49..ab4e973 100755 --- a/contrib/checksums.sh +++ b/contrib/checksums.sh @@ -6,4 +6,4 @@ set -e md5sum $(find -name '*.rsc' | sort) | \ sed -e "s| \./||" -e 's|.rsc$||' | \ - jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' > 'checksums.json' + jq --raw-input --null-input '[ inputs | split (" ") | { (.[1]): (.[0]) }] | add' From 24aadcf02d9d13f9eeb9bc09872eeb307d486cb0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:22 +0100 Subject: [PATCH 52/80] mod/notification-ntfy: define certificate use --- mod/notification-ntfy.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/notification-ntfy.rsc b/mod/notification-ntfy.rsc index 7114020..dd10812 100644 --- a/mod/notification-ntfy.rsc +++ b/mod/notification-ntfy.rsc @@ -109,7 +109,7 @@ :onerror Err { :if ($Server = "ntfy.sh") do={ - :if ([ $CertificateAvailable "ISRG Root X1" ] = false) do={ + :if ([ $CertificateAvailable "ISRG Root X1" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From 1bdca319858fbb3c7045b66f30e1dd05f65e717f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Sun, 2 Nov 2025 09:19:16 +0100 Subject: [PATCH 53/80] global-functions: $ScriptInstallUpdate: give hint on ignore Fixes: https://github.com/eworm-de/routeros-scripts/issues/112 --- global-functions.rsc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 3089d2e..b5fc0eb 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1313,6 +1313,11 @@ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; } + :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ + [ :len $CheckSum ] = 0) do={ + $LogPrintOnce warning $0 \ + ("Added the script manually? Skip updates with 'ignore=true' in comment."); + } :error false; } From 0cbc8dca745f026499c0bd1542e81bb8956883ed Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:09:43 +0100 Subject: [PATCH 54/80] mod/notification-telegram: define certificate use --- mod/notification-telegram.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mod/notification-telegram.rsc b/mod/notification-telegram.rsc index ff9b4da..b1996a3 100644 --- a/mod/notification-telegram.rsc +++ b/mod/notification-telegram.rsc @@ -30,7 +30,7 @@ :return false; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -72,7 +72,7 @@ :global CertificateAvailable; :global LogPrint; - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :return false; } @@ -197,7 +197,7 @@ "&reply_to_message_id=" . ($Notification->"replyto") . "&message_thread_id=" . $ThreadId . \ "&disable_web_page_preview=true&parse_mode=MarkdownV2"); :onerror Err { - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $0 ("Downloading required certificate failed."); :error false; } From e3cf008ec1b41e05ec29c8fb6226689f2584db45 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 00:00:03 +0100 Subject: [PATCH 55/80] global-functions: $ScriptInstallUpdate: either or... ... but not both. --- global-functions.rsc | 1 + 1 file changed, 1 insertion(+) diff --git a/global-functions.rsc b/global-functions.rsc index b5fc0eb..2379f9b 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1312,6 +1312,7 @@ :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; + :error false; } :if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \ [ :len $CheckSum ] = 0) do={ From 6c2bf181fca1c17b528884d2202ba9239486a8b0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:07:22 +0100 Subject: [PATCH 56/80] netwatch-dns: define certificate use --- netwatch-dns.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 9e2f9bc..eee5f85 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -112,7 +112,7 @@ :foreach DohServer in=$DohServers do={ :if ([ :len ($DohServer->"doh-cert") ] > 0) do={ - :if ([ $CertificateAvailable ($DohServer->"doh-cert") ] = false) do={ + :if ([ $CertificateAvailable ($DohServer->"doh-cert") "dns" ] = false) do={ $LogPrint warning $ScriptName ("Downloading certificate failed, trying without."); } } From c0e4f411c2a225677cd88b5e3af32d6d3080772c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 3 Nov 2025 09:17:25 +0100 Subject: [PATCH 57/80] global-functions: $ScriptInstallUpdate: extra actions on 'not found' only --- global-functions.rsc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/global-functions.rsc b/global-functions.rsc index 2379f9b..eb837aa 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1309,6 +1309,10 @@ } } do={ $LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "': " . $Err); + :if ($Err != "Fetch failed with status 404") do={ + :error false; + } + :if ($ScriptVal->"source" = "#!rsc by RouterOS\n") do={ $LogPrint warning $0 ("Removing dummy. Typo on installation?"); /system/script/remove $Script; From 31a2bbbb4c242a947aaa921daca4ef7c4a2bdb13 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:10:58 +0100 Subject: [PATCH 58/80] telegram-chat: define certificate use --- telegram-chat.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegram-chat.rsc b/telegram-chat.rsc index 7f7b7a7..54872fb 100644 --- a/telegram-chat.rsc +++ b/telegram-chat.rsc @@ -61,7 +61,7 @@ :set TelegramRandomDelay 0; } - :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Go Daddy Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint warning $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From edb8ad9a2ee7c1b71bfd3e430c8540fa2e075eb0 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 6 Nov 2025 17:32:37 +0100 Subject: [PATCH 59/80] Makefile: clean up and add phony targets --- Makefile | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index b799535..f841ca2 100644 --- a/Makefile +++ b/Makefile @@ -2,18 +2,28 @@ # template scripts -> final scripts # markdown files -> html files -CAPSMAN = $(wildcard *.capsman.rsc) -LOCAL = $(wildcard *.local.rsc) -WIFI = $(wildcard *.wifi.rsc) +ALL_RSC := $(wildcard *.rsc */*.rsc) +GEN_RSC := $(wildcard *.capsman.rsc *.local.rsc *.wifi.rsc) -MARKDOWN = $(wildcard *.md doc/*.md doc/mod/*.md) -HTML = $(MARKDOWN:.md=.html) +MARKDOWN := $(wildcard *.md doc/*.md doc/mod/*.md) +HTML := $(MARKDOWN:.md=.html) -all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json +.PHONY: all checksums docs rsc clean + +all: checksums docs rsc + +checksums: checksums.json + +checksums.json: contrib/checksums.sh $(ALL_RSC) + contrib/checksums.sh > $@ + +docs: $(HTML) %.html: %.md general/style.css contrib/html.sh contrib/html.sh.d/head.html contrib/html.sh $< > $@ +rsc: $(GEN_RSC) + %.capsman.rsc: %.template.rsc Makefile sed -e '/\/interface\/wifi\//d' -e '/\/interface\/wireless\//d' -e 's|%TEMPL%|.capsman|' \ -e '/^# NOT \/caps-man\/ #$$/,/^# NOT \/caps-man\/ #$$/d' \ @@ -32,8 +42,5 @@ all: $(CAPSMAN) $(LOCAL) $(WIFI) $(HTML) checksums.json -e '/^# !!/,/^# !!/c # !! Do not edit this file, it is generated from template!' \ < $< > $@ -checksums.json: contrib/checksums.sh *.rsc */*.rsc - contrib/checksums.sh > $@ - clean: rm -f $(HTML) checksums.json From c273770f7d2600276fe7d15c2a9cd5942dfb7737 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:03:33 +0100 Subject: [PATCH 60/80] update-tunnelbroker: define certificate use --- update-tunnelbroker.rsc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/update-tunnelbroker.rsc b/update-tunnelbroker.rsc index 9057e1e..5372f4c 100644 --- a/update-tunnelbroker.rsc +++ b/update-tunnelbroker.rsc @@ -28,7 +28,7 @@ :error false; } - :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" ] = false) do={ + :if ([ $CertificateAvailable "Starfield Root Certificate Authority - G2" "fetch" ] = false) do={ $LogPrint error $ScriptName ("Downloading required certificate failed."); :set ExitOK true; :error false; From a8528bc02d9983145abc210289b6c86e8b1aae26 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:03:58 +0100 Subject: [PATCH 61/80] fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de --- fw-addr-lists.d/allow | 2 +- fw-addr-lists.d/block | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index 8b59ed7..f0239cd 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md git.eworm.de diff --git a/fw-addr-lists.d/block b/fw-addr-lists.d/block index 5e9fef2..86a6c62 100644 --- a/fw-addr-lists.d/block +++ b/fw-addr-lists.d/block @@ -1,5 +1,5 @@ # an ip address list for use with fw-addr-lists script -# https://git.eworm.de/cgit/routeros-scripts/about/doc/fw-addr-lists.md +# https://rsc.eworm.de/doc/fw-addr-lists.md # example.net 93.184.216.34 From 5f1b17a6443d535be8e9b0ee7e1881b3c26a0019 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:11:38 +0100 Subject: [PATCH 62/80] CERTIFICATES: define certificate use --- CERTIFICATES.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CERTIFICATES.md b/CERTIFICATES.md index 69d6c18..0e0a867 100644 --- a/CERTIFICATES.md +++ b/CERTIFICATES.md @@ -61,7 +61,7 @@ Import a certificate by CommonName Running the function `$CertificateAvailable` with that name as parameter makes sure the certificate is available in the device's store: - $CertificateAvailable "ISRG Root X2"; + $CertificateAvailable "ISRG Root X2" "fetch"; If the certificate is actually available already nothing happens, and there is no output. Otherwise the certificate is downloaded and imported. From 254a89886d9036f69c00eab8f827b275e29d9c3f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Fri, 7 Nov 2025 23:05:56 +0100 Subject: [PATCH 63/80] fw-addr-lists.d/allow: use rsc.eworm.de in the list --- fw-addr-lists.d/allow | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fw-addr-lists.d/allow b/fw-addr-lists.d/allow index f0239cd..8c4ca3c 100644 --- a/fw-addr-lists.d/allow +++ b/fw-addr-lists.d/allow @@ -1,3 +1,3 @@ # an ip address list for use with fw-addr-lists script # https://rsc.eworm.de/doc/fw-addr-lists.md -git.eworm.de +rsc.eworm.de From 41c349a04c8c908f30de1d1006f253041bf1ff4f Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 12:08:49 +0100 Subject: [PATCH 64/80] doc/mod/notification-matrix: define certificate use --- doc/mod/notification-matrix.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/notification-matrix.md b/doc/mod/notification-matrix.md index da6d6de..ad4cf4f 100644 --- a/doc/mod/notification-matrix.md +++ b/doc/mod/notification-matrix.md @@ -49,7 +49,7 @@ your server in device's certificate store. The example below is for `matrix.org`, which uses a trust chain from *Google Trust Services*. Run this to import the required certificate: - $CertificateAvailable "GTS Root R4"; + $CertificateAvailable "GTS Root R4" "fetch"; Replace the CA certificate name with what ever is needed for your server. You may want to find the From 3fa0690b9dd740640b6b003d2d805f60bb3cbcab Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 10 Nov 2025 11:20:29 +0100 Subject: [PATCH 65/80] README: add a line break before command --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index b0d26bd..529bb4c 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ download the certificates. > 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You > can skip the steps regarding certificate download and import and jump > to [installation of scripts](#installation-of-scripts) if you set the -> trust for these builtin trust anchors: +> trust for these builtin trust anchors: > `/certificate/settings/set builtin-trust-anchors=trusted;` If you intend to download the scripts from a @@ -173,7 +173,7 @@ This last step is required when ever you make changes to your configuration. > ℹ️ **Info**: It is recommended to edit the configuration using the command > line interface. If using Winbox on Windows OS, the line endings may be -> missing. To fix this run: +> missing. To fix this run: > `/system/script/set source=[ :tocrlf [ get global-config-overlay source ] ] global-config-overlay;` Updating scripts From 237e04c25d833068b2547ca054443a2f4ffb1de3 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:19:44 +0100 Subject: [PATCH 66/80] README: move the QR code --- README.md | 2 +- README.d/upstream.png => general/qr-code.png | Bin 2 files changed, 1 insertion(+), 1 deletion(-) rename README.d/upstream.png => general/qr-code.png (100%) diff --git a/README.md b/README.md index b77538d..36408ec 100644 --- a/README.md +++ b/README.md @@ -404,7 +404,7 @@ immediately remove the link in question. Upstream -------- -[![upstream](README.d/upstream.png)](https://rsc.eworm.de/) +[![upstream](general/qr-code.png)](https://rsc.eworm.de/) URL: [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts) diff --git a/README.d/upstream.png b/general/qr-code.png similarity index 100% rename from README.d/upstream.png rename to general/qr-code.png From c9da2423aab68d1df9a4850f0f75cae7360f458c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:08:11 +0100 Subject: [PATCH 67/80] contrib/html: add a head with eworm, QR code and caption --- contrib/html.sh | 2 ++ contrib/html.sh.d/head.html | 11 +++++++++++ general/eworm-meadow.avif | Bin 0 -> 3922 bytes general/style.css | 12 ++++++++++++ 4 files changed, 25 insertions(+) create mode 100644 general/eworm-meadow.avif diff --git a/contrib/html.sh b/contrib/html.sh index 5b0b978..6276df1 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -7,6 +7,8 @@ sed \ -e "s|__TITLE__|$(head -n1 "${1}")|" \ -e "s|__STYLE__|$(realpath --relative-to="${RELTO}" general/style.css)|" \ -e "s|__LOGO__|$(realpath --relative-to="${RELTO}" logo.png)|" \ + -e "s|__EWORM__|$(realpath --relative-to="${RELTO}" general/eworm-meadow.avif)|" \ + -e "s|__QR_CODE__|$(realpath --relative-to="${RELTO}" general/qr-code.png)|" \ < "${0}.d/head.html" markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ diff --git a/contrib/html.sh.d/head.html b/contrib/html.sh.d/head.html index 0ce3ff7..0e7c1bd 100644 --- a/contrib/html.sh.d/head.html +++ b/contrib/html.sh.d/head.html @@ -4,3 +4,14 @@ + + + + + + + + + +
eworm on meadowQR code: rsc.eworm.deRouterOS Scripts
a collection of scripts for MikroTik RouterOS
+


diff --git a/general/eworm-meadow.avif b/general/eworm-meadow.avif new file mode 100644 index 0000000000000000000000000000000000000000..f592d59b86c9d178954a09bfb30dd7b6268a3a0b GIT binary patch literal 3922 zcmYLF1y~c@_ufWLN>a*6w}Nyy=?*0&MaGyg*kHhzgtWvEBqfy;KR`x_bSW(iK?wnNzN)@xT|uyz9`?n1N@Jn&}WP`3gZbo zQ}QDH5&ymb05HP>gHV5ao^|a(V*D`_e2T=teJRL+48R~LcxJBue^@ZcAmmws3JeBQ zfDwk1(~T0KcmM!9+!y8V14ji>reOlmMp9CgkNztM{!a|JcqUe*wAMXy0{wl|(HMls z-%Cdwj)Y^>1A+sv2y}otMT0~kVgAADu>Z!tgv6l#{)19VSr#=A6hjRFQ3Gk>=l}qw zGPFAk%LbsQ<>skbgjvXUfb=YY)Ex6Ds>JnOG(jX2vRlS4s+b$y;%F=eYJoEH2hfR^ z-U!MaFr9OdW1}IMHN93=ZZ<=cz7wSLrmKc|43RD8_yW~rD=v+gJ$)U7low0UD@}o3 z@f);9@r57Lw~;!N53>O7+Sj#n)w->Cy@|U7hd1wE1Ktw-j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Kx3Vtqa}ncpjsVCp3L z?6^NkVnde>?fJ9;V&xxebh!TxzF(?Bh`Bc1dT_Nerw!t2aDz^%fBL?kB)Dlat#9CF zDKgSt*j0}7QTCMFm$%+(I~k@&H9%j)l+LEIqVv^RdCJsza5rJaf2cJQXc=Bait?H} z{24V>TZ?16u1Xa`?(@nwZ9vDrchh}~SFe`;Bk)nrFF(0LzCT}2nGoVsyYW+deaD^8 zbz%GAMu}nm)gtqpp_n$62u}GI^xLk*TQ^#?7?vP!6iPO`@M)7IsVJ|*UnAF_7P-C9 zUZk%m6Lu`!_iA(H%{~_tcwFYc)AH;3=a^?lY=!4P*^pglrGG*DgvBL88}i2Hg7P2i zMe7;A+dUM#3{R;P;tEAPVY$Asdc2SE_n3*nCm$ZjnZH9cnvJL)hzwogRv5`9 zeBOB4NH4sT8JE;((C)+rPtM`GLi4*X>YL=ZIiMdORWUKm&vmrh^=imbGg&0(v4(hP z?AMdUZ~ah_c_u-lR`-otGNY+kO<(=ZGx~zPJb7e4Zb;x5e1^Lp1u9+mUC)=FmWK?R zlFTrvD8CPwy#SGP5t8+;MFhxu4cOEb_-Eh Ol=-JRBU@RH*#86W_XlVI literal 0 HcmV?d00001 diff --git a/general/style.css b/general/style.css index ad25c7c..d35e6c4 100644 --- a/general/style.css +++ b/general/style.css @@ -68,6 +68,18 @@ pre code { span.link { color: #863600; } +td.head-top { + height: 48px; + vertical-align: bottom; + font-size: 250%; + font-weight: bold; +} +td.head-bottom { + height: 48px; + vertical-align: top; + font-size: 125%; + color: #555; +} @media only screen and (orientation: landscape) { body { margin-left: 10vw; From 64b651b6d78a333a791d727d20e27921e94fdc9c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:26:37 +0100 Subject: [PATCH 68/80] contrib/logo-color: add a head with eworm, QR code and caption --- contrib/logo-color.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index f824e2d..2d207b7 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -5,6 +5,17 @@ + + + + + + + + + +
eworm on meadowQR code: rsc.eworm.deRouterOS Scripts
a collection of scripts for MikroTik RouterOS
+

Logo Color Changer

From a94c72493a1f214a7a15f317b4bd9b48b546cb27 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:27:09 +0100 Subject: [PATCH 69/80] contrib/notification: add a head with eworm, QR code and caption --- contrib/notification.html | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/contrib/notification.html b/contrib/notification.html index a4d0486..4e8192d 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -5,6 +5,17 @@ + + + + + + + + + +
eworm on meadowQR code: rsc.eworm.deRouterOS Scripts
a collection of scripts for MikroTik RouterOS
+

Notification Generator

From 9b34f60b89b4321c8ae04a46f7015a19da67a2e4 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 22:53:31 +0100 Subject: [PATCH 70/80] general/style: make the blockquote darker --- general/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/general/style.css b/general/style.css index d35e6c4..016ca63 100644 --- a/general/style.css +++ b/general/style.css @@ -18,7 +18,7 @@ a:hover { blockquote { border-left: 4px solid #ccc; padding: 0 10px; - color: #777; + color: #555; } code { margin: 0 2px; From e938ea8f0b28a055ba1790cfbd7f3f9daa849288 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:19:15 +0100 Subject: [PATCH 71/80] README: add the url verbatim --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 36408ec..3c69017 100644 --- a/README.md +++ b/README.md @@ -404,6 +404,8 @@ immediately remove the link in question. Upstream -------- +[rsc.eworm.de](https://rsc.eworm.de/) + [![upstream](general/qr-code.png)](https://rsc.eworm.de/) URL: From 3b94878e0ddc13049cc0d913544d70ecc0773372 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:16:04 +0100 Subject: [PATCH 72/80] README: add a sub-section for code hosting --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3c69017..f751d02 100644 --- a/README.md +++ b/README.md @@ -408,12 +408,11 @@ Upstream [![upstream](general/qr-code.png)](https://rsc.eworm.de/) -URL: -[GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts) +### Code hosting -Mirror: -[eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/) -[GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts) +* [eworm.de](https://git.eworm.de/cgit/routeros-scripts/about/) +* [GitHub.com](https://github.com/eworm-de/routeros-scripts#routeros-scripts) +* [GitLab.com](https://gitlab.com/eworm-de/routeros-scripts#routeros-scripts) --- [⬆️ Go back to top](#top) From 6be669632becaf4ee3d0f40e5da9bc102b9f7d1b Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:40:27 +0100 Subject: [PATCH 73/80] doc/mod/notification-telegram: hint on possibly broken link --- doc/mod/notification-telegram.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/mod/notification-telegram.md b/doc/mod/notification-telegram.md index bdf1331..f464ff0 100644 --- a/doc/mod/notification-telegram.md +++ b/doc/mod/notification-telegram.md @@ -109,6 +109,10 @@ chat with [BotFather ↗️](https://t.me/BotFather) and set it there. Have a look at my [Logo Color Changer](../../contrib/logo-color.html) to create a colored version of this scripts' logo. +> 💡️ **Hint**: The above link may be broken on code hosting sites. +> Use [Logo Color Changer](https://rsc.eworm.de/main/contrib/logo-color.html) +> instead. + See also -------- From f273392d7d0783ca05fedeb235354348bd04a2a2 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:59:08 +0100 Subject: [PATCH 74/80] contrib/html: hide the hint on broken link --- contrib/html.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/contrib/html.sh b/contrib/html.sh index 6276df1..da3873e 100755 --- a/contrib/html.sh +++ b/contrib/html.sh @@ -13,5 +13,6 @@ sed \ markdown -f toc,idanchor "${1}" | sed \ -e 's/href="\([-_\./[:alnum:]]*\)\.md\(#[-[:alnum:]]*\)\?"/href="\1.html\2"/g' \ -e '/| id="\L\1">|' \ - -e '/' From 25e6780f2aae71885a1028413f6cb7da36c57ddb Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:51:05 +0100 Subject: [PATCH 75/80] contrib/logo-color: hint on possibly broken site --- contrib/logo-color.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/logo-color.html b/contrib/logo-color.html index 2d207b7..c3d1d53 100644 --- a/contrib/logo-color.html +++ b/contrib/logo-color.html @@ -21,6 +21,11 @@

⬅️ Go back to main README

+

💡️ Hint: This site or links +on it may be broken on code hosting sites. Use +Logo Color Changer +instead.

+

You want the logo for your own notifications? But you joined the Telegram Group and want something that differentiates? Color it!

From 515edeaf449ec81a4089640fbc9e384cf7430094 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:52:58 +0100 Subject: [PATCH 76/80] contrib/notification: hint on possibly broken site --- contrib/notification.html | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/notification.html b/contrib/notification.html index 4e8192d..b7efdb5 100644 --- a/contrib/notification.html +++ b/contrib/notification.html @@ -21,6 +21,11 @@

⬅️ Go back to main README

+

💡️ Hint: This site or links +on it may be broken on code hosting sites. Use +Notification Generator +instead.

+
From e2fea6eb1e3b2b7724e2779225d9afae2bcc46a8 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 11 Nov 2025 23:56:16 +0100 Subject: [PATCH 77/80] contrib/Makefile: hide the hint on broken site --- contrib/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/Makefile b/contrib/Makefile index aae3178..56b8707 100644 --- a/contrib/Makefile +++ b/contrib/Makefile @@ -7,4 +7,6 @@ HTML := $(wildcard *.html) all: docs docs: $(HTML) - sed -i '/href=/s|\.md|\.html|' $(HTML) + sed -i -e '/href=/s|\.md|\.html|' \ + -e '/blockquote/s|/\*! display \*/|display: none;|' \ + $(HTML) From 543c4424e712ce73792b4118110f6160fff2175a Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Nov 2025 00:23:02 +0100 Subject: [PATCH 78/80] README: install from rsc.eworm.de --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f751d02..af9ef65 100644 --- a/README.md +++ b/README.md @@ -87,7 +87,7 @@ If you intend to download the scripts from a different location (for example from github.com) install the corresponding certificate chain. - /tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem"; + /tool/fetch "https://rsc.eworm.de/main/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem"; ![screenshot: download certs](README.d/01-download-certs.avif) @@ -125,7 +125,7 @@ date and time is set correctly! Now let's download the main scripts and add them in configuration on the fly. - :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://git.eworm.de/cgit/routeros-scripts/plain/" . $Script . ".rsc") output=user as-value]->"data"); }; + :foreach Script in={ "global-config"; "global-config-overlay"; "global-functions" } do={ /system/script/add name=$Script owner=$Script source=([ /tool/fetch check-certificate=yes-without-crl ("https://rsc.eworm.de/main/" . $Script . ".rsc") output=user as-value]->"data"); }; ![screenshot: import scripts](README.d/04-import-scripts.avif) From 046c3811afe860e4d828af5f4c131b9452350534 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Nov 2025 00:23:37 +0100 Subject: [PATCH 79/80] INITIAL-COMMANDS: install from rsc.eworm.de --- INITIAL-COMMANDS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/INITIAL-COMMANDS.md b/INITIAL-COMMANDS.md index 6e70b66..787c11e 100644 --- a/INITIAL-COMMANDS.md +++ b/INITIAL-COMMANDS.md @@ -17,7 +17,7 @@ Initial commands Run the complete base installation: { - :local BaseUrl "https://git.eworm.de/cgit/routeros-scripts/plain/"; + :local BaseUrl "https://rsc.eworm.de/main/"; :local CertCommonName "ISRG Root X2"; :local CertFileName "ISRG-Root-X2.pem"; :local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470"; From c63826c99f0460afb3251af443d4e9c1df3cebbc Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 12 Nov 2025 00:25:18 +0100 Subject: [PATCH 80/80] doc/mod/scriptrunonce: get script from rsc.eworm.de --- doc/mod/scriptrunonce.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/mod/scriptrunonce.md b/doc/mod/scriptrunonce.md index 955d12e..1fbb697 100644 --- a/doc/mod/scriptrunonce.md +++ b/doc/mod/scriptrunonce.md @@ -48,7 +48,7 @@ Usage and invocation The function `$ScriptRunOnce` expects an URL (or name if `ScriptRunOnceBaseUrl` is given) pointing to a script as parameter. - $ScriptRunOnce https://git.eworm.de/cgit/routeros-scripts/plain/doc/mod/scriptrunonce.d/hello-world.rsc; + $ScriptRunOnce https://rsc.eworm.de/main/doc/mod/scriptrunonce.d/hello-world.rsc; ![ScriptRunOnce](scriptrunonce.d/scriptrunonce.avif)