#!/usr/bin/env bash set -euo pipefail # @describe Adds domains or URLs to a RouterOS address list # @meta require-tools python3,host,ssh # @meta combine-shorts # # @arg hosts+ Domain names or URLs to add to the address list # @option -t --timeout Timeout for address list entries (e.g. '1d', '2h'). Permanent if omitted # @flag -a --all-ips Resolve domain to all A records and add individual IPs # @flag -n --dry-run Show generated commands without executing them # # @env ROS_AL_ADD_HOST! RouterOS device host # @env ROS_AL_ADD_LIST_NAME! Name of address list in RouterOS # @env ROS_AL_ADD_COMMENT_PREFIX Optional prefix for address list comments (e.g., 'vpn: ') extract_domain() { cat <