Support DNS Over HTTPS

This commit is contained in:
Nick Peng
2019-03-30 20:10:27 +08:00
parent 5501bfb6a3
commit 2d01ed8a04
21 changed files with 1264 additions and 88 deletions

View File

@@ -155,9 +155,11 @@ load_server()
SERVER="server-tcp"
elif [ "$type" = "tls" ]; then
SERVER="server-tls"
elif [ "$type" = "https" ]; then
SERVER="server-https"
fi
if [ ! -z "`echo $ip | grep ":"`" ]; then
if [ ! -z "`echo $ip | grep ":" | grep -v "https://"`" ]; then
if [ -z "`echo $ip | grep "\["`" ]; then
ip="[$ip]"
fi
@@ -185,6 +187,10 @@ load_server()
DNS_ADDRESS="$ip"
fi
if [ "$type" = "https" ]; then
DNS_ADDRESS="$ip"
fi
conf_append "$SERVER" "$DNS_ADDRESS $ADDITIONAL_ARGS $addition_arg"
}