Compare commits
19 commits
Author | SHA1 | Date | |
---|---|---|---|
|
7526c0f870 | ||
|
2f872ed7df | ||
|
0d6c32b4bd | ||
|
f04be0750f | ||
|
95b331d3d6 | ||
|
430ae9d48b | ||
|
b4881b8c7c | ||
|
eee399613d | ||
|
f906f27a3b | ||
|
54e9a5a2a7 | ||
|
42e1075c50 | ||
|
a7eed9b41d | ||
|
b07a064e59 | ||
|
ca0c3606e5 | ||
|
43e93e6f9b | ||
|
0c6b60a5e6 | ||
|
48e451a510 | ||
|
232623d024 | ||
|
81579961d7 |
5
.htaccess
Normal file
|
@ -0,0 +1,5 @@
|
|||
<IfModule mod_headers.c>
|
||||
Header set Cache-Control "no-cache, no-store, must-revalidate"
|
||||
Header set Pragma "no-cache"
|
||||
Header set Expires 0
|
||||
</IfModule>
|
2
LICENSE
|
@ -1,6 +1,6 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2020 Jakob
|
||||
Copyright (c) 2021 Jakob Senkl
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
|
@ -15,5 +15,7 @@ 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)
|
||||
- Nathan Rajlich for [plist.js](https://github.com/TooTallNate/plist.js)
|
||||
- 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/)
|
||||
- W3schools for [w3.css](https://www.w3schools.com/w3css/)
|
||||
- nitrohorse for [encrypted-dns.party](https://encrypted-dns.party) and the profiles hosted there
|
|
@ -2,9 +2,11 @@
|
|||
@media (prefers-color-scheme: dark) {
|
||||
body {background-color: black;color: white;}
|
||||
.bar-color{color:#000!important;background-color:#707070!important}
|
||||
.bar-color h3{color: #fff;}
|
||||
.w3-button{color: white}
|
||||
.w3-container p{color: white}
|
||||
input[type=text], select{background-color: #4c4c4c;}
|
||||
input[type=text]::placeholder, select::placeholder{color: #9e9e9e;opacity: 1;}
|
||||
input[type=text]{color: #fff;}
|
||||
.w3-green,.w3-hover-green:hover{color:#fff!important;background-color:#37823a!important}
|
||||
}
|
46
finalize.html
Normal file
|
@ -0,0 +1,46 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>DNS Profile Creator</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<link rel="stylesheet" href="css/w3.css">
|
||||
<link rel="stylesheet" href="css/dark-mode.css">
|
||||
<script src="js/FileSaver.min.js"></script>
|
||||
<script src="js/uuidv4.min.js"></script>
|
||||
<script src="js/finalize.js"></script>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#8bc4ff">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
|
||||
<body class="w3-container">
|
||||
<h1>Secure DNS profile creator</h1>
|
||||
<h2>For iOS 14 or later and macOS Big Sur or later</h2>
|
||||
|
||||
<div class="w3-bar w3-border bar-color">
|
||||
<a href="index.html" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="finalize.html" class="w3-bar-item w3-button w3-mobile w3-green">Finalize</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig" class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
<a href="https://encrypted-dns.party/" target="_blank" class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted DNS Party</a>
|
||||
</div>
|
||||
<br>
|
||||
<div id="dynamicList"></div>
|
||||
<br>
|
||||
<div class="w3-bar">
|
||||
<button id="downloadBtn" class="w3-button w3-bar-item w3-mobile w3-green" style="width:80%" onclick="saveDynamicDataToFile()" disabled>Download Profile</button>
|
||||
<button class="w3-button w3-bar-item w3-mobile w3-dark-gray" style="width:20%" onclick="confirmDel()">Delete All</button>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
BIN
icons/android-chrome-192x192.png
Normal file
After Width: | Height: | Size: 8.6 KiB |
BIN
icons/android-chrome-512x512.png
Normal file
After Width: | Height: | Size: 24 KiB |
BIN
icons/apple-touch-icon.png
Normal file
After Width: | Height: | Size: 4.2 KiB |
10
icons/browserconfig.xml
Normal file
|
@ -0,0 +1,10 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<browserconfig>
|
||||
<msapplication>
|
||||
<tile>
|
||||
<square150x150logo src="/icons/mstile-150x150.png"/>
|
||||
<square310x310logo src="/icons/mstile-310x310.png"/>
|
||||
<TileColor>#2b5797</TileColor>
|
||||
</tile>
|
||||
</msapplication>
|
||||
</browserconfig>
|
BIN
icons/favicon-16x16.png
Normal file
After Width: | Height: | Size: 813 B |
BIN
icons/favicon-32x32.png
Normal file
After Width: | Height: | Size: 1 KiB |
BIN
icons/favicon.ico
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
icons/mstile-144x144.png
Normal file
After Width: | Height: | Size: 3.9 KiB |
BIN
icons/mstile-150x150.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
icons/mstile-310x150.png
Normal file
After Width: | Height: | Size: 4.5 KiB |
BIN
icons/mstile-310x310.png
Normal file
After Width: | Height: | Size: 8.5 KiB |
BIN
icons/mstile-70x70.png
Normal file
After Width: | Height: | Size: 2.8 KiB |
33
icons/safari-pinned-tab.svg
Normal file
|
@ -0,0 +1,33 @@
|
|||
<?xml version="1.0" standalone="no"?>
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
|
||||
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
|
||||
<svg version="1.0" xmlns="http://www.w3.org/2000/svg"
|
||||
width="700.000000pt" height="700.000000pt" viewBox="0 0 700.000000 700.000000"
|
||||
preserveAspectRatio="xMidYMid meet">
|
||||
<metadata>
|
||||
Created by potrace 1.14, written by Peter Selinger 2001-2017
|
||||
</metadata>
|
||||
<g transform="translate(0.000000,700.000000) scale(0.100000,-0.100000)"
|
||||
fill="#000000" stroke="none">
|
||||
<path d="M1660 5349 c-423 -48 -815 -236 -1110 -531 -863 -862 -685 -2290 363
|
||||
-2918 161 -96 380 -181 572 -220 741 -153 1502 158 1920 785 57 85 137 235
|
||||
173 323 l21 52 59 0 59 0 6 -112 c8 -173 51 -273 163 -383 67 -66 155 -116
|
||||
249 -140 83 -21 397 -21 480 0 178 46 316 169 381 341 21 54 27 93 32 182 l5
|
||||
112 108 0 108 0 3 -317 c3 -300 4 -321 25 -377 43 -113 136 -208 253 -258 54
|
||||
-22 63 -23 375 -23 310 0 322 1 375 23 113 46 207 140 252 249 22 56 23 70 26
|
||||
380 l3 323 22 4 c12 3 42 7 67 11 106 14 246 119 299 223 45 87 51 140 51 422
|
||||
0 348 -13 402 -128 522 -66 69 -148 112 -242 127 -43 7 -560 11 -1552 11
|
||||
-1254 0 -1488 2 -1488 14 0 30 -154 317 -217 405 -81 113 -237 278 -342 363
|
||||
-384 310 -893 461 -1371 407z m455 -454 c505 -90 943 -476 1095 -965 34 -109
|
||||
69 -158 133 -189 l43 -21 1587 0 1587 0 0 -219 0 -220 -148 -3 c-142 -3 -150
|
||||
-4 -190 -30 -22 -15 -54 -49 -69 -75 l-28 -48 -3 -412 -3 -413 -214 0 -215 0
|
||||
0 396 c0 285 -3 408 -12 438 -16 52 -84 121 -135 136 -26 8 -159 10 -425 8
|
||||
l-386 -3 -44 -30 c-28 -20 -52 -49 -70 -84 -28 -54 -28 -56 -28 -259 l0 -204
|
||||
-34 -34 -34 -34 -147 0 -147 0 -34 34 -34 34 0 205 c0 205 0 205 -28 258 -17
|
||||
34 -44 65 -71 84 l-43 30 -306 3 c-208 2 -319 0 -345 -8 -22 -6 -58 -30 -82
|
||||
-54 -36 -36 -47 -59 -73 -142 -133 -427 -477 -776 -905 -919 -154 -52 -267
|
||||
-69 -447 -69 -180 0 -293 17 -448 69 -482 162 -835 560 -944 1068 -31 146 -31
|
||||
408 0 554 63 290 185 517 392 723 233 233 510 369 836 410 95 12 311 4 419
|
||||
-15z"/>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.9 KiB |
18
icons/site.webmanifest
Normal file
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"name": "",
|
||||
"short_name": "",
|
||||
"icons": [
|
||||
{
|
||||
"src": "/icons/android-chrome-192x192.png",
|
||||
"sizes": "192x192",
|
||||
"type": "image/png"
|
||||
},
|
||||
{
|
||||
"src": "/icons/android-chrome-512x512.png",
|
||||
"sizes": "512x512",
|
||||
"type": "image/png"
|
||||
}
|
||||
],
|
||||
"theme_color": "#ffffff",
|
||||
"background_color": "#ffffff"
|
||||
}
|
97
index.html
|
@ -1,54 +1,95 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>DNS Profile Creator</title>
|
||||
<link rel="stylesheet" href="css/w3.css">
|
||||
<link rel="stylesheet" href="css/dark-mode.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#8bc4ff">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
<body class="w3-container">
|
||||
|
||||
<body class="w3-container">
|
||||
<div class="w3-container bar-color">
|
||||
<p>This website uses technical cookies. By continuing you agree to the use of these cookies. No personal data is stored or shared. <a href="legal.html">Learn more</a></p>
|
||||
</div>
|
||||
|
||||
<p>This website uses technical cookies. By continuing you agree to the use of these cookies. No personal data is
|
||||
stored or shared. <a href="legal.html">Learn more</a></p>
|
||||
</div>
|
||||
|
||||
<h1>Secure DNS profile creator</h1>
|
||||
<h2>For iOS 14 or later and macOS Big Sur or later</h2>
|
||||
|
||||
|
||||
<div class="w3-bar w3-border bar-color">
|
||||
<a href="/index.html" class="w3-bar-item w3-button w3-green w3-mobile">About</a>
|
||||
<a href="/tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="/premades.html" class="w3-bar-item w3-button w3-mobile">Pre-made profiles</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig" class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="/legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
<a href="index.html" class="w3-bar-item w3-button w3-green w3-mobile">About</a>
|
||||
<a href="tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="finalize.html" class="w3-bar-item w3-button w3-mobile">Finalize</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig"
|
||||
class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
<a href="https://encrypted-dns.party/" target="_blank"
|
||||
class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted
|
||||
DNS Party</a>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
|
||||
<p><b>If the tool does not work, please clear your cache and/or reload the webpages!</b> I am continuously updating
|
||||
this tool, but the changes might not load in your browser unless you clear your cache.</p>
|
||||
|
||||
<h3>What is this?</h3>
|
||||
<p>This website allows you to create configuration profiles for your Apple device to use the new built-in encrypted DNS options.</p>
|
||||
<p>This website allows you to create configuration profiles for your Apple device to use the new built-in encrypted
|
||||
DNS options.</p>
|
||||
<h3>Details</h3>
|
||||
<p>Apple has included built-in support for DNS-over-HTTPS and DNS-over-TLS in their iOS 14 and macOS Big Sur updates. But there is no possibility to use this new feature without a third-party app or configuration profiles. I personally preferred not to install some app to manage this for me. <br>
|
||||
This websites generates a configuration profile which is installable on your system and activates encrypted DNS.</p>
|
||||
<p>Apple has included built-in support for DNS-over-HTTPS and DNS-over-TLS in their iOS 14 and macOS Big Sur
|
||||
updates. But there is no possibility to use this new feature without a third-party app or configuration
|
||||
profiles. I personally preferred not to install some app to manage this for me. <br>
|
||||
This websites generates a configuration profile which is installable on your system and activates encrypted DNS.
|
||||
</p>
|
||||
<h4>Why not use an app?</h4>
|
||||
<p>I prefer to use tools which I can make sure do exactly what they claim to do. Configuration profiles are rather transparent, they can be opened with any text editor and viewed. This website is completely open-source. <br>
|
||||
An app off the App Store might do what it should, sure. But it also might capture data inbetween and negate the privacy advantage that DoH and DoT bring.</p>
|
||||
<p>I prefer to use tools which I can make sure do exactly what they claim to do. Configuration profiles are rather
|
||||
transparent, they can be opened with any text editor and viewed. This website is completely open-source. <br>
|
||||
An app off the App Store might do what it should, sure. But it also might capture data inbetween and negate the
|
||||
privacy advantage that DoH and DoT bring.</p>
|
||||
<h3>How do I use this?</h3>
|
||||
<p>Visit this website using you Apple device and navigate to the tool. Then, select a pre-made configuration or enter your own settings and click/tap "Download profile". Then, open the downloaded file using the "Files" app. <br>
|
||||
Your device will ask you a few times, be sure to accept the warnings.<br>
|
||||
<b>The generated profiles are not signed. This is normal.</b></p>
|
||||
<p>Visit this website using your Apple device and navigate to the tool. Then, upload a pre-made configuration or
|
||||
enter your own settings and click/tap "Add to profile". When you're done adding configurations, open the
|
||||
"Finalize" page to download the finished file. Then, open the downloaded file using the "Files" app.
|
||||
<br>
|
||||
Your device will ask you a few times, be sure to accept the warnings.<br>
|
||||
<b>The generated profiles are not signed. This is normal.</b></p>
|
||||
<h3>Why should I care about encrypted DNS?</h3>
|
||||
<p>DNS is basically the phone book of the internet. If you visit a website, your computer first contacts the DNS server to look up where its even supposed to connect to.<br>
|
||||
While the traffic itself is often encrypted nowadays, the lookup itself still is not without DoH/DoT. So anyone in the same network will still know exactly which websites you visited.<br>
|
||||
If you want to know more about this, give <a href="https://paulmillr.com/posts/encrypted-dns/">this blog post by Paul Miller</a> a read, he explains the subject very nicely.</p>
|
||||
<p>DNS is basically the phone book of the internet. If you visit a website, your computer first contacts the DNS
|
||||
server to look up where its even supposed to connect to.<br>
|
||||
While the traffic itself is often encrypted nowadays, the lookup itself still is not without DoH/DoT. So anyone
|
||||
in the same network will still know exactly which websites you visited.<br>
|
||||
If you want to know more about this, give <a href="https://paulmillr.com/posts/encrypted-dns/">this blog post by
|
||||
Paul Miller</a> a read, he explains the subject very nicely.</p>
|
||||
<h3>DNS-over-HTTPS or DNS-over-TLS?</h3>
|
||||
<p>There isn't a huge difference between the two protocols.<br>
|
||||
DoH is harder to spot in regular network traffic and is also less likely to be blocked in a corporate environment, since it uses the same port as any secured website.<br>
|
||||
DoT is possibly faster, since it uses one layer of transport less. But it uses it's own port and is therefore obvious to any other people monitoring the network - and might be blocked behind very strict firewalls.</p>
|
||||
<p>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.</p>
|
||||
DoH is harder to spot in regular network traffic and is also less likely to be blocked in a corporate
|
||||
environment, since it uses the same port as any secured website.<br>
|
||||
DoT is possibly faster, since it uses one layer of transport less. But it uses it's own port and is therefore
|
||||
obvious to any other people monitoring the network - and might be blocked behind very strict firewalls.</p>
|
||||
<p>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.</p>
|
||||
<h3>Which provider should I choose?</h3>
|
||||
<p>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 <a href="https://www.privacytools.io/providers/dns/">this table</a> which lists a few providers and compares them.</p>
|
||||
<p>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 <a
|
||||
href="https://privacyguides.org/providers/dns/">this table</a> which lists a few providers and compares
|
||||
them.</p>
|
||||
<h3>Support</h3>
|
||||
<p>This website does not use any ads or tracking. If you enjoy it and want to show some support, <a href="https://ko-fi.com/notjakob" target="_blank">buy me a coffee</a>. It's greatly appreciated!</p>
|
||||
<p>This website does not use any ads or tracking. If you enjoy it and want to show some support, <a
|
||||
href="https://ko-fi.com/notjakob" target="_blank">buy me a coffee</a>. It's greatly appreciated!</p>
|
||||
</body>
|
||||
|
||||
</html>
|
337
js/finalize.js
Normal file
|
@ -0,0 +1,337 @@
|
|||
window.onload = function () {
|
||||
deleteTempCookies();
|
||||
buildList();
|
||||
}
|
||||
|
||||
function deleteCard(cardNo) {
|
||||
document.getElementById("card" + cardNo).remove();
|
||||
document.cookie = cardNo + "provName=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "doh=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "dns1v4=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "dns2v4=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "dns1v6=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "dns2v6=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "serverUrl=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "exclWifi=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "useWifi=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "useCell=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = cardNo + "lockProfile=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
}
|
||||
|
||||
function editCard(cardNo) {
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (86400000)); //expires in 24h
|
||||
var expires = "expires="+ d.toUTCString();
|
||||
document.cookie = "editSelected=" + cardNo + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
window.location.href = 'tool.html';
|
||||
}
|
||||
|
||||
function buildList() {
|
||||
var parent = document.getElementById("dynamicList");
|
||||
|
||||
for (var i = 0; i < getCookie("runningNo"); i++) {
|
||||
if (getCookie(i + "provName") != "") {
|
||||
var carddiv = document.createElement("div");
|
||||
carddiv.classList.add("w3-card");
|
||||
carddiv.id = "card" + i;
|
||||
|
||||
var header = document.createElement("header");
|
||||
header.classList.add("w3-container");
|
||||
header.classList.add("bar-color");
|
||||
|
||||
var headertext = document.createElement("h3");
|
||||
headertext.classList.add("w3-left");
|
||||
headertext.appendChild(document.createTextNode(decodeURIComponent(getCookie(i + "provName"))));
|
||||
|
||||
var headerdel = document.createElement("button");
|
||||
headerdel.classList.add("w3-button");
|
||||
headerdel.classList.add("w3-red");
|
||||
headerdel.classList.add("w3-right")
|
||||
headerdel.innerHTML = "X";
|
||||
headerdel.setAttribute("onclick", 'deleteCard(' + i + ')');
|
||||
|
||||
var headeredit = document.createElement("button");
|
||||
headeredit.classList.add("w3-button");
|
||||
headeredit.classList.add("w3-dark-gray");
|
||||
headeredit.classList.add("w3-right")
|
||||
headeredit.innerHTML = "Edit";
|
||||
headeredit.setAttribute("onclick", 'editCard(' + i + ')');
|
||||
|
||||
var infocontainer = document.createElement("div");
|
||||
infocontainer.classList.add("w3-container");
|
||||
|
||||
var infop = document.createElement("p");
|
||||
|
||||
var infostring = "Connection type: ";
|
||||
if (getCookie(i + "doh") == "true") {
|
||||
infostring += "DNS-over-HTTPS";
|
||||
} else {
|
||||
infostring += "DNS-over-TLS";
|
||||
}
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
var dns1v4 = getCookie(i + "dns1v4");
|
||||
var dns2v4 = getCookie(i + "dns2v4");
|
||||
var dns1v6 = getCookie(i + "dns1v6");
|
||||
var dns2v6 = getCookie(i + "dns2v6");
|
||||
var exclWifi = decodeURIComponent(getCookie(i + "exclWifi"));
|
||||
|
||||
if (dns1v4 != "") {
|
||||
infostring = "Primary IPv4 DNS Server: " + getCookie(i + "dns1v4");
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
}
|
||||
if (dns2v4 != "") {
|
||||
infostring = "Secondary IPv4 DNS Server: " + dns2v4;
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
}
|
||||
if (dns1v6 != "") {
|
||||
infostring = "Primary IPv6 DNS Server: " + dns1v6;
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
}
|
||||
if (dns2v6 != "") {
|
||||
infostring = "Secondary IPv6 DNS Server: " + dns2v6;
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
}
|
||||
|
||||
infostring = "Server Address: " + getCookie(i + "serverUrl");
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
|
||||
if (exclWifi != "") {
|
||||
infostring = "Excluded WiFi SSIDs: " + exclWifi;
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
infop.appendChild(document.createElement("br"));
|
||||
}
|
||||
|
||||
infostring = "";
|
||||
|
||||
if (getCookie(i + "useWifi") == "true") {
|
||||
infostring += "Enabled on WiFi. ";
|
||||
}
|
||||
if (getCookie(i + "useCell") == "true") {
|
||||
infostring += "Enabled on Cellular. ";
|
||||
}
|
||||
if (getCookie(i + "lockProfile" == "true")) {
|
||||
infostring += "Disablement prohibited. ";
|
||||
}
|
||||
infop.appendChild(document.createTextNode(infostring));
|
||||
|
||||
header.appendChild(headertext);
|
||||
header.appendChild(headerdel);
|
||||
header.appendChild(headeredit);
|
||||
carddiv.appendChild(header);
|
||||
infocontainer.appendChild(infop);
|
||||
carddiv.appendChild(infocontainer);
|
||||
parent.appendChild(carddiv);
|
||||
document.getElementById("downloadBtn").disabled = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function deleteTempCookies() {
|
||||
document.cookie = "provName=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "doh=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "dns1v4=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "dns2v4=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "dns1v6=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "dns2v6=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
document.cookie = "serverUrl=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
}
|
||||
|
||||
function getCookie(cname) {
|
||||
var name = cname + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function deleteAllCookies() {
|
||||
var cookies = document.cookie.split(";");
|
||||
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = cookies[i];
|
||||
var eqPos = cookie.indexOf("=");
|
||||
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
||||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
}
|
||||
}
|
||||
|
||||
function getRegDNS(iterator) {
|
||||
var dns1v4 = getCookie(iterator + "dns1v4");
|
||||
var dns2v4 = getCookie(iterator + "dns2v4");
|
||||
var dns1v6 = getCookie(iterator + "dns1v6");
|
||||
var dns2v6 = getCookie(iterator + "dns2v6");
|
||||
var ip4format = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
||||
var ip6format = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
||||
|
||||
var returnstring = "<key>ServerAddresses</key>\n<array>\n";
|
||||
var dnsOverride = false;
|
||||
|
||||
if (ip6format.test(dns1v6)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns1v6 + "</string>\n";
|
||||
}
|
||||
if (ip6format.test(dns2v6)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns2v6 + "</string>\n";
|
||||
}
|
||||
|
||||
if (ip4format.test(dns1v4)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns1v4 + "</string>\n";
|
||||
}
|
||||
if (ip4format.test(dns2v4)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns2v4 + "</string>\n";
|
||||
}
|
||||
|
||||
if (dnsOverride) {
|
||||
returnstring += "</array>\n";
|
||||
return returnstring;
|
||||
} else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function saveDynamicDataToFile() {
|
||||
var fileString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||
fileString += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n";
|
||||
fileString += "<plist version=\"1.0\">\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>PayloadContent</key>\n";
|
||||
fileString += "<array>\n";
|
||||
|
||||
//DNS settings start
|
||||
for (var i = 0; i < getCookie("runningNo"); i++) {
|
||||
var provName = getCookie(i + "provName");
|
||||
if (provName != "") { //This check is to avoid empty configurations leftover by deletion.
|
||||
var encValue = null;
|
||||
if (getCookie(i + "doh") == "true") {
|
||||
encValue = "HTTPS";
|
||||
} else {
|
||||
encValue = "TLS";
|
||||
}
|
||||
var exclWifi = decodeURIComponent(getCookie(i + "exclWifi"));
|
||||
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>DNSSettings</key>\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>DNSProtocol</key>\n";
|
||||
fileString += "<string>" + encValue + "</string>\n";
|
||||
fileString += getRegDNS(i);
|
||||
if (encValue == "HTTPS") {
|
||||
fileString += "<key>ServerURL</key>\n";
|
||||
} else {
|
||||
fileString += "<key>ServerName</key>\n";
|
||||
}
|
||||
fileString += "<string>" + getCookie(i + "serverUrl") + "</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "<key>OnDemandRules</key>\n";
|
||||
fileString += "<array>\n";
|
||||
if (exclWifi != "") {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Disconnect</string>\n";
|
||||
fileString += "<key>SSIDMatch</key>\n"
|
||||
fileString += "<array>\n";
|
||||
exclWifi.split(/\s*,\s*/).forEach(function (wifiString) {
|
||||
fileString += "<string>" + wifiString + "</string>\n";
|
||||
});
|
||||
fileString += "</array>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
if (getCookie(i + "useWifi") == "true") {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "<key>InterfaceTypeMatch</key>\n";
|
||||
fileString += "<string>WiFi</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
if (getCookie(i + "useCell") == "true") {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "<key>InterfaceTypeMatch</key>\n";
|
||||
fileString += "<string>Cellular</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Disconnect</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "</array>\n";
|
||||
fileString += "<key>PayloadDescription</key>\n";
|
||||
fileString += "<string>Configures device to use " + provName + " Encrypted DNS over " + encValue + "</string>\n";
|
||||
fileString += "<key>PayloadDisplayName</key>\n";
|
||||
fileString += "<string>" + provName + " DNS over " + encValue + "</string>\n";
|
||||
fileString += "<key>PayloadIdentifier</key>\n";
|
||||
fileString += "<string>com.apple.dnsSettings.managed." + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadType</key>\n";
|
||||
fileString += "<string>com.apple.dnsSettings.managed</string>\n";
|
||||
fileString += "<key>PayloadUUID</key>\n";
|
||||
fileString += "<string>" + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadVersion</key>\n";
|
||||
fileString += "<integer>1</integer>\n";
|
||||
fileString += "<key>ProhibitDisablement</key>\n";
|
||||
if (getCookie(i + "lockProfile") == "true") {
|
||||
fileString += "<true/>\n";
|
||||
} else {
|
||||
fileString += "<false/>\n";
|
||||
}
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
}
|
||||
//DNS settings end
|
||||
|
||||
fileString += "</array>\n";
|
||||
fileString += "<key>PayloadDescription</key>\n";
|
||||
fileString += "<string>Adds different encrypted DNS configurations to Big Sur and iOS 14 based systems</string>\n";
|
||||
fileString += "<key>PayloadDisplayName</key>\n";
|
||||
fileString += "<string>Encrypted DNS (DoH, DoT)</string>\n";
|
||||
fileString += "<key>PayloadIdentifier</key>\n";
|
||||
fileString += "<string>com.notjakob.apple-dns." + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadRemovalDisallowed</key>\n";
|
||||
fileString += "<false/>\n";
|
||||
fileString += "<key>PayloadType</key>\n";
|
||||
fileString += "<string>Configuration</string>\n";
|
||||
fileString += "<key>PayloadUUID</key>\n";
|
||||
fileString += "<string>" + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadVersion</key>\n";
|
||||
fileString += "<integer>1</integer>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "</plist>";
|
||||
|
||||
var blob = new Blob([fileString], {
|
||||
type: "application/octet-stream;charset=utf-8"
|
||||
});
|
||||
|
||||
deleteAllCookies();
|
||||
|
||||
saveAs(blob, "dns.mobileconfig");
|
||||
}
|
||||
|
||||
function confirmDel() {
|
||||
if (confirm("This will delete all configurations on this page. Continue?") == true) {
|
||||
deleteAllCookies();
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
|
@ -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"
|
||||
}
|
7391
js/plist.js
Normal file
476
js/tool.js
|
@ -1,225 +1,293 @@
|
|||
function getCookie(cname) {
|
||||
var name = cname + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for(var i = 0; i <ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
function deleteAllCookies() {
|
||||
var cookies = document.cookie.split(";");
|
||||
|
||||
for (var i = 0; i < cookies.length; i++) {
|
||||
var cookie = cookies[i];
|
||||
var eqPos = cookie.indexOf("=");
|
||||
var name = eqPos > -1 ? cookie.substr(0, eqPos) : cookie;
|
||||
document.cookie = name + "=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure";
|
||||
}
|
||||
}
|
||||
|
||||
function getRegDNS() {
|
||||
var dns1v4 = document.getElementById("dns1v4").value;
|
||||
var dns2v4 = document.getElementById("dns2v4").value;
|
||||
var dns1v6 = document.getElementById("dns1v6").value;
|
||||
var dns2v6 = document.getElementById("dns2v6").value;
|
||||
var ip4format = /^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/;
|
||||
var ip6format = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
||||
|
||||
var returnstring = "<key>ServerAddresses</key>\n<array>\n";
|
||||
var dnsOverride = false;
|
||||
|
||||
if (ip6format.test(dns1v6)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns1v6 + "</string>\n";
|
||||
}
|
||||
if (ip6format.test(dns2v6)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns2v6 + "</string>\n";
|
||||
}
|
||||
|
||||
if (ip4format.test(dns1v4)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns1v4 + "</string>\n";
|
||||
}
|
||||
if (ip4format.test(dns2v4)) {
|
||||
dnsOverride = true;
|
||||
returnstring += "<string>" + dns2v4 + "</string>\n";
|
||||
}
|
||||
|
||||
if (dnsOverride) {
|
||||
returnstring += "</array>\n";
|
||||
return returnstring;
|
||||
}
|
||||
else {
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function saveDynamicDataToFile() {
|
||||
var encryption = document.getElementsByName('encryption');
|
||||
var encValue = null;
|
||||
var provName = document.getElementById("provName").value;
|
||||
|
||||
for (var i = 0, length = encryption.length; i < length; i++) {
|
||||
if (encryption[i].checked) {
|
||||
encValue = encryption[i].value;
|
||||
// only one radio can be logically checked, don't check the rest
|
||||
break;
|
||||
var name = cname + "=";
|
||||
var decodedCookie = decodeURIComponent(document.cookie);
|
||||
var ca = decodedCookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
var c = ca[i];
|
||||
while (c.charAt(0) == ' ') {
|
||||
c = c.substring(1);
|
||||
}
|
||||
if (c.indexOf(name) == 0) {
|
||||
return c.substring(name.length, c.length);
|
||||
}
|
||||
}
|
||||
var exclWifi = document.getElementById("exclWifi");
|
||||
|
||||
var fileString = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
|
||||
fileString += "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n";
|
||||
fileString += "<plist version=\"1.0\">\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>PayloadContent</key>\n";
|
||||
fileString += "<array>\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>DNSSettings</key>\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>DNSProtocol</key>\n";
|
||||
fileString += "<string>" + encValue + "</string>\n";
|
||||
fileString += getRegDNS();
|
||||
if (encValue == "HTTPS") {
|
||||
fileString += "<key>ServerURL</key>\n";
|
||||
}
|
||||
else {
|
||||
fileString += "<key>ServerName</key>\n";
|
||||
}
|
||||
fileString += "<string>" + document.getElementById("serverUrl").value + "</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "<key>OnDemandRules</key>\n";
|
||||
fileString += "<array>\n";
|
||||
if (exclWifi.value != "") {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Disconnect</string>\n";
|
||||
fileString += "<key>SSIDMatch</key>\n"
|
||||
fileString += "<array>\n";
|
||||
exclWifi.value.split(/\s*,\s*/).forEach(function(wifiString) {
|
||||
console.log(wifiString);
|
||||
fileString += "<string>" + wifiString + "</string>\n";
|
||||
});
|
||||
fileString += "</array>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
if (document.getElementById("useWifi").checked) {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "<key>InterfaceTypeMatch</key>\n";
|
||||
fileString += "<string>WiFi</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
if (document.getElementById("useCell").checked) {
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Connect</string>\n";
|
||||
fileString += "<key>InterfaceTypeMatch</key>\n";
|
||||
fileString += "<string>Cellular</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
}
|
||||
fileString += "<dict>\n";
|
||||
fileString += "<key>Action</key>\n";
|
||||
fileString += "<string>Disconnect</string>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "</array>\n";
|
||||
fileString += "<key>PayloadDescription</key>\n";
|
||||
fileString += "<string>Configures device to use " + provName + " Encrypted DNS over " + encValue + "</string>\n";
|
||||
fileString += "<key>PayloadDisplayName</key>\n";
|
||||
fileString += "<string>" + provName + " DNS over " + encValue + "</string>\n";
|
||||
fileString += "<key>PayloadIdentifier</key>\n";
|
||||
fileString += "<string>com.apple.dnsSettings.managed." + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadType</key>\n";
|
||||
fileString += "<string>com.apple.dnsSettings.managed</string>\n";
|
||||
fileString += "<key>PayloadUUID</key>\n";
|
||||
fileString += "<string>" + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadVersion</key>\n";
|
||||
fileString += "<integer>1</integer>\n";
|
||||
fileString += "<key>ProhibitDisablement</key>\n";
|
||||
if (document.getElementById("lockProfile").checked) {
|
||||
fileString += "<true/>\n";
|
||||
}
|
||||
else {
|
||||
fileString += "<false/>\n";
|
||||
}
|
||||
fileString += "</dict>\n";
|
||||
fileString += "</array>\n";
|
||||
fileString += "<key>PayloadDescription</key>\n";
|
||||
fileString += "<string>Adds " + provName + " Encrypted DNS over " + encValue + " to Big Sur and iOS 14 based systems</string>\n";
|
||||
fileString += "<key>PayloadDisplayName</key>\n";
|
||||
fileString += "<string>" + provName + " DNS over " + encValue + "</string>\n";
|
||||
fileString += "<key>PayloadIdentifier</key>\n";
|
||||
fileString += "<string>com.notjakob.apple-dns." + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadRemovalDisallowed</key>\n";
|
||||
fileString += "<false/>\n";
|
||||
fileString += "<key>PayloadType</key>\n";
|
||||
fileString += "<string>Configuration</string>\n";
|
||||
fileString += "<key>PayloadUUID</key>\n";
|
||||
fileString += "<string>" + uuidv4() + "</string>\n";
|
||||
fileString += "<key>PayloadVersion</key>\n";
|
||||
fileString += "<integer>1</integer>\n";
|
||||
fileString += "</dict>\n";
|
||||
fileString += "</plist>";
|
||||
|
||||
var blob = new Blob([fileString], { type: "text/plain;charset=utf-8" });
|
||||
|
||||
deleteAllCookies();
|
||||
|
||||
saveAs(blob, "dns.mobileconfig");
|
||||
return "";
|
||||
}
|
||||
|
||||
|
||||
function addToList(runningNo) {
|
||||
if (document.getElementById("dot").checked && document.getElementById("serverUrl").value.includes(":")) {
|
||||
alert("Entering custom ports (e.g. :853) for DoT is not supported. Please remove it.");
|
||||
} else {
|
||||
var successString = "Configuration successfully edited.";
|
||||
var edit = true;
|
||||
|
||||
if (runningNo === undefined) {
|
||||
edit = false;
|
||||
successString = "Configuration successfully added to profile.";
|
||||
|
||||
runningNo = getCookie("runningNo");
|
||||
if (getCookie("runningNo") == "") {
|
||||
runningNo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (86400000)); //expires in 24h
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
document.cookie = runningNo + "provName=" + encodeURIComponent(document.getElementById("provName").value) + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "doh=" + document.getElementById("doh").checked + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns1v4=" + document.getElementById("dns1v4").value + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns2v4=" + document.getElementById("dns2v4").value + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns1v6=" + document.getElementById("dns1v6").value + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns2v6=" + document.getElementById("dns2v6").value + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "serverUrl=" + document.getElementById("serverUrl").value + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "exclWifi=" + encodeURIComponent(document.getElementById("exclWifi").value) + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "useWifi=" + document.getElementById("useWifi").checked + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "useCell=" + document.getElementById("useCell").checked + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "lockProfile=" + document.getElementById("lockProfile").checked + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
if (edit === false) {
|
||||
runningNo = parseInt(runningNo) + 1;
|
||||
document.cookie = "runningNo=" + runningNo + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
}
|
||||
|
||||
alert(successString);
|
||||
window.location.href = 'finalize.html';
|
||||
}
|
||||
}
|
||||
|
||||
function switchToHTTPS() {
|
||||
document.getElementById("serverUrl").placeholder = "https://example.com/query" + document.getElementById("serverUrl").value;
|
||||
document.getElementById("dohdotServerLabel").innerHTML = "DoH server URL:";
|
||||
}
|
||||
|
||||
function switchToTLS() {
|
||||
document.getElementById("serverUrl").placeholder = "dot.example.com";
|
||||
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) {
|
||||
adv.className += " w3-show";
|
||||
adv.previousElementSibling.className = adv.previousElementSibling.className.replace("w3-dark-grey", "w3-black");
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
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) {
|
||||
var profile = plist.parse(uploadedProfile);
|
||||
|
||||
if (profile.PayloadContent.length > 1) {
|
||||
for (let index = 0; index < profile.PayloadContent.length; index++) {
|
||||
loadConfigToCookie(profile, index);
|
||||
}
|
||||
window.location.href = 'finalize.html';
|
||||
} else {
|
||||
loadSimpleProfile(profile);
|
||||
}
|
||||
}
|
||||
|
||||
function loadConfigToCookie(profile, index) {
|
||||
if (index === undefined) {
|
||||
console.error("Couldn't load config, index is undefined!");
|
||||
} else {
|
||||
runningNo = getCookie("runningNo");
|
||||
if (getCookie("runningNo") == "") {
|
||||
runningNo = 0;
|
||||
}
|
||||
|
||||
var d = new Date();
|
||||
d.setTime(d.getTime() + (86400000)); //expires in 24h
|
||||
var expires = "expires=" + d.toUTCString();
|
||||
document.cookie = runningNo + "provName=" + encodeURIComponent(profile.PayloadContent[index].PayloadDisplayName) + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
if (profile.PayloadContent[index].DNSSettings.DNSProtocol == "HTTPS") {
|
||||
document.cookie = runningNo + "doh=true;" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "serverUrl=" + profile.PayloadContent[index].DNSSettings.ServerURL + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
} else {
|
||||
document.cookie = runningNo + "doh=false;" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "serverUrl=" + profile.PayloadContent[index].DNSSettings.ServerName + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
}
|
||||
|
||||
var dns1v4 = "";
|
||||
var dns2v4 = "";
|
||||
var dns1v6 = "";
|
||||
var dns2v6 = "";
|
||||
const serverAddresses = profile.PayloadContent[index].DNSSettings.ServerAddresses;
|
||||
if (serverAddresses) {
|
||||
var dns4count = 0;
|
||||
var dns6count = 0;
|
||||
for (let index = 0; index < serverAddresses.length; index++) {
|
||||
if (serverAddresses[index].includes(":")) {
|
||||
if (dns6count == 0) {
|
||||
dns1v6 = serverAddresses[index];
|
||||
} else {
|
||||
dns2v6 = serverAddresses[index];
|
||||
}
|
||||
dns6count++;
|
||||
} else if (serverAddresses[index].includes(".")) {
|
||||
if (dns4count == 0) {
|
||||
dns1v4 = serverAddresses[index];
|
||||
} else {
|
||||
dns2v4 = serverAddresses[index];
|
||||
}
|
||||
dns4count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
document.cookie = runningNo + "dns1v4=" + dns1v4 + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns2v4=" + dns2v4 + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns1v6=" + dns1v6 + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "dns2v6=" + dns2v6 + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
var exclWifi = "";
|
||||
var useWifi;
|
||||
var useCell;
|
||||
if (profile.PayloadContent[index].OnDemandRules) {
|
||||
profile.PayloadContent[index].OnDemandRules.forEach(rule => {
|
||||
if (rule.InterfaceTypeMatch == "WiFi") {
|
||||
if (rule.Action == "Connect") {
|
||||
useWifi = true;
|
||||
} else {
|
||||
useWifi = false;
|
||||
}
|
||||
} else if (rule.InterfaceTypeMatch == "Cellular") {
|
||||
if (rule.Action == "Connect") {
|
||||
useCell = true;
|
||||
} else {
|
||||
useCell = false;
|
||||
}
|
||||
} else if (rule.SSIDMatch) {
|
||||
rule.SSIDMatch.forEach(ssid => {
|
||||
if (exclWifi != "") {
|
||||
exclWifi += ", "
|
||||
}
|
||||
exclWifi += ssid;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
document.cookie = runningNo + "exclWifi=" + encodeURIComponent(exclWifi) + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "useWifi=" + useWifi + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
document.cookie = runningNo + "useCell=" + useCell + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
document.cookie = runningNo + "lockProfile=" + profile.PayloadContent[index].ProhibitDisablement + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
|
||||
runningNo = parseInt(runningNo) + 1;
|
||||
document.cookie = "runningNo=" + runningNo + ";" + expires + ";path=/; SameSite=Strict; Secure";
|
||||
}
|
||||
}
|
||||
|
||||
function loadSimpleProfile(profile) {
|
||||
//Name
|
||||
document.getElementById("provName").value = profile.PayloadContent[0].PayloadDisplayName;
|
||||
|
||||
//Protocol and URL/ServerName
|
||||
if (profile.PayloadContent[0].DNSSettings.DNSProtocol == "HTTPS") {
|
||||
document.getElementById("doh").checked = true;
|
||||
document.getElementById("serverUrl").value = profile.PayloadContent[0].DNSSettings.ServerURL;
|
||||
} else if (profile.PayloadContent[0].DNSSettings.DNSProtocol == "TLS") {
|
||||
document.getElementById("dot").checked = true;
|
||||
document.getElementById("serverUrl").value = profile.PayloadContent[0].DNSSettings.ServerName;
|
||||
}
|
||||
|
||||
//ServerAddresses, if applicable
|
||||
const serverAddresses = profile.PayloadContent[0].DNSSettings.ServerAddresses;
|
||||
if (serverAddresses) {
|
||||
var dns4count = 0;
|
||||
var dns6count = 0;
|
||||
for (let index = 0; index < serverAddresses.length; index++) {
|
||||
if (serverAddresses[index].includes(":")) {
|
||||
if (dns6count == 0) {
|
||||
document.getElementById("dns1v6").value = serverAddresses[index];
|
||||
} else {
|
||||
document.getElementById("dns2v6").value = serverAddresses[index];
|
||||
}
|
||||
dns6count++;
|
||||
} else if (serverAddresses[index].includes(".")) {
|
||||
if (dns4count == 0) {
|
||||
document.getElementById("dns1v4").value = serverAddresses[index];
|
||||
} else {
|
||||
document.getElementById("dns2v4").value = serverAddresses[index];
|
||||
}
|
||||
dns4count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Profile locked?
|
||||
document.getElementById("lockProfile").checked = profile.PayloadContent[0].ProhibitDisablement;
|
||||
|
||||
//Allow Wi-Fi and Cellular, check for excluded SSIDs
|
||||
if (profile.PayloadContent[0].OnDemandRules) {
|
||||
profile.PayloadContent[0].OnDemandRules.forEach(rule => {
|
||||
if (rule.InterfaceTypeMatch == "WiFi") {
|
||||
if (rule.Action == "Connect") {
|
||||
document.getElementById("useWifi").checked = true;
|
||||
} else {
|
||||
document.getElementById("useWifi").checked = false;
|
||||
}
|
||||
} else if (rule.InterfaceTypeMatch == "Cellular") {
|
||||
if (rule.Action == "Connect") {
|
||||
document.getElementById("useCell").checked = true;
|
||||
} else {
|
||||
document.getElementById("useCell").checked = false;
|
||||
}
|
||||
} else if (rule.SSIDMatch) {
|
||||
rule.SSIDMatch.forEach(ssid => {
|
||||
if (document.getElementById("exclWifi").value != "") {
|
||||
document.getElementById("exclWifi").value += ", "
|
||||
}
|
||||
document.getElementById("exclWifi").value += ssid;
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function checkLoadEdit() {
|
||||
var index = getCookie("editSelected");
|
||||
document.cookie = "editSelected=;expires=Thu, 01 Jan 1970 00:00:00 GMT; SameSite=Strict; Secure"; //Delete cookie
|
||||
|
||||
if (index != "") {
|
||||
loadSaved(index);
|
||||
document.getElementById("btn_addToProfile").value = "Confirm edit";
|
||||
document.getElementById("mainForm").action = "javascript:addToList(" + index + ")";
|
||||
}
|
||||
}
|
||||
|
||||
function loadSaved(selectedIndex) {
|
||||
document.getElementById("provName").value = getCookie(selectedIndex + "provName");
|
||||
if (getCookie(selectedIndex + "doh") === "true") {
|
||||
document.getElementById("doh").checked = true;
|
||||
} else {
|
||||
document.getElementById("dot").checked = true;
|
||||
}
|
||||
document.getElementById("dns1v4").value = getCookie(selectedIndex + "dns1v4");
|
||||
document.getElementById("dns2v4").value = getCookie(selectedIndex + "dns2v4");
|
||||
document.getElementById("dns1v6").value = getCookie(selectedIndex + "dns1v6");
|
||||
document.getElementById("dns2v6").value = getCookie(selectedIndex + "dns2v6");
|
||||
document.getElementById("serverUrl").value = getCookie(selectedIndex + "serverUrl");
|
||||
document.getElementById("exclWifi").value = getCookie(selectedIndex + "exclWifi");
|
||||
document.getElementById("useWifi").checked = (getCookie(selectedIndex + "useWifi") === "true");
|
||||
document.getElementById("useCell").checked = (getCookie(selectedIndex + "useCell") === "true");
|
||||
document.getElementById("lockProfile").checked = (getCookie(selectedIndex + "lockProfile") === "true");
|
||||
}
|
20
legal.html
|
@ -6,17 +6,28 @@
|
|||
<title>DNS Profile Creator</title>
|
||||
<link rel="stylesheet" href="css/w3.css">
|
||||
<link rel="stylesheet" href="css/dark-mode.css">
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#8bc4ff">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
<body class="w3-container">
|
||||
<h1>Secure DNS profile creator</h1>
|
||||
<h2>For iOS 14 or later and macOS Big Sur or later</h2>
|
||||
|
||||
<div class="w3-bar w3-border bar-color">
|
||||
<a href="/index.html" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="/tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="/premades.html" class="w3-bar-item w3-button w3-mobile">Pre-made profiles</a>
|
||||
<a href="index.html" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="finalize.html" class="w3-bar-item w3-button w3-mobile">Finalize</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig" class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="/legal.html" class="w3-bar-item w3-button w3-right w3-green w3-mobile">Legal</a>
|
||||
<a href="legal.html" class="w3-bar-item w3-button w3-right w3-green w3-mobile">Legal</a>
|
||||
<a href="https://encrypted-dns.party/" target="_blank" class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted DNS Party</a>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
@ -25,6 +36,7 @@
|
|||
<ul>
|
||||
<li>Eli Grey: <a href="https://github.com/eligrey/FileSaver.js" target="_blank">FileSaver.js</a>, <a href="https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md">MIT License</a></li>
|
||||
<li>uuidjs: <a href="https://github.com/uuidjs/uuid">UUID JavaScript library</a>, <a href="https://github.com/uuidjs/uuid/blob/master/LICENSE.md">MIT License</a></li>
|
||||
<li>plist.js: <a href="https://github.com/TooTallNate/plist.js">PLIST JavaScript library</a>, <a href="https://github.com/TooTallNate/plist.js/blob/master/LICENSE">MIT License</a></li>
|
||||
<li>Paul Miller: <a href="https://github.com/paulmillr/encrypted-dns">encrypted-dns</a> (reference), <a href="https://github.com/paulmillr/encrypted-dns/blob/master/LICENSE">The Unlicense</a></li>
|
||||
<li>w3schools.com: <a href="https://www.w3schools.com/w3css/">w3.css</a>, Public Domain</li>
|
||||
</ul>
|
||||
|
|
175
premades.html
|
@ -1,175 +0,0 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<title>DNS Profile Creator</title>
|
||||
<link rel="stylesheet" href="css/w3.css">
|
||||
<link rel="stylesheet" href="css/dark-mode.css">
|
||||
<script src="js/listPage.js"></script>
|
||||
</head>
|
||||
<body class="w3-container">
|
||||
<h1>Secure DNS profile creator</h1>
|
||||
<h2>For iOS 14 or later and macOS Big Sur or later</h2>
|
||||
|
||||
<div class="w3-bar w3-border bar-color">
|
||||
<a href="/index.html" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="/tool.html" class="w3-bar-item w3-button w3-mobile">Tool</a>
|
||||
<a href="/premades.html" class="w3-bar-item w3-button w3-green w3-mobile">Pre-made profiles</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig" class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="/legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<h3>Submit a new configuration</h3>
|
||||
<p>If you want to submit a new configuration to include here, please submit all necessary data using <a href="https://forms.gle/BdMc2abzpNGpRLJ46" target="_blank">this form</a>.</p>
|
||||
|
||||
<h3>Pre-made configurations</h3>
|
||||
<button onclick="accToggle('adguard')" class="w3-button w3-block w3-left-align w3-green">AdGuard</button>
|
||||
<div id="adguard" class="w3-hide">
|
||||
<p><a href="https://adguard.com/en/adguard-dns/overview.html" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://adguard.com/en/privacy/dns.html" target="_blank">Some</a><br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<p>Adblocker</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard', true, '94.140.14.14', '94.140.15.15', '2a10:50c0::ad1:ff', '2a10:50c0::ad2:ff', 'https://dns.adguard.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard', false, '94.140.14.14', '94.140.15.15', '2a10:50c0::ad1:ff', '2a10:50c0::ad2:ff', 'dns.adguard.com');">Import DoT</button>
|
||||
<h3>Family configuration</h3>
|
||||
<p>Adblocker and adult content blocker</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard Family', true, '94.140.14.15', '94.140.15.16', '2a10:50c0::bad1:ff', '2a10:50c0::bad2:ff', 'https://dns-family.adguard.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard Family', false, '94.140.14.15', '94.140.15.16', '2a10:50c0::bad1:ff', '2a10:50c0::bad2:ff', 'dns-family.adguard.com');">Import DoT</button>
|
||||
<h3>No-Filter configuration</h3>
|
||||
<p>Encrypted DNS without any filters</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard No-Filter', true, '94.140.14.140', '94.140.14.141', '2a10:50c0::1:ff', '2a10:50c0::2:ff', 'https://dns-unfiltered.adguard.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard No-Filter', false, '94.140.14.140', '94.140.14.141', '2a10:50c0::1:ff', '2a10:50c0::2:ff', 'dns-unfiltered.adguard.com');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('applied-privacy')" class="w3-button w3-block w3-left-align w3-green">Applied Privacy</button>
|
||||
<div id="applied-privacy" class="w3-hide">
|
||||
<p><a href="https://applied-privacy.net/services/dns/" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://applied-privacy.net/privacy-policy/" target="_blank">Some</a><br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Applied Privacy', true, '', '', '', '', 'https://doh.applied-privacy.net/query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('AdGuard', false, '146.255.56.98', '', '2a02:1b8:10:234::2', '', 'dns.adguard.com');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('blahdns')" class="w3-button w3-block w3-left-align w3-green">BlahDNS</button>
|
||||
<div id="blahdns" class="w3-hide">
|
||||
<p><a href="https://blahdns.com/" target="_blank">Homepage</a><br>
|
||||
Logging: None<br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Adblock</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Adblock', true, '', '', '', '', 'https://doh1.blahdns.com/dns-query');">Import DoH Server 1</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Adblock', true, '', '', '', '', 'https://doh2.blahdns.com/dns-query');">Import DoH Server 2</button>
|
||||
<h3>Uncensor</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Uncensor', true, '', '', '', '', 'https://doh1.blahdns.com/uncensor');">Import DoH Server 1</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Uncensor', true, '', '', '', '', 'https://doh2.blahdns.com/uncensor');">Import DoH Server 2</button>
|
||||
<h3>Location: Japan</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Japan', true, '', '', '', '', 'https://doh-jp.blahdns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Japan', false, '45.32.55.94', '', '2001:19f0:7001:3259:5400:02ff:fe71:0bc9', '', 'dot-jp.blahdns.com');">Import DoT</button>
|
||||
<h3>Location: Singapore</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Singapore', true, '', '', '', '', 'https://doh-sg.blahdns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Singapore', false, '139.180.141.57', '', '2001:19f0:4400:6bed:5400:2ff:feb1:f9fa', '', 'dot-sg.blahdns.com');">Import DoT</button>
|
||||
<h3>Location: Germany</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Germany', true, '', '', '', '', 'https://doh-de.blahdns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Germany', false, '45.32.55.94', '', '2001:19f0:7001:3259:5400:02ff:fe71:0bc9', '', 'dot-jp.blahdns.com');">Import DoT</button>
|
||||
<h3>Location: Finland</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Finland', true, '', '', '', '', 'https://doh-fi.blahdns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('BlahDNS Finland', false, '95.216.212.177', '', '2a01:4f9:c010:43ce::1', '', 'dot-fi.blahdns.com');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('cloudflare')" class="w3-button w3-block w3-left-align w3-green">Cloudflare</button>
|
||||
<div id="cloudflare" class="w3-hide">
|
||||
<p><a href="https://1.1.1.1/dns/" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://developers.cloudflare.com/1.1.1.1/privacy/public-dns-resolver">Some</a><br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare', true, '1.1.1.1', '1.0.0.1', '2606:4700:4700::1111', '2606:4700:4700::1001', 'https://cloudflare-dns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare', false, '1.1.1.1', '1.0.0.1', '2606:4700:4700::1111', '2606:4700:4700::1001', 'cloudflare-dns.com');">Import DoT</button>
|
||||
<h3>Security configuration</h3>
|
||||
<p>Blocks known malicious sites.</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare Security', true, '1.1.1.2', '1.0.0.2', '2606:4700:4700::1112', '2606:4700:4700::1002', 'https://security.cloudflare-dns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare Security', false, '1.1.1.2', '1.0.0.2', '2606:4700:4700::1112', '2606:4700:4700::1002', 'security.cloudflare-dns.com');">Import DoT</button>
|
||||
<h3>Family configuration</h3>
|
||||
<p>Blocks known malicious and adult sites.</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare Family', true, '1.1.1.3', '1.0.0.3', '2606:4700:4700::1113', '2606:4700:4700::1003', 'https://family.cloudflare-dns.com/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Cloudflare Family', false, '1.1.1.3', '1.0.0.3', '2606:4700:4700::1113', '2606:4700:4700::1003', 'family.cloudflare-dns.com');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('google')" class="w3-button w3-block w3-left-align w3-green">Google</button>
|
||||
<div id="google" class="w3-hide">
|
||||
<p><a href="https://developers.google.com/speed/public-dns/" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://developers.google.com/speed/public-dns/privacy">Yes</a><br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Google', true, '8.8.8.8', '8.8.4.4', '2001:4860:4860::8888', '2001:4860:4860::8844', 'https://dns.google/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Google', false, '8.8.8.8', '8.8.4.4', '2001:4860:4860::8888', '2001:4860:4860::8844', 'dns.google');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('libredns')" class="w3-button w3-block w3-left-align w3-green">LibreDNS</button>
|
||||
<div id="libredns" class="w3-hide">
|
||||
<p><a href="https://libredns.gr/" target="_blank">Homepage</a><br>
|
||||
Logging: No<br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('LibreDNS', true, '', '', '', '', 'https://doh.libredns.gr/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('LibreDNS', false, '116.202.176.26', '', '', '', 'dot.libredns.gr');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('opendns')" class="w3-button w3-block w3-left-align w3-green">OpenDNS</button>
|
||||
<div id="opendns" class="w3-hide">
|
||||
<p><a href="https://support.opendns.com/hc/en-us/articles/360038086532-Using-DNS-over-HTTPS-DoH-with-OpenDNS" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://www.cisco.com/c/en/us/about/legal/privacy-full.html">Some</a><br>
|
||||
Protocols: DoH</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('OpenDNS', true, '208.67.222.222', '208.67.220.220', '2620:119:35::35', '2620:119:53::53', 'https://doh.opendns.com/dns-query');">Import</button>
|
||||
<h3>Family configuration</h3>
|
||||
<p>Blocks known adult sites.</p>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('OpenDNS Family', true, '208.67.222.123', '208.67.220.123', '2620:119:35::123', '2620:119:53::123 ', 'https://doh.familyshield.opendns.com/dns-query');">Import</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('powerdns')" class="w3-button w3-block w3-left-align w3-green">PowerDNS</button>
|
||||
<div id="powerdns" class="w3-hide">
|
||||
<p><a href="https://powerdns.org/" target="_blank">Homepage</a><br>
|
||||
Logging: No<br>
|
||||
Protocols: DoH</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('PowerDNS', true, '', '', '', '', 'https://doh.powerdns.org/');">Import</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('quad9')" class="w3-button w3-block w3-left-align w3-green">Quad9</button>
|
||||
<div id="quad9" class="w3-hide">
|
||||
<p><a href="https://quad9.net/" target="_blank">Homepage</a><br>
|
||||
Logging: <a href="https://quad9.net/policy/">Some</a><br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Quad9', true, '9.9.9.9', '149.112.112.112', '2620:fe::fe', '2620:fe::9', 'https://dns.quad9.net/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Quad9', false, '9.9.9.9', '149.112.112.112', '2620:fe::fe', '2620:fe::9', 'dns.quad9.net');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('snopyta')" class="w3-button w3-block w3-left-align w3-green">Snopyta</button>
|
||||
<div id="snopyta" class="w3-hide">
|
||||
<p><a href="https://snopyta.org/service/dns/" target="_blank">Homepage</a><br>
|
||||
Logging: No<br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Default configuration</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Snopyta', true, '', '', '', '', 'https://fi.doh.dns.snopyta.org/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('Snopyta', false, '95.216.24.230', '', '2a01:4f9:2a:1919::9301', '', 'fi.dot.dns.snopyta.org');">Import DoT</button>
|
||||
</div>
|
||||
<br>
|
||||
<button onclick="accToggle('uncensoreddns')" class="w3-button w3-block w3-left-align w3-green">UncensoredDNS</button>
|
||||
<div id="uncensoreddns" class="w3-hide">
|
||||
<p><a href="https://blog.uncensoreddns.org/dns-servers/" target="_blank">Homepage</a><br>
|
||||
Logging: No<br>
|
||||
Protocols: DoH, DoT</p>
|
||||
<h3>Anycast</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('UncensoredDNS', true, '91.239.100.100', '', '2001:67c:28a4::', '', 'https://anycast.uncensoreddns.org/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('UncensoredDNS', false, '91.239.100.100', '', '2001:67c:28a4::', '', 'anycast.censurfridns.dk');">Import DoT</button>
|
||||
<h3>Unicast</h3>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('UncensoredDNS', true, '89.233.43.71', '', '2a01:3a0:53:53::', '', 'https://unicast.uncensoreddns.org/dns-query');">Import DoH</button>
|
||||
<button class="w3-button w3-dark-gray" onclick="createCookie ('UncensoredDNS', false, '89.233.43.71', '', '2a01:3a0:53:53::', '', 'unicast.censurfridns.dk');">Import DoT</button>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
55
tool.html
|
@ -1,5 +1,6 @@
|
|||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
|
@ -7,27 +8,40 @@
|
|||
<link rel="stylesheet" href="css/w3.css">
|
||||
<link rel="stylesheet" href="css/form.css">
|
||||
<link rel="stylesheet" href="css/dark-mode.css">
|
||||
<script src="js/FileSaver.min.js"></script>
|
||||
<script src="js/uuidv4.min.js"></script>
|
||||
<script src="js/plist.js"></script>
|
||||
<script src="js/tool.js"></script>
|
||||
|
||||
<link rel="apple-touch-icon" sizes="180x180" href="/icons/apple-touch-icon.png">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/icons/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/icons/favicon-16x16.png">
|
||||
<link rel="manifest" href="/icons/site.webmanifest">
|
||||
<link rel="mask-icon" href="/icons/safari-pinned-tab.svg" color="#8bc4ff">
|
||||
<link rel="shortcut icon" href="/icons/favicon.ico">
|
||||
<meta name="msapplication-TileColor" content="#2b5797">
|
||||
<meta name="msapplication-config" content="/icons/browserconfig.xml">
|
||||
<meta name="theme-color" content="#ffffff">
|
||||
</head>
|
||||
<body class="w3-container" onload="loadPremade()">
|
||||
|
||||
<body class="w3-container" onload="checkLoadEdit()">
|
||||
<h1>Secure DNS profile creator</h1>
|
||||
<h2>For iOS 14 or later and macOS Big Sur or later</h2>
|
||||
|
||||
|
||||
<div class="w3-bar w3-border bar-color">
|
||||
<a href="/" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="/tool.html" class="w3-bar-item w3-button w3-green w3-mobile">Tool</a>
|
||||
<a href="/premades.html" class="w3-bar-item w3-button w3-mobile">Pre-made profiles</a>
|
||||
<a href="index.html" class="w3-bar-item w3-button w3-mobile">About</a>
|
||||
<a href="tool.html" class="w3-bar-item w3-button w3-green w3-mobile">Tool</a>
|
||||
<a href="finalize.html" class="w3-bar-item w3-button w3-mobile">Finalize</a>
|
||||
<a href="https://github.com/fyr77/dns-mobileconfig" class="w3-bar-item w3-button w3-right w3-black w3-mobile">GitHub</a>
|
||||
<a href="/legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
<a href="legal.html" class="w3-bar-item w3-button w3-right w3-black w3-mobile">Legal</a>
|
||||
<a href="https://encrypted-dns.party/" target="_blank" class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted DNS Party</a>
|
||||
</div>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<h4><a href="/premades.html">Choose a pre-configured provider</a>, or enter your own settings:</h4>
|
||||
|
||||
<form action="javascript:saveDynamicDataToFile()">
|
||||
|
||||
<h4>Upload a pre-configured profile: <input type="file" id="fileupload" onchange="getDataFromUpload()"></h4>
|
||||
<h4>or enter your own settings:</h4>
|
||||
|
||||
<form id="mainForm" action="javascript:addToList()">
|
||||
<p>
|
||||
<label for="provName">Name of DNS provider:</label>
|
||||
<input type="text" id="provName" placeholder="MyCoolSecureProvider" required>
|
||||
|
@ -44,9 +58,11 @@
|
|||
<label for="dns2v4" class="optional">IPv4 secondary DNS:</label>
|
||||
<input type="text" id="dns2v4" placeholder="0.0.0.1">
|
||||
<label for="dns1v6" class="optional">IPv6 primary DNS:</label>
|
||||
<input type="text" id="dns1v6" placeholder="0000:0000:0000:0000:0000:0000:0000:0000 - other formats also accepted">
|
||||
<input type="text" id="dns1v6"
|
||||
placeholder="0000:0000:0000:0000:0000:0000:0000:0000 - other formats also accepted">
|
||||
<label for="dns2v6" class="optional">IPv6 secondary DNS:</label>
|
||||
<input type="text" id="dns2v6" placeholder="0000:0000:0000:0000:0000:0000:0000:0001 - other formats also accepted">
|
||||
<input type="text" id="dns2v6"
|
||||
placeholder="0000:0000:0000:0000:0000:0000:0000:0001 - other formats also accepted">
|
||||
</p>
|
||||
<p>
|
||||
<label for="serverUrl" id="dohdotServerLabel">DoH server URL:</label>
|
||||
|
@ -57,10 +73,11 @@
|
|||
<p>
|
||||
<label for="exclWifi" class="optional">Excluded Wi-Fi Networks:</label>
|
||||
<input type="text" id="exclWifi" placeholder="MyHomeNetwork, Silence of the LANs">
|
||||
<span style="color: grey">Enter a comma-separated list of Wi-Fi networks (SSID) on which the encrypted DNS will be disabled.</span>
|
||||
<span style="color: grey">Enter a comma-separated list of Wi-Fi networks (SSID) on which the encrypted
|
||||
DNS will be disabled.</span>
|
||||
</p>
|
||||
<p>
|
||||
Interfaces to use encrypted DNS on:
|
||||
Interfaces to use encrypted DNS on:
|
||||
<label for="useWifi">Wi-Fi</label>
|
||||
<input type="checkbox" id="useWifi" checked>
|
||||
<label for="useCell">Cellular</label>
|
||||
|
@ -72,10 +89,12 @@
|
|||
<label for="lockProfile">Prohibit Disablement</label>
|
||||
<input type="checkbox" id="lockProfile">
|
||||
<br>
|
||||
<span style="color: grey">Prohibit users from removing the profile. Only available on supervised devices.</span>
|
||||
<span style="color: grey">Prohibit users from removing the profile. Only available on supervised
|
||||
devices.</span>
|
||||
</p>
|
||||
</div>
|
||||
<p><input type="submit" class="button1" value="Download profile"></p>
|
||||
<p><input id="btn_addToProfile" type="submit" value="Add to profile"></p>
|
||||
</form>
|
||||
</body>
|
||||
|
||||
</html>
|