From cf3fdd99ce79ef6f2ede17aef513731b081c9a57 Mon Sep 17 00:00:00 2001 From: Shreyas Zare Date: Sun, 17 Jun 2018 23:22:29 +0530 Subject: [PATCH] Dns web app: DNS-over-HTTPS options implemented. --- DnsServerCore/www/index.html | 23 ++++++++++++++++++++--- DnsServerCore/www/js/main.js | 25 +++++++++++++++++++++++-- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/DnsServerCore/www/index.html b/DnsServerCore/www/index.html index adf6b36d..1bab4299 100644 --- a/DnsServerCore/www/index.html +++ b/DnsServerCore/www/index.html @@ -401,7 +401,7 @@
diff --git a/DnsServerCore/www/js/main.js b/DnsServerCore/www/js/main.js index dab96956..0e62a658 100644 --- a/DnsServerCore/www/js/main.js +++ b/DnsServerCore/www/js/main.js @@ -72,8 +72,21 @@ $(function () { if (itemText.indexOf("TLS") !== -1) $("#optDnsClientProtocol").val("TLS"); - else if ($("#optDnsClientProtocol").val() === "TLS") - $("#optDnsClientProtocol").val("UDP"); + else if (itemText.indexOf("HTTPS-JSON") !== -1) + $("#optDnsClientProtocol").val("HttpsJson"); + else if (itemText.indexOf("HTTPS") !== -1) + $("#optDnsClientProtocol").val("Https"); + else { + switch ($("#optDnsClientProtocol").val()) { + case "UDP": + case "TCP": + break; + + default: + $("#optDnsClientProtocol").val("UDP"); + break; + } + } }); $("#divNetworkProxy input").click(function () { @@ -325,6 +338,14 @@ function loadDnsSettings() { $("#rdForwarderProtocolTls").prop("checked", true); break; + case "https": + $("#rdForwarderProtocolHttps").prop("checked", true); + break; + + case "httpsjson": + $("#rdForwarderProtocolHttpJsons").prop("checked", true); + break; + default: $("#rdForwarderProtocolUdp").prop("checked", true); break;