:retry command={:set PubIpAddr ([ /tool/fetch http-method="get" check-certificate=yes-without-crl $Url output=user as-value ]->"data")} \
delay=200ms max=5 on-error={:log error ($JobName . " Failed to detect public IP using fallback service: " . $Url . ".")}
};
- :if ($PubIpAddr = false) do={:set PubIpAddr "not-detected"} else={:set PubIpAddr [:pick $PubIpAddr 0 15]}
- :return $PubIpAddr;
+ :local IpLen ([ :len $PublicIpAddress ] -1);
+ :if ($PubIpAddr = false) do={:set PubIpAddr "not-detected"} else={:set PubIpAddr [:pick $PubIpAddr 0 $IpLen]}
+# :log warning ($0 . " Public IP address detected: $PubIpAddr");
+ :return $PubIpAddr;
}
:set FormatLine do={