]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:15:02 01.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Fri, 1 May 2026 00:15:02 +0000 (03:15 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Fri, 1 May 2026 00:15:02 +0000 (03:15 +0300)
html/AM-GlobalFunc.rsc
html/func-collection/git/updateVPNList/.#dnsLookup [deleted symlink]
html/func-collection/git/updateVPNList/AM-UnblockRKN.rsc [moved from html/func-collection/git/updateVPNList/dnsLookup with 77% similarity]

index 8342e0b2691cb7ee10a47d9dd4274704c6b45cba..4c1e34ad3de152844f983bec5858c25dcc78c1d2 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/332/3b98172a";
+:global CommitId "main/333/a01c1573";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:10:02 01.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 03:15:02 01.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 138;
diff --git a/html/func-collection/git/updateVPNList/.#dnsLookup b/html/func-collection/git/updateVPNList/.#dnsLookup
deleted file mode 120000 (symlink)
index bf238fe..0000000
+++ /dev/null
@@ -1 +0,0 @@
-root@amster.16966
\ No newline at end of file
similarity index 77%
rename from html/func-collection/git/updateVPNList/dnsLookup
rename to html/func-collection/git/updateVPNList/AM-UnblockRKN.rsc
index 7262c488731e817dc867fe09f06156772f74c426..480eae6711cc887d076339ead4b3dc688940664d 100644 (file)
@@ -1,6 +1,6 @@
-:global ListName
-:global Servers
-:global Done
+:global ListRKN;
+:global SrvRKN;
+:global Done;
 
 #has $Done been initialized?
 :if ([:typeof $Done] != "boolean") do={
@@ -16,24 +16,24 @@ while (!$Done) do={
 :set Done false;
 
 #delete old address lists
-:foreach aListItem in=[/ip firewall address-list find list=$ListName] do={
+:foreach aListItem in=[/ip firewall address-list find list=$ListRKN] do={
     /ip firewall address-list remove $aListItem;
 }
 
-:foreach aServer in=$Servers do={
+:foreach aSrvRKN in=$SrvRKN do={
 #force the dns entries to be cached
     :do {
-        :resolve $aServer;
+        :resolve $aSrvRKN;
     } on-error={
         :log error "dns resolve failure [ ip - resolve ip ]"
     }
 
-    :foreach dnsRecord in=[/ip dns cache all find where (name=$aServer)] do={
+    :foreach dnsRecord in=[/ip dns cache all find where (name=$aSrvRKN)] 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=$ListName address=$newAddress comment=$aServer;
+                /ip firewall address-list add list=$ListRKN address=$newAddress comment=$aSrvRKN;
             } on-error={
                 :log error "error when adding ip to list: $newAddress"
             }
@@ -43,7 +43,7 @@ while (!$Done) do={
         :if ([/ip dns cache all get $dnsRecord type]="CNAME") do={
             :local cname;
             :local nextCname
-            :set cname [/ip dns cache all find where (name=$aServer && type="CNAME")];
+            :set cname [/ip dns cache all find where (name=$aSrvRKN && type="CNAME")];
             :set nextCname [/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="CNAME")];
 
             :while ($nextCname != "") do={
@@ -54,7 +54,7 @@ while (!$Done) do={
 #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=$ListName address=[/ip dns cache all get $aRecord data] comment=$aServer;
+                    /ip firewall address-list add list=$ListRKN address=[/ip dns cache all get $aRecord data] comment=$aSrvRKN;
                 } on-error={
                     :log error "error when adding ip to list: $newAddress"
                 }
@@ -62,6 +62,3 @@ while (!$Done) do={
         }
     }
 }
-
-#allow other scripts to call this
-:set Done true
\ No newline at end of file