From 5dfdfa41fbe6400a1789b073a8dd4c9e3afaff26 Mon Sep 17 00:00:00 2001 From: Anton Bobov Date: Sat, 21 Mar 2026 10:14:09 +0500 Subject: replace through-vpn.sh with enhanced ros-al-add script --- ros-al-add | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100755 ros-al-add (limited to 'ros-al-add') diff --git a/ros-al-add b/ros-al-add new file mode 100755 index 0000000..264cd03 --- /dev/null +++ b/ros-al-add @@ -0,0 +1,56 @@ +#!/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 <