]> Git [git.vados.ru] :: Repos - Mikrotiks/ros.vados.ru.git/commitdiff
Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:30:02 15.05.2026.
authorvados-dev <192440777+vados-dev@users.noreply.github.com>
Fri, 15 May 2026 09:30:03 +0000 (12:30 +0300)
committervados-dev <192440777+vados-dev@users.noreply.github.com>
Fri, 15 May 2026 09:30:03 +0000 (12:30 +0300)
html/AM-GlobalFunc.rsc
html/AM-RKN-dnsLookup.rsc

index a3b35662db149629ad0535fe9ec98cb142fbbc45..45fbd6a55ec1e843c247719c1d59946d9193c7cb 100644 (file)
@@ -17,9 +17,9 @@
 :global GlobalFuncReady false;
 
 # Git commit id & info, expected configuration version
-:global CommitId "main/649/998f9ca0";
+:global CommitId "main/650/31d05905";
 :global CommitTAG "unknown";
-:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:10:03 15.05.2026.";
+:global CommitInfo "Autocommit in repo: ros.vados.ru, generated by owner: root, in 12:30:02 15.05.2026.";
 
 # The variables are received right here.
 :global GlobalConfVersion 140;
index 1996e1db37b63b6caa741f64e91ddf42c739783f..e8d4d0bc5b27c5475129ff5d44f45553453e1930 100644 (file)
@@ -23,7 +23,6 @@ while (!$dnsLookupReady) do={ :nothing; }
   "telegra.ph"\r
   "grani.ru"\r
   "xhamster.com"\r
-  "kasparov.ru"\r
   "lostfilm.tv"\r
   "rutracker.org"\r
   "lurkmore.to"\r
@@ -34,16 +33,13 @@ while (!$dnsLookupReady) do={ :nothing; }
   "telegram.org"\r
   "api.telegram.org"\r
   "telegram.me"\r
-  "fbcd.net"\r
   "facebook.com"\r
   "instagram.com"\r
-  "twimg.com"\r
   "x.com"\r
   "twitter.com"\r
   "youtube.com"\r
   "googleapis.com"\r
   "youtu.be"\r
-  "ytimg.com"\r
   "googlevideo.com"\r
   "gstatic.com"\r
   "googleusercontent.com"\r
@@ -67,12 +63,13 @@ while (!$dnsLookupReady) do={ :nothing; }
             :do {\r
                 /ip firewall address-list add list=$ListRKN address=$newAddress comment=$aItem;\r
             } on-error={\r
-                :log error "error when adding ip to list: $ListRKN address: $newAddress domain: $aItem";\r
+                :log error "error when adding ip to list A record: $aRecord, address: $newAddress domain: $aItem";\r
             }\r
         }\r
         :if ([/ip dns cache all get $dnsRecord type]="CNAME") do={\r
             :local cname;\r
             :local nextCname;\r
+            :local cnameAddress;\r
             :set cname [/ip dns cache all find where (name=$aItem && type="CNAME")];\r
             :set nextCname [/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="CNAME")];\r
             :while ($nextCname != "") do={\r
@@ -81,10 +78,11 @@ while (!$dnsLookupReady) do={ :nothing; }
             }\r
             :foreach aRecord in=[/ip dns cache all find where (name=[/ip dns cache all get $cname data] && type="A")] do={\r
                 :do {\r
-                    /ip firewall address-list add list=$ListRKN address=[/ip dns cache all get $aRecord data] comment=$aItem;\r
+                    :set cnameAddress [/ip dns cache all get $aRecord data];\r
+                    /ip firewall address-list add list=$ListRKN address=$cnameAddress comment=$aItem;\r
 #                    /ip firewall raw add action=add-dst-to-address-list address-list=$ListRKN address-list-timeout=none-dynamic chain=prerouting comment=$aItem content=$aItem;\r
                 } on-error={\r
-                    :log error "error when adding ip to list:$ListRKN address: $newAddress domain: $aItem record: $aRecord";\r
+                    :log error "error when adding ip to list CNAME record: $cname, A record: $aRecord, address: $newAddress, from domain: $aItem.";\r
                 }\r
             }\r
         }\r