From eee399613d408d0fea643018f15381f8dc360109 Mon Sep 17 00:00:00 2001 From: Jakob Date: Wed, 10 Nov 2021 19:41:58 +0100 Subject: [PATCH] remove premades, prepare for editing functionality --- README.md | 3 +- finalize.html | 1 - index.html | 1 - js/listPage.js | 23 ------- js/tool.js | 42 ++++++------ legal.html | 1 - premades.html | 177 ------------------------------------------------- tool.html | 6 +- 8 files changed, 24 insertions(+), 230 deletions(-) delete mode 100644 js/listPage.js delete mode 100644 premades.html diff --git a/README.md b/README.md index 8b1ef8d..f812610 100644 --- a/README.md +++ b/README.md @@ -16,4 +16,5 @@ For more information, see the website of the tool itself: https://dns.notjakob.c - Eli Grey for [FileSaver.js](https://github.com/eligrey/FileSaver.js) - uuidjs for the [UUID JavaScript library](https://github.com/uuidjs/uuid) - Paul Miller for [his excellent article](https://paulmillr.com/posts/encrypted-dns/) and the [premade profiles](https://github.com/paulmillr/encrypted-dns) -- W3schools for [w3.css](https://www.w3schools.com/w3css/) \ No newline at end of file +- W3schools for [w3.css](https://www.w3schools.com/w3css/) +- nitrohorse for [encrypted-dns.party](https://encrypted-dns.party) and the profiles hosted there \ No newline at end of file diff --git a/finalize.html b/finalize.html index c06fcfa..6ad2e16 100644 --- a/finalize.html +++ b/finalize.html @@ -18,7 +18,6 @@
About - Pre-made profiles Tool Finalize GitHub diff --git a/index.html b/index.html index c92e1a6..d02a279 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,6 @@
About - Pre-made profiles Tool Finalize GitHub diff --git a/js/listPage.js b/js/listPage.js deleted file mode 100644 index fb41cdd..0000000 --- a/js/listPage.js +++ /dev/null @@ -1,23 +0,0 @@ -function accToggle(id) { - var x = document.getElementById(id); - if (x.className.indexOf("w3-show") == -1) { - x.className += " w3-show"; - } else { - x.className = x.className.replace(" w3-show", ""); - } -} - -function createCookie (provName, doh, dns1v4, dns2v4, dns1v6, dns2v6, serverUrl) { - var d = new Date(); - d.setTime(d.getTime() + (3600000)); //expires in 1h - var expires = "expires="+ d.toUTCString(); - document.cookie = "provName=" + provName + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "doh=" + doh + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "dns1v4=" + dns1v4 + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "dns2v4=" + dns2v4 + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "dns1v6=" + dns1v6 + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "dns2v6=" + dns2v6 + ";" + expires + ";path=/; SameSite=Strict; Secure"; - document.cookie = "serverUrl=" + serverUrl + ";" + expires + ";path=/; SameSite=Strict; Secure"; - - window.location.href = "tool.html" -} \ No newline at end of file diff --git a/js/tool.js b/js/tool.js index ed893a8..2c99815 100644 --- a/js/tool.js +++ b/js/tool.js @@ -51,29 +51,6 @@ function switchToTLS() { document.getElementById("dohdotServerLabel").innerHTML = "DoT server URL:"; } -function loadPremade() { - var provName = document.getElementById("provName"); - var checkDoH = document.getElementById("doh"); - var checkDoT = document.getElementById("dot"); - var dns1v4 = document.getElementById("dns1v4"); - var dns2v4 = document.getElementById("dns2v4"); - var dns1v6 = document.getElementById("dns1v6"); - var dns2v6 = document.getElementById("dns2v6"); - var serverUrl = document.getElementById("serverUrl"); - - provName.value = getCookie("provName"); - if (getCookie("doh") == "true") { - checkDoH.checked = true; - } else if (getCookie("doh") == "false") { - checkDoT.checked = true; - } - dns1v4.value = getCookie("dns1v4"); - dns2v4.value = getCookie("dns2v4"); - dns1v6.value = getCookie("dns1v6"); - dns2v6.value = getCookie("dns2v6"); - serverUrl.value = getCookie("serverUrl"); -} - function accordion() { var adv = document.getElementById("advanced_container"); if (adv.className.indexOf("w3-show") == -1) { @@ -83,4 +60,23 @@ function accordion() { adv.className = adv.className.replace(" w3-show", ""); adv.previousElementSibling.className = adv.previousElementSibling.className.replace("w3-black", "w3-dark-grey"); } +} + +function getDataFromUpload() { + const selectedFile = document.getElementById('fileupload').files[0]; + var read = new FileReader(); + + read.addEventListener("load", () => { + // this will save file to string + handleProfileText(read.result); + }, false); + + if (selectedFile) { + read.readAsText(selectedFile); + } +} + +function handleProfileText(uploadedProfile) { + //TODO + } \ No newline at end of file diff --git a/legal.html b/legal.html index a0be0ae..987a9e4 100644 --- a/legal.html +++ b/legal.html @@ -13,7 +13,6 @@
About - Pre-made profiles Tool Finalize GitHub diff --git a/premades.html b/premades.html deleted file mode 100644 index 2df5f6a..0000000 --- a/premades.html +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - DNS Profile Creator - - - - - -

Secure DNS profile creator

-

For iOS 14 or later and macOS Big Sur or later

- - - -
- -

Submit a new configuration

-

If you want to submit a new configuration to include here, please submit all necessary data using this form.

- -

Pre-made configurations

- -
-

Homepage
- Logging: Some
- Protocols: DoH, DoT

-

Default configuration

-

Adblocker

- - -

Family configuration

-

Adblocker and adult content blocker

- - -

No-Filter configuration

-

Encrypted DNS without any filters

- - -
-
- -
-

Homepage
- Logging: Some
- Protocols: DoH, DoT

-

Default configuration

- - -
-
- -
-

Homepage
- Logging: None
- Protocols: DoH, DoT

-

Adblock

- - -

Uncensor

- - -

Location: Japan

- - -

Location: Singapore

- - -

Location: Germany

- - -

Location: Finland

- - -
-
- -
-

Homepage
- Logging: Some
- Protocols: DoH, DoT

-

Default configuration

- - -

Security configuration

-

Blocks known malicious sites.

- - -

Family configuration

-

Blocks known malicious and adult sites.

- - -
-
- -
-

Homepage
- Logging: Yes
- Protocols: DoH, DoT

-

Default configuration

- - -
-
- -
-

Homepage
- Logging: No
- Protocols: DoH, DoT

-

Default configuration

- - -
-
- -
-

Homepage
- Logging: Some
- Protocols: DoH

-

Default configuration

- -

Family configuration

-

Blocks known adult sites.

- -
-
- -
-

Homepage
- Logging: No
- Protocols: DoH

-

Default configuration

- -
-
- -
-

Homepage
- Logging: Some
- Protocols: DoH, DoT

-

Default configuration

- - -
-
- -
-

Homepage
- Logging: No
- Protocols: DoH, DoT

-

Default configuration

- - -
-
- -
-

Homepage
- Logging: No
- Protocols: DoH, DoT

-

Anycast

- - -

Unicast

- - -
- - \ No newline at end of file diff --git a/tool.html b/tool.html index baf452d..c286cde 100644 --- a/tool.html +++ b/tool.html @@ -12,13 +12,12 @@ - +

Secure DNS profile creator

For iOS 14 or later and macOS Big Sur or later

About - Pre-made profiles Tool Finalize GitHub @@ -28,7 +27,8 @@
-

Choose a pre-configured provider, or enter your own settings:

+

Upload a pre-configured profile:

+

or enter your own settings: