From 5d81c1dce409dcad2f7ff50107d2475b6abd2240 Mon Sep 17 00:00:00 2001 From: vados-dev <192440777+vados-dev@users.noreply.github.com> Date: Sun, 16 Aug 2026 22:50:04 +0300 Subject: [PATCH] Autocommit in repo: ros.vados.ru, generated by owner: root, in 22:50:04 16.08.2026. --- html/AM-GlobalFunc.rsc | 4 +- html/mod/.#AM-Certs-By-Ident.rsc | 1 - html/mod/AM-Certs-By-Ident.rsc | 107 ++++++++++++++----------------- 3 files changed, 51 insertions(+), 61 deletions(-) delete mode 120000 html/mod/.#AM-Certs-By-Ident.rsc diff --git a/html/AM-GlobalFunc.rsc b/html/AM-GlobalFunc.rsc index be5ab6583..4893c6900 100644 --- a/html/AM-GlobalFunc.rsc +++ b/html/AM-GlobalFunc.rsc @@ -17,9 +17,9 @@ :global GlobalFuncReady false; # Git commit id & info, expected configuration version -:global CommitId "main/9079/ab32ad87"; +:global CommitId "main/9080/54b737e2"; :global CommitTAG "unknown"; -:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 22:45:04 16.08.2026."; +:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 22:50:04 16.08.2026."; # The variables are received right here. :global GlobalConfVersion 140; diff --git a/html/mod/.#AM-Certs-By-Ident.rsc b/html/mod/.#AM-Certs-By-Ident.rsc deleted file mode 120000 index 31a9b668d..000000000 --- a/html/mod/.#AM-Certs-By-Ident.rsc +++ /dev/null @@ -1 +0,0 @@ -root@amster.1717677 \ No newline at end of file diff --git a/html/mod/AM-Certs-By-Ident.rsc b/html/mod/AM-Certs-By-Ident.rsc index 2aa05a246..2d8af16b7 100644 --- a/html/mod/AM-Certs-By-Ident.rsc +++ b/html/mod/AM-Certs-By-Ident.rsc @@ -6,131 +6,113 @@ # # requires RouterOS, version=7.19 # requires device-mode, fetch -# -#:local ScriptName [ :jobname ]; -# -# CloudFlare -#/tool/fetch mode=https url=https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem; -#/certificate/import file-name=DigiCertGlobalRootCA.crt.pem passphrase=""; -#/tool/ fetch mode=https url=https://cacerts.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt.pem; -#/certificate/import file-name=DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt.pem passphrase=""; -# Quad9 -#/tool/fetch mode=https url="https://cacerts.digicert.com/DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem" -#/certificate/import file-name=DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem passphrase=""; -:global tmpAddCerts true; - -:global GlobalScriptsUrl; -:local UrlSuffix [/system/identity/get name]; -:local UrlDir "certs/"; -:local CertUrl ($GlobalScriptsUrl . $UrlDir . $UrlSuffix ."/"); - -:log error $CertUrl; - -:do { +:local ExitOK false; +:onerror Err { + :global GlobalConfReady; :global GlobalFuncReady; + :retry { :if ($GlobalConfReady != true || $GlobalFuncReady != true) \ + do={ :error ("Global config and/or functions not ready."); }; } delay=500ms max=50; + :local ScriptName [ :jobname ]; + + :global tmpAddCerts true; + + :global GlobalScriptsUrl; + :local UrlSuffix [/system/identity/get name]; + :local UrlDir "certs/"; + :local CertUrl ($GlobalScriptsUrl . $UrlDir . $UrlSuffix ."/"); + + :log error $CertUrl; + :local CertName "DigiCert-Global-Root-CA.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Global-Root-CA" [ find where common-name="DigiCert Global Root CA" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Assured-ID-Root-CA.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Assured-ID-Root-CA" [ find where common-name="DigiCert Assured ID Root CA" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Assured-ID-Root-G2.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Assured-ID-Root-G2" [ find where common-name="DigiCert Assured ID Root G3" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Assured-ID-Root-G3.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Assured-ID-Root-G3" [ find where common-name="DigiCert Assured ID Root G3" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Global-G2-TLS-RSA-SHA256-2020-CA1.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Global-G2-TLS-RSA-SHA256-2020-CA1" [ find where common-name="DigiCert Global G2 TLS RSA SHA256 2020 CA1" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Global-G3-TLS-ECC-SHA384-2020-CA1.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Global-G3-TLS-ECC-SHA384-2020-CA1" [ find where common-name="DigiCert Global G3 TLS ECC SHA384 2020 CA1" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Global-Root-G2.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Global-Root-G2" [ find where common-name="DigiCert Global Root G2" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Global-Root-G3.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Global-Root-G3" [ find where common-name="DigiCert Global Root G3" ]; -} on-error={ } -:do { + :set CertName "DigiCert-TLS-ECC-P384-Root-G5.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-TLS-ECC-P384-Root-G5" [ find where common-name="DigiCert TLS ECC P384 Root G5" ]; -} on-error={ } -:do { + :set CertName "DigiCert-TLS-RSA4096-Root-G5.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-TLS-RSA4096-Root-G5" [ find where common-name="DigiCert TLS RSA4096 Root G5" ]; -} on-error={ } -:do { + :set CertName "DigiCert-Trusted-Root-G4.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="DigiCert-Trusted-Root-G4" [ find where common-name="DigiCert Trusted Root G4" ]; -} on-error={ } -:do { + :set CertName "GTS-Root-R4.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="GTS-Root-R4" [ find where common-name="GTS Root R4" ]; -} on-error={ } -:do { + :set CertName "Go-Daddy-Root-Certificate-Authority-G2.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="Go-Daddy-Root-Certificate-Authority-G2" [ find where common-name="Go Daddy Root Certificate Authority - G2" ]; -} on-error={ } -:do { + :set CertName "ISRG-Root-X1.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="ISRG-Root-X1" [ find where common-name="ISRG Root X1" ]; -} on-error={ } -:do { + :set CertName "Root-YE.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="Root-YE" [ find where common-name="Root YE" ]; -} on-error={ } -:do { + :set CertName "Starfield-Root-Certificate-Authority-G2.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="Starfield-Root-Certificate-Authority-G2" [ find where common-name="Starfield Root Certificate Authority - G2" ]; -} on-error={ } -:do { + :set CertName "USERTrust-RSA-Certification-Authority.pem"; /tool/fetch mode=https url=($CertUrl . $CertName); /certificate/import file-name=$CertName passphrase=""; /certificate/set name="USERTrust-RSA-Certification-Authority" [ find where common-name="USERTrust RSA Certification Authority" ]; -} on-error={ } -:global tmpAddCerts (a); - + :global tmpAddCerts (a); + +} do={ + :global ExitError; $ExitError $ExitOK [ :jobname ] $Err; +} + #/certificate/import file-name=$CertName passphrase=""; #/certificate/import file-name=$CertName passphrase=""; #:set CertName "GTS-Root-RX.pem"; @@ -141,8 +123,8 @@ #:set CertName "ISRG-Root-X2.pem"; #/tool/fetch mode=https url=($AmScriptsUrl . "certs/" . $CertName); #/certificate/import file-name=$CertName passphrase=""; - - + + #/ip/dns/set allow-remote-requests=yes doh-max-concurrent-queries=100 doh-max-server-connections=20 use-doh-server=https://security.cloudflare-dns.com/dns-query verify-doh-cert=yes; #/ip/dns/static remove [find where address=1.1.1.1]; #/ip/dns/static add address=1.1.1.1 name=security.cloudflare-dns.com comment="cloudflare-dns IPv4 1"; @@ -152,3 +134,12 @@ #/ip dns static add address=2606:4700:4700::1001 name=security.cloudflare-dns.com type=AAAA #/ip/dns set servers="1.0.0.1, 8.8.4.4"; #/ip/dns set servers=""; + +# CloudFlare +#/tool/fetch mode=https url=https://cacerts.digicert.com/DigiCertGlobalRootCA.crt.pem; +#/certificate/import file-name=DigiCertGlobalRootCA.crt.pem passphrase=""; +#/tool/ fetch mode=https url=https://cacerts.digicert.com/DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt.pem; +#/certificate/import file-name=DigiCertGlobalG2TLSRSASHA2562020CA1-1.crt.pem passphrase=""; +# Quad9 +#/tool/fetch mode=https url="https://cacerts.digicert.com/DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem" +#/certificate/import file-name=DigiCertGlobalG3TLSECCSHA3842020CA1-1.crt.pem passphrase=""; -- 2.52.0