add editor for single configs
This commit is contained in:
parent
b4881b8c7c
commit
430ae9d48b
6 changed files with 7503 additions and 29 deletions
|
@ -15,6 +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)
|
- Eli Grey for [FileSaver.js](https://github.com/eligrey/FileSaver.js)
|
||||||
- uuidjs for the [UUID JavaScript library](https://github.com/uuidjs/uuid)
|
- 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)
|
- 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
|
- nitrohorse for [encrypted-dns.party](https://encrypted-dns.party) and the profiles hosted there
|
14
index.html
14
index.html
|
@ -22,14 +22,17 @@
|
||||||
<a href="index.html" class="w3-bar-item w3-button w3-green w3-mobile">About</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="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="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="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/" class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted DNS Party</a>
|
<a href="https://encrypted-dns.party/" class="w3-bar-item w3-button w3-right w3-blue-grey w3-mobile">Encrypted
|
||||||
|
DNS Party</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br>
|
<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>
|
<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>
|
<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
|
<p>This website allows you to create configuration profiles for your Apple device to use the new built-in encrypted
|
||||||
|
@ -46,8 +49,9 @@
|
||||||
An app off the App Store might do what it should, sure. But it also might capture data inbetween and negate the
|
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>
|
privacy advantage that DoH and DoT bring.</p>
|
||||||
<h3>How do I use this?</h3>
|
<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
|
<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 "Download profile". Then, open the downloaded file using the "Files" app.
|
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>
|
<br>
|
||||||
Your device will ask you a few times, be sure to accept the warnings.<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>
|
<b>The generated profiles are not signed. This is normal.</b></p>
|
||||||
|
|
7391
js/plist.js
Normal file
7391
js/plist.js
Normal file
File diff suppressed because it is too large
Load diff
80
js/tool.js
80
js/tool.js
|
@ -15,6 +15,10 @@ function getCookie(cname) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function addToList() {
|
function addToList() {
|
||||||
|
if (document.getElementById("serverUrl").value.includes(":")) {
|
||||||
|
alert("Entering custom ports (e.g. :853) is not supported. Please remove it.");
|
||||||
|
}
|
||||||
|
else {
|
||||||
var runningNo = getCookie("runningNo");
|
var runningNo = getCookie("runningNo");
|
||||||
if (getCookie("runningNo") == "") {
|
if (getCookie("runningNo") == "") {
|
||||||
runningNo = 0;
|
runningNo = 0;
|
||||||
|
@ -40,6 +44,7 @@ function addToList() {
|
||||||
|
|
||||||
window.location.href = "finalize.html";
|
window.location.href = "finalize.html";
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
function switchToHTTPS() {
|
function switchToHTTPS() {
|
||||||
document.getElementById("serverUrl").placeholder = "https://example.com/query" + document.getElementById("serverUrl").value;
|
document.getElementById("serverUrl").placeholder = "https://example.com/query" + document.getElementById("serverUrl").value;
|
||||||
|
@ -77,6 +82,77 @@ function getDataFromUpload() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleProfileText(uploadedProfile) {
|
function handleProfileText(uploadedProfile) {
|
||||||
//TODO
|
var profile = plist.parse(uploadedProfile);
|
||||||
//Important: Handle missing info in file: alert and abort!
|
console.log(profile);
|
||||||
|
|
||||||
|
//Name
|
||||||
|
document.getElementById("provName").value = profile.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
|
||||||
|
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;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
|
@ -26,6 +26,7 @@
|
||||||
<ul>
|
<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>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>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>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>
|
<li>w3schools.com: <a href="https://www.w3schools.com/w3css/">w3.css</a>, Public Domain</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
<link rel="stylesheet" href="css/form.css">
|
<link rel="stylesheet" href="css/form.css">
|
||||||
<link rel="stylesheet" href="css/dark-mode.css">
|
<link rel="stylesheet" href="css/dark-mode.css">
|
||||||
<script src="js/uuidv4.min.js"></script>
|
<script src="js/uuidv4.min.js"></script>
|
||||||
|
<script src="js/plist.js"></script>
|
||||||
<script src="js/tool.js"></script>
|
<script src="js/tool.js"></script>
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue