Christian Hesse
511184a4a7
global-functions: $EitherOr: revert...
...
... but leave a comment.
2024-07-22 21:14:03 +02:00
Christian Hesse
8ea7805541
global-functions: $EitherOr: pass boolean value
...
Note that literal "true" or "false" (even without quotes) is converted
to string. So you may have to enclose it in parentheses for a boolean
value:
> :put [ :typeof [ $EitherOr true false ] ];
str
> :put [ :typeof [ $EitherOr (true) (false) ] ];
bool
2024-07-22 18:28:56 +02:00
Christian Hesse
2fd0d27447
global-functions: $Unix2Dos: use :tocrlf
2024-07-16 13:50:22 +02:00
Christian Hesse
8f75d542f3
global-functions: $PrettyPrint: use :tocrlf
2024-07-16 13:50:22 +02:00
Christian Hesse
8074305b92
global-functions: $Dos2Unix: use :tolf
2024-07-16 13:50:22 +02:00
Christian Hesse
f2ca62aed0
global-functions: $ScriptInstallUpdate: support storing with CRLF
...
Adding this in `global-config-overlay` make the scripts being stored
with CRLF line breaks:
:global ScriptUpdatesCRLF true;
Handle with care, I do not recommend it. Thus it's just a hidden
setting.
2024-07-16 13:50:22 +02:00
Christian Hesse
68f61ae622
global-functions: $ScriptInstallUpdate: allow CRLF on device
2024-07-16 13:50:22 +02:00
Christian Hesse
2d42fed621
global-functions: $ScriptInstallUpdate: forcibly convert to LF...
...
... to make sure we do not have unintended CRLF line breaks.
2024-07-16 13:50:22 +02:00
Christian Hesse
eab9b28cd2
global-functions: $MkDir: enable tmpfs if disabled
2024-07-04 15:31:43 +02:00
Christian Hesse
ce1b635eb2
global-functions: $GetMacVendor: cert 'GTS Root R4'
2024-07-02 21:29:14 +02:00
Christian Hesse
cdb553d39b
global-functions: $CertificateDownload: try fallback to mkcert.org
...
There's a nice API that allows to download certificate by exact common
name. Let's use that, as a fallback at least.
https://mkcert.org/
2024-06-21 16:04:05 +02:00
Christian Hesse
1a6812ef79
notify on changes regarding certificates
2024-06-21 15:57:04 +02:00
Christian Hesse
0ae3d31c58
certs: GTS CA 1C3 / GTS CA 1P5 -> GTS Root R1
2024-06-21 15:57:04 +02:00
Christian Hesse
3f51ebc125
certs: R3 / R10 -> ISRG Root X1
2024-06-21 15:57:04 +02:00
Christian Hesse
d1693a241b
certs: E1 / E5 -> ISRG Root X2
...
In the beginning of Let's Encrypt their root certificate ISRG Root X1
was not widely trusted, at least some older and/or mobile platforms were
missing that certificate in their root certificate store.
At that time Let's Encrypt was using an alternative chain of trust,
where a certificate was cross-signed with DST Root CA X3.
To make sure a valid chain of trust is available under all circumstances
a set of all certificates had to be supplied: both root vertificates
ISRG Root X1 & DST Root CA X3, and an intermediate certificate.
This was still true after DST Root CA X3 expired, as it could still be
used as a root anchor and was shipped by Let's Encrypt when requested. 🤪
This time is finally over, and we have a clean chain for trust ending in
ISRG Root X1 (or ISRG Root X2).
Well, actually it is the other way round... Let's Encrypt signs with
different tantamount intermediate certificates. There is not only E5, but
also E6 - and we can not know beforehand which one is used on renew.
So let's jetzt drop the intermediate certificates now, and rely on root
certificates only. We are perfectly fine with this these days.
Follow-up commits will do the same for *all* certificates.
The certificate is downloaded with:
curl -d '["ISRG Root X2"]' https://mkcert.org/generate/ | grep -v '^$' > certs/ISRG-Root-X2.pem
2024-06-21 15:55:45 +02:00
Christian Hesse
76dd069fa6
Let's Encrypt changed their intermediate certificates
...
https://letsencrypt.org/2024/03/19/new-intermediate-certificates
https://letsencrypt.org/certificates/
But let's keep the old ones around for now, as some sites are still
using the old intermediate.
2024-06-19 09:29:23 +02:00
Christian Hesse
e35ba4b06c
global-functions: $CleanName: no exception for dash...
...
... as we still want to deduplicate it when it is inside the input
string. This also unbreak certificate import for "Go Daddy Secure
Certificate Authority - G2" (and more)...
2024-06-01 23:06:24 +02:00
Christian Hesse
33a495beb7
backup-partition: news on support for copy-over
2024-05-23 12:27:23 +02:00
Christian Hesse
545fb5583a
global-functions: $IsTimeSync: initialize with uptime...
...
... to make sure the warning is not issued too early.
2024-05-15 15:52:28 +02:00
Christian Hesse
c87a7519fe
fw-addr-lists: add 'strongips' list from blocklist.de
2024-05-14 11:36:58 +02:00
Christian Hesse
2745597b93
global-functions: $IsTimeSync: add (one time) warning on failed ntp sync
2024-05-08 14:25:31 +02:00
Christian Hesse
fb7170f312
global-functions: $IsTimeSync: log just once
2024-05-08 12:30:13 +02:00
Christian Hesse
eae8dbbb37
global-functions: $WaitForFile: drop extra conversion
2024-04-29 23:02:48 +02:00
Christian Hesse
517ed7bf8c
global-functions: $WaitForFile: respect minimum delay
2024-04-29 23:02:48 +02:00
Christian Hesse
52ec6b7ea1
global-functions: $WaitForFile: use fewer steps
2024-04-29 23:02:48 +02:00
Christian Hesse
755db5d66d
global-functions: $CleanName: do not start with a dash
2024-04-29 23:02:48 +02:00
Christian Hesse
4006d07222
global-functions: $FetchHuge: remove temporary directory
2024-04-29 23:02:48 +02:00
Christian Hesse
0f2a4aedab
global-functions: $CertificateDownload: remove with find...
...
... to make sure this does not break when the file does no longer
exist. Starting with RouterOS 7.15rc1 the file is automatically
removed on import.
2024-04-19 11:46:17 +02:00
Christian Hesse
6fd0becf64
global-functions: introduce $ProtocolStrip
2024-04-19 08:59:51 +02:00
Christian Hesse
e1781fb805
global-functions: $CertificateDownload: use single quotes
2024-04-15 09:11:25 +02:00
Christian Hesse
7aa5059f6d
global-functions: $CertificateAvailable: use single quotes
2024-04-15 09:11:25 +02:00
Christian Hesse
ca2e5f2a01
mod/notification-ntfy: support basic auth
...
Closes #59
2024-04-15 09:11:17 +02:00
Christian Hesse
5f76c245b0
global-functions: $ScriptFromTerminal: check multiple invocations...
...
... and return false.
We can not tell which job is us... So better safe than sorry.
2024-04-11 14:03:43 +02:00
Christian Hesse
6db3355858
global-functions: $ScriptLock: break long lines
2024-04-11 13:41:49 +02:00
Christian Hesse
e53c31e9e6
global-functions: $ScriptLock: degrade message to debug
2024-04-11 13:41:49 +02:00
Christian Hesse
c5a5fb5836
global-functions: $SendNotification: set origin
2024-04-10 10:08:58 +02:00
Christian Hesse
3015743b19
global-functions: $HumanReadableNum: indicate binary base...
...
... and update scripts to match the change.
2024-04-07 22:51:24 +02:00
Christian Hesse
36cf4d028b
global-functions: drop $LogPrintExit2
2024-04-07 22:51:24 +02:00
Christian Hesse
402f847db2
global-functions: $FetchHuge: remove file on failed download
2024-04-06 00:47:21 +02:00
Christian Hesse
61ee5cbd6c
global-functions: $FetchHuge: make sure to work with clean file names
2024-04-06 00:47:21 +02:00
Christian Hesse
2edf983698
global-functions: $FetchHuge: control check-certificate with parameter
2024-04-06 00:47:16 +02:00
Christian Hesse
ab6fd88558
global-functions: $FetchHuge: use custom user agent string
2024-04-06 00:45:50 +02:00
Christian Hesse
5323052290
global-functions: introduce $FetchHuge
2024-04-06 00:43:39 +02:00
Christian Hesse
4db91ec16e
global-functions: drop $ParseJson
2024-04-02 00:08:44 +02:00
Christian Hesse
c01a424f4f
telegram-chat: read file content...
...
... instead of getting it. This lifts the size limit, though we are
still limited by Telegram message size.
This requires RouterOS 7.13.
2024-04-01 22:45:35 +02:00
Christian Hesse
bdcf5b3275
news on charge and fees
2024-03-31 21:48:47 +02:00
Christian Hesse
4df1468e25
global-functions: rename $FetchUserAgent -> $FetchUserAgentStr
...
... to make sure the function does not clash with the variable we had before,
as this causes issue with news and changes notification.
2024-03-29 11:11:17 +01:00
Christian Hesse
bbdc9c65f5
global-functions: $HumanReadableNum: set declared function only
2024-03-27 23:02:38 +01:00
Christian Hesse
acf8e88db2
global-functions: $AlignRight: set declared function only
2024-03-27 23:02:38 +01:00
Christian Hesse
1d816d94f6
global-functions: $FetchUserAgent: set declared function only
2024-03-27 23:02:22 +01:00