From 71efa663d2c1030f51318f4515e6423a9f1be590 Mon Sep 17 00:00:00 2001 From: Evgeny Nerush Date: Thu, 1 Feb 2024 11:18:40 +0300 Subject: [PATCH] fix link command for IPv6 address --- ex.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ex.sh b/ex.sh index a6e83c9..30e4160 100755 --- a/ex.sh +++ b/ex.sh @@ -545,6 +545,10 @@ then check_command jq "needed for operations with configs" id=$(strip_quotes $(jq ".outbounds[0].settings.vnext[0].users[0].id" $conf_file)) address=$(strip_quotes $(jq ".outbounds[0].settings.vnext[0].address" $conf_file)) + if [[ $address == *":"* ]] # address contains ':', as IPv6 does + then + address="[${address}]" + fi port=$(jq ".outbounds[0].settings.vnext[0].port" $conf_file) public_key=$(strip_quotes $(jq ".outbounds[0].streamSettings.realitySettings.publicKey" $conf_file)) server_name=$(strip_quotes $(jq ".outbounds[0].streamSettings.realitySettings.serverName" $conf_file))