Support custom TLS hostname, and http host

This commit is contained in:
Nick Peng
2019-04-07 01:28:09 +08:00
parent 94ab84444a
commit bf52a0afbf
9 changed files with 77 additions and 11 deletions

View File

@@ -136,6 +136,8 @@ load_server()
config_get "port" "$section" "port" ""
config_get "type" "$section" "type" "udp"
config_get "ip" "$section" "ip" ""
config_get "host_name" "$section" "host_name" ""
config_get "http_host" "$section" "http_host" ""
config_get "server_group" "$section" "server_group" ""
config_get "blacklist_ip" "$section" "blacklist_ip" "0"
config_get "check_edns" "$section" "check_edns" "0"
@@ -165,6 +167,14 @@ load_server()
fi
fi
if [ ! -z "$host_name" ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -host-name $host_name"
fi
if [ ! -z "$http_host" ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -http-host $http_host"
fi
if [ ! -z "$server_group" ]; then
ADDITIONAL_ARGS="$ADDITIONAL_ARGS -group $server_group"
fi