mirror of
https://github.com/jerrykuku/luci-app-vssr.git
synced 2023-12-18 13:29:53 +08:00
support AAAA record
This commit is contained in:
parent
ce0e0ff403
commit
c1e5ee04ea
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user