OnDemand with .mobileconfig on AdGuard Home


New Member
I've setup a Raspberry Pi with AdGuard Home. I've installed a certificate for encryption and I've generated and iOS profile.mobileconfig for my iPhone so I use DNS over HTTPS when I'm away from my network.
Everything is working perfectly fine as is but for performance reason I would love to use directly my Raspberry Pi AdGuard Home instance when connected to my network and not the DNS over HTTPS of my config (since it goes through the internet and back right?)
Is there anyway to use the DNS over HTTPS when away from the network but access directly and local my AdGuard Home instance when I'm connected to my own network at home ?

Cheers !