Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.mobileconfig generator #2110

Closed
ammnt opened this issue Sep 17, 2020 · 4 comments
Closed

.mobileconfig generator #2110

ammnt opened this issue Sep 17, 2020 · 4 comments
Assignees
Milestone

Comments

@ammnt
Copy link

ammnt commented Sep 17, 2020

Hello,

as you know, new versions of iOS and macOS support DNS encryption by native. But to do this, we need to generate a configuration file in a special format (.mobileconfig). Here is an example of such a file:
https://www.reddit.com/r/MacOSBeta/comments/i21e59/how_to_set_up_cloudflare_dns_over_tls_secure_dns/

Is it possible to add the function of its generation and download in the section with settings? What do you think about this feature?

Thank you.
Cheers!🤘

@ameshkov
Copy link
Member

ameshkov commented Sep 17, 2020

What we should do:

  1. Add a mobile profile generator URLs:
    • https://aghome/apple/dot.mobileconfig
    • https://aghome/apple/doh.mobileconfig
  2. These URLs should be available to authorized users only
  3. These links are only available if encryption is configured
  4. We should add these links to the Setup guide.

Here's how mobileconfig looks like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>PayloadContent</key>
	<array>
        <dict>
            <key>Name</key>
            <string>AdGuard DNS over HTTPS</string>
            <key>PayloadDescription</key>
            <string>Configures device to use AdGuard DNS</string>
            <key>PayloadDisplayName</key>
            <string>AdGuard DNS</string>
            <key>PayloadIdentifier</key>
            <string>com.apple.dnsSettings.managed.767A11FC-31D2-4950-815E-B37B15448CA2</string>
            <key>PayloadType</key>
            <string>com.apple.dnsSettings.managed</string>
            <key>PayloadUUID</key>
            <string>767A11FC-31D2-4950-815E-B37B15448CA2</string>
            <key>PayloadVersion</key>
            <integer>1</integer>
            <key>DNSSettings</key>
            <dict>
                <key>DNSProtocol</key>
                <string>HTTPS</string>
                <key>ServerURL</key>
                <string>https://dns.adguard.com/dns-query</string>
            </dict>
        </dict>
    </array>
	<key>PayloadDescription</key>
	<string>Adds AdGuard DNS toBig Sur and iOS 14 or newer systems</string>
	<key>PayloadDisplayName</key>
	<string>AdGuard DNS</string>
	<key>PayloadIdentifier</key>
    <string>E3E3CB8B-C59E-486B-A713-D765328DB2A2</string>
	<key>PayloadRemovalDisallowed</key>
	<false/>
	<key>PayloadType</key>
	<string>Configuration</string>
	<key>PayloadUUID</key>
	<string>F2609BEA-93D6-4966-8487-33713DBCB644</string>
	<key>PayloadVersion</key>
	<integer>1</integer>
</dict>
</plist>

For DOT it looks like this:

                <key>DNSProtocol</key>
                <string>TLS</string>
                <key> ServerName</key>
                <string>dns.adguard.com</string>

@ammnt
Copy link
Author

ammnt commented Sep 17, 2020

@ameshkov, thanks for the answer! For DoT it has to be <key>ServerName</key> string, not <key>ServerURL</key>, i suppose. NextDNS have already implemented something like this and you can see how it works with them.

And we will need to consider one more thing for the future - these are clients identifiers and their indication in .mobileconfig. It must be dynamic variables <key>ServerURL</key> and <key>ServerName</key>, i think? NextDNS don't have this yet🙃

@ammnt
Copy link
Author

ammnt commented Oct 5, 2020

@ameshkov, please also pay attention that this will allow us to identify the device model too (iphone, macbook, ipad etc.). Can't this profile be signed by your developer certificate?

@ameshkov
Copy link
Member

ameshkov commented Oct 5, 2020

please also pay attention that this will allow us to identify the device model too (iphone, macbook, ipad etc.).

Only in conjunction with #1383

Can't this profile be signed by your developer certificate?

We can't use our cert to sign third-parties' profiles.

@adguard adguard closed this as completed in 398da7e Oct 8, 2020
@ameshkov ameshkov modified the milestones: v0.105, v0.104 Oct 21, 2020
adguard pushed a commit that referenced this issue Dec 10, 2020
Close #2110

Squashed commit of the following:

commit 3a652a2
Merge: 5d0d6c5 65acfb7
Author: Andrey Meshkov <am@adguard.com>
Date:   Wed Oct 7 21:01:54 2020 +0300

    Merge branch 'master' into feature/2110

commit 5d0d6c5
Author: Andrey Meshkov <am@adguard.com>
Date:   Wed Oct 7 00:28:25 2020 +0300

    * (home): minor refactoring

commit e1d1025
Merge: f859ef1 fb7ca94
Author: Andrey Meshkov <am@adguard.com>
Date:   Wed Oct 7 00:18:46 2020 +0300

    Merge branch 'master' into feature/2110

commit f859ef1
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Tue Oct 6 19:30:18 2020 +0300

    Update ServerURL, generate all uniqie uuid

commit 3ce7c57
Merge: e80cf6d a7d2dd7
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Oct 2 18:46:03 2020 +0300

    Merge branch 'master' into feature/2110

commit e80cf6d
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Oct 2 18:33:12 2020 +0300

    Describe .mobileconfig in openapi, allow unauthorized access for .mobileconfig

commit 9887d18
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Oct 2 16:14:45 2020 +0300

    Change .mobileconfig generation

commit 5298dd7
Merge: cd4d1a7 128229a
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Oct 2 12:01:16 2020 +0300

    Merge branch 'master' into feature/2110

commit cd4d1a7
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Oct 1 23:10:14 2020 +0300

    Change dot and doh highlight in setup_dns_privacy_4 locale

commit 50e310e
Merge: 92e0e28 2f6f65a
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Thu Oct 1 23:05:45 2020 +0300

    Merge branch 'master' into feature/2110

commit 92e0e28
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Mon Sep 28 16:44:25 2020 +0300

    Add ServerAddresses property

commit c8c4cf8
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Mon Sep 28 13:51:53 2020 +0300

    Fix .mobileconfig display on SetupGuide

commit 9e4fad3
Author: ArtemBaskal <a.baskal@adguard.com>
Date:   Fri Sep 25 19:08:50 2020 +0300

    2110 + client, home: Generate .mobileconfig
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants