From c1e5ee04ea67c4f9ccb9d74e377e20dae4bbfbaf Mon Sep 17 00:00:00 2001 From: PMExtra Date: Fri, 18 Nov 2022 00:05:43 +0800 Subject: [PATCH] support AAAA record --- root/etc/init.d/vssr | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/root/etc/init.d/vssr b/root/etc/init.d/vssr index d884eaa..f53611a 100755 --- a/root/etc/init.d/vssr +++ b/root/etc/init.d/vssr @@ -192,6 +192,8 @@ start_rules() { server=$(ping ${server} -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1) if echo $server | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then echo $server >/etc/ssr_ip + elif [ "$server" != "${server#*:[0-9a-fA-F]}" ]; then + echo $server >/etc/ssr_ip else server=$(cat /etc/ssr_ip) fi @@ -221,6 +223,8 @@ start_rules() { udp_server=$(ping ${udp_server} -s 1 -c 1 | grep PING | cut -d'(' -f 2 | cut -d')' -f1) if echo $udp_server | grep -E "^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$" >/dev/null; then echo $udp_server >/etc/ssr_ip + elif [ "$udp_server" != "${udp_server#*:[0-9a-fA-F]}" ]; then + echo $udp_server >/etc/ssr_ip else udp_server=$(cat /etc/ssr_ip) fi