#!/bin/bash
ROUTER_IP="1.1.1.1"
USERNAME="admin"
PASSWORD="admin"
RESOURCE=$(curl -k -u $USERNAME:$PASSWORD \
http://${ROUTER_IP}/rest/interface/wireguard/peers \
| jq '.[] | { "allowed-address": .["allowed-address"], "tx": .tx, "rx": .rx }')
echo $RESOURCE