Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
  • Loading branch information
xiahualiu committed Sep 29, 2024
1 parent 3d73562 commit 0819eb0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -516,10 +516,11 @@ listAllWGClients() {
echo "Current WireGuard clients (<client_name> [forward_ports]):"
echo ""
local line=''
local port=''
while read -r line; do
if [[ $line =~ ^'CLIENT_NAME=' ]]; then
line=${line##CLIENT_NAME=}
local port=$(grep -oE "dport {.+} dnat.+${line}\"" "${WG_CONF_FOLDER}/add-fullcone-nat.sh" | head -1)
port=$(grep -oE "dport {.+} dnat.+${line}\"" "${WG_CONF_FOLDER}/add-fullcone-nat.sh" | head -1)
port=$(echo "$port" | cut -d '{' -f '2' | cut -d '}' -f '1')
echo "* $line [$port]"
fi
Expand Down

0 comments on commit 0819eb0

Please sign in to comment.