From 64ddecb5e1fdd6154cca1983f0b10c3d282f3b99 Mon Sep 17 00:00:00 2001 From: fyr77 Date: Sun, 25 Oct 2020 18:04:39 +0100 Subject: [PATCH] revamp premades, add legal --- README.md | 2 +- css/form.css | 3 +- index.html | 12 +++- js/listPage.js | 23 ++++++ js/tool.js | 192 ++++++++++--------------------------------------- legal.html | 38 ++++++++++ premades.html | 165 ++++++++++++++++++++++++++++++++++++++++++ tool.html | 43 ++--------- 8 files changed, 282 insertions(+), 196 deletions(-) create mode 100644 js/listPage.js create mode 100644 legal.html create mode 100644 premades.html diff --git a/README.md b/README.md index 40d7d67..8b1ef8d 100644 --- a/README.md +++ b/README.md @@ -14,6 +14,6 @@ For more information, see the website of the tool itself: https://dns.notjakob.c ## Thanks - Eli Grey for [FileSaver.js](https://github.com/eligrey/FileSaver.js) -- uuidjs for the [UUID JavaScript module](https://github.com/uuidjs/uuid) +- 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 diff --git a/css/form.css b/css/form.css index 8114a2a..0895aaf 100644 --- a/css/form.css +++ b/css/form.css @@ -26,5 +26,4 @@ input[type=submit] { input[type=submit]:hover { background-color: #45a049; -} - +} \ No newline at end of file diff --git a/index.html b/index.html index 7e6e12d..b2b6901 100644 --- a/index.html +++ b/index.html @@ -7,14 +7,20 @@ - + +
+

This website uses technical cookies. By continuing you agree to the use of these cookies. No personal data is stored or shared. Learn more

+
+

Secure DNS profile creator

For iOS 14 or later and macOS Big Sur or later

About Tool - GitHub + Pre-made profiles + GitHub + Legal

@@ -42,5 +48,7 @@

In the end, it's more personal preference than anything else. If your system supports both - as Apple systems do - you can choose whatever you want.

Which provider should I choose?

This comes down to a few factors. First, location. Living in countries which block certain websites narrows your choice down considerably. Furthermore, different providers have different priorities. I suggest you do some research into the providers yourself. For example, you could take a look at this table which lists a few providers and compares them.

+

Support

+

This website does not use any ads or tracking. If you enjoy it and want to show some support, buy me a coffee. It's greatly appreciated!

\ No newline at end of file diff --git a/js/listPage.js b/js/listPage.js new file mode 100644 index 0000000..458abdc --- /dev/null +++ b/js/listPage.js @@ -0,0 +1,23 @@ +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 89a0680..1d90eb8 100644 --- a/js/tool.js +++ b/js/tool.js @@ -1,3 +1,30 @@ +function getCookie(cname) { + var name = cname + "="; + var decodedCookie = decodeURIComponent(document.cookie); + var ca = decodedCookie.split(';'); + for(var i = 0; i -1 ? cookie.substr(0, eqPos) : cookie; + document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT"; + } +} + function getRegDNS() { var dns1v4 = document.getElementById("dns1v4").value; var dns2v4 = document.getElementById("dns2v4").value; @@ -102,6 +129,8 @@ function saveDynamicDataToFile() { fileString += ""; var blob = new Blob([fileString], { type: "text/plain;charset=utf-8" }); + + deleteAllCookies(); saveAs(blob, "dns.mobileconfig"); } @@ -124,158 +153,15 @@ function loadPremade() { var dns2v6 = document.getElementById("dns2v6"); var serverUrl = document.getElementById("serverUrl"); - switch(document.getElementById("premades").value) { - case "adguard-https": - provName.value = "AdGuard"; - checkDoH.checked = true; - dns1v4.value = "94.140.14.14"; - dns2v4.value = "94.140.15.15"; - dns1v6.value = "2a10:50c0::ad1:ff"; - dns2v6.value = "2a10:50c0::ad2:ff"; - serverUrl.value = "https://dns.adguard.com/dns-query"; - break; - case "alibaba-https": - provName.value = "Alibaba"; - checkDoH.checked = true; - dns1v4.value = "223.5.5.5"; - dns2v4.value = "223.6.6.6"; - dns1v6.value = "2400:3200::1"; - dns2v6.value = "2400:3200:baba::1"; - serverUrl.value = "https://dns.alidns.com/dns-query"; - break; - case "applied-privacy-https": - provName.value = "Applied Privacy"; - checkDoH.checked = true; - dns1v4.value = "146.255.56.98"; - dns2v4.value = ""; - dns1v6.value = "2a02:1b8:10:234::2"; - dns2v6.value = ""; - serverUrl.value = "https://doh.applied-privacy.net/query"; - break; - case "applied-privacy-tls": - provName.value = "Applied Privacy"; - checkDoT.checked = true; - dns1v4.value = "146.255.56.98"; - dns2v4.value = ""; - dns1v6.value = "2a02:1b8:10:234::2"; - dns2v6.value = ""; - serverUrl.value = "dot1.applied-privacy.net"; - break; - case "cloudflare-https": - provName.value = "Cloudflare"; - checkDoH.checked = true; - dns1v4.value = "1.1.1.1"; - dns2v4.value = "1.0.0.1"; - dns1v6.value = "2606:4700:4700::1111"; - dns2v6.value = "2606:4700:4700::1001"; - serverUrl.value = "https://cloudflare-dns.com/dns-query"; - break; - case "cloudflare-tls": - provName.value = "Cloudflare"; - checkDoT.checked = true; - dns1v4.value = "1.1.1.1"; - dns2v4.value = "1.0.0.1"; - dns1v6.value = "2606:4700:4700::1111"; - dns2v6.value = "2606:4700:4700::1001"; - serverUrl.value = "cloudflare-dns.com"; - break; - case "cloudflare-security-https": - provName.value = "Cloudflare Security"; - checkDoH.checked = true; - dns1v4.value = "1.1.1.2"; - dns2v4.value = "1.0.0.2"; - dns1v6.value = "2606:4700:4700::1112"; - dns2v6.value = "2606:4700:4700::1002"; - serverUrl.value = "https://security.cloudflare-dns.com/dns-query"; - break; - case "cloudflare-security-tls": - provName.value = "Cloudflare Security"; - checkDoT.checked = true; - dns1v4.value = "1.1.1.2"; - dns2v4.value = "1.0.0.2"; - dns1v6.value = "2606:4700:4700::1112"; - dns2v6.value = "2606:4700:4700::1002"; - serverUrl.value = "security.cloudflare-dns.com"; - break; - case "cloudflare-family-https": - provName.value = "Cloudflare Family"; - checkDoH.checked = true; - dns1v4.value = "1.1.1.3"; - dns2v4.value = "1.0.0.3"; - dns1v6.value = "2606:4700:4700::1113"; - dns2v6.value = "2606:4700:4700::1003"; - serverUrl.value = "https://family.cloudflare-dns.com/dns-query"; - break; - case "cloudflare-family-tls": - provName.value = "Cloudflare Family"; - checkDoT.checked = true; - dns1v4.value = "1.1.1.3"; - dns2v4.value = "1.0.0.3"; - dns1v6.value = "2606:4700:4700::1113"; - dns2v6.value = "2606:4700:4700::1003"; - serverUrl.value = "family.cloudflare-dns.com"; - break; - case "dnspod-https": - provName.value = "DNSPOD"; - checkDoH.checked = true; - dns1v4.value = "162.14.21.56"; - dns2v4.value = "162.14.21.178"; - dns1v6.value = ""; - dns2v6.value = ""; - serverUrl.value = "https://doh.pub/dns-query"; - break; - case "google-https": - provName.value = "Google"; - checkDoH.checked = true; - dns1v4.value = "8.8.8.8"; - dns2v4.value = "8.8.4.4"; - dns1v6.value = "2001:4860:4860::8888"; - dns2v6.value = "2001:4860:4860::8844"; - serverUrl.value = "https://dns.google/dns-query"; - break; - case "google-tls": - provName.value = "Google"; - checkDoT.checked = true; - dns1v4.value = "8.8.8.8"; - dns2v4.value = "8.8.4.4"; - dns1v6.value = "2001:4860:4860::8888"; - dns2v6.value = "2001:4860:4860::8844"; - serverUrl.value = "dns.google"; - break; - case "opendns-https": - provName.value = "OpenDNS"; - checkDoH.checked = true; - dns1v4.value = "208.67.220.220"; - dns2v4.value = "208.67.222.222"; - dns1v6.value = "2620:119:35::35"; - dns2v6.value = "2620:119:53::53"; - serverUrl.value = "https://doh.opendns.com/dns-query"; - break; - case "quad9-https": - provName.value = ""; - checkDoH.checked = true; - dns1v4.value = "9.9.9.9"; - dns2v4.value = "149.112.112.112"; - dns1v6.value = "2620:fe::fe"; - dns2v6.value = "2620:fe::9"; - serverUrl.value = "https://dns.quad9.net/dns-query"; - break; - case "quad9-tls": - provName.value = ""; - checkDoT.checked = true; - dns1v4.value = "9.9.9.9"; - dns2v4.value = "149.112.112.112"; - dns1v6.value = "2620:fe::fe"; - dns2v6.value = "2620:fe::9"; - serverUrl.value = "dns.quad9.net"; - break; - default: - provName.value = ""; - checkDoH.checked = true; - dns1v4.value = ""; - dns2v4.value = ""; - dns1v6.value = ""; - dns2v6.value = ""; - serverUrl.value = ""; + 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"); } \ No newline at end of file diff --git a/legal.html b/legal.html new file mode 100644 index 0000000..61503c4 --- /dev/null +++ b/legal.html @@ -0,0 +1,38 @@ + + + + + + DNS Profile Creator + + + + +

Secure DNS profile creator

+

For iOS 14 or later and macOS Big Sur or later

+ + + +
+ +

Licenses & Thanks

+ +

Privacy

+

This website (https://dns.notjakob.com) uses cookies to operate.

+

A technical cookie by Cloudflare is created. This is necessary for the security features and cannot be disabled. It cannot be used to personally identify visitors. Read more about it here.

+

Furthermore, this website uses cookies to import premade configuration profiles. These cookies do not contain any personal information and cannot be used to personally identify visitors.
+ These cookies expire after one hour or after downloading the profile.

+

This website does not collect any personal data and does not use ads.

+ + \ No newline at end of file diff --git a/premades.html b/premades.html new file mode 100644 index 0000000..238a094 --- /dev/null +++ b/premades.html @@ -0,0 +1,165 @@ + + + + + + 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: 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 3352545..8a2e294 100644 --- a/tool.html +++ b/tool.html @@ -10,54 +10,21 @@ - +

Secure DNS profile creator

For iOS 14 or later and macOS Big Sur or later


-

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

- +

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