]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 23:55:03 04.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 20:55:04 +0000 (23:55 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Mon, 4 May 2026 20:55:04 +0000 (23:55 +0300)
html/AM-GlobalFunc.rsc
html/AM-RKN-dnsLookup.rsc

index 504fbff3cf936efe84945ba212e1362bc91f5733..cd4b2abdb5ea70bbed0c9c2d3f1ed32b1ee43c66 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/604/a78adb1c";
+:global CommitId "main/605/8fb0a983";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 23:50:03 04.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 23:55:03 04.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;
index 3ae79effd0c91e8ad91422f14228faf36aa6f472..82c88d602d59ebd9dabd94c096c29faa5bb92afa 100644 (file)
@@ -22,7 +22,7 @@
       do={ :error ($ScriptName . " is running and not ready"); }; } delay=500ms max=50;
 
 :local ListRKN "FuckRKN";
-:global arrRKN {
+:local arrRKN {
 "telegra.ph";
 "grani.ru";
 "xhamster.com";
     /ip firewall address-list remove $aListItem;
 }
 
-:foreach aSrvRKN in=$arrRKN do={
+:foreach aItem in=$arrRKN do={
 #force the dns entries to be cached
     :do {
-        :resolve $aSrvRKN;
+        :resolve $aItem;
     } on-error={
         :log error "dns resolve failure [ ip - resolve ip ]"
     }
 
-    :foreach dnsRecord in=[/ip dns cache all find where (name=$aSrvRKN)] do={
+    :foreach dnsRecord in=[/ip dns cache all find where (name=$aItem)] do={
 #if it's an A records add it directly
         :if ([/ip dns cache all get $dnsRecord type]="A") do={
             :local newAddress [/ip dns cache all get $dnsRecord data];
             :do {
-                /ip firewall address-list add list=$ListRKN address=$newAddress comment=$aSrvRKN;
+                /ip firewall address-list add list=$ListRKN address=$newAddress comment=$aItem;
             } on-error={
                 :log error "error when adding ip to list: $newAddress"
             }
@@ -76,7 +76,7 @@
         :if ([/ip dns cache all get $dnsRecord type]="CNAME") do={
             :local cname;
             :local nextCname
-            :set cname [/ip dns cache all find where (name=$aSrvRKN && type="CNAME")];
+            :set cname [/ip dns cache all find where (name=$aItem && type="CNAME")];
             :set nextCname [/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="CNAME")];
 
             :while ($nextCname != "") do={
@@ -87,7 +87,7 @@
 #add the a records we found
             :foreach aRecord in=[/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="A")] do={
                 :do {
-                    /ip firewall address-list add list=$ListRKN address=[/ip dns cache all get $aRecord data] comment=$aSrvRKN;
+                    /ip firewall address-list add list=$ListRKN address=[/ip dns cache all get $aRecord data] comment=$aItem;
                 } on-error={
                     :log error "error when adding ip to list: $newAddress"
                 }