0

Is there a way to create android app that imitates the old nextDNS app?

I'm developing an application similar to old nextDNS application for android. But with those endpoints that provided by setup tab, I can't make it working. Network connection works fine. whoismydns shows that I'm connected through next dns servers. But analytics tab show 0 queries.

Interesting thing I did similar things on iOS in Swift and it works perfectly due to allowance of controlling dns settings, but no luck with Kotlin.

If you are familiar with coding or deeper knowledge of how nextdns works under the hood, I would appreciate any help

Why I don't just use private dns settings of the phone settings?
I just  want to see analytics for each device I use. So feature "Send device name" is crucial.

Here's piece of code where I put ip's and establish connection.

            val localIpAddress = "10.0.0.1"
            val dnsIp = "ip of configId.dns.nextdns.io"
            val prefixLength = 24
            // Establish VPN session
            val builder = Builder()

            builder.addDnsServer(dnsIp)

            vpnInterface = builder
                .addAddress(localIpAddress, prefixLength)
                .addRoute("::", 0) // Redirect all traffic through VPN
                .setSession("DNS and VPN Connection")
                .setConfigureIntent(createConfigureIntent())
                .establish()

 

Reply

null

Content aside

  • 2 mths agoLast active
  • 32Views
  • 1 Following