Switching to DNSCrypt after captive portal?

Hi,
I carry a LEDE powered router and I want to have it switch over to DNSCrypt once I've logged into a captive portal. The actuall detection of internet connect will be fine however I'm finding issues with on the fly switch the dns server in dnsmasq.
Has anyone got any ideas on how I can switch to DNSCrypt once I've logged in to the captive portal? I'd like not to commit the uci config changes.
I want to do this switching in a script so it's "automagical".

Thanks

Not sure it'd work, just a wild guess -- run dnsmasq as the default DNS, set it to point to dnscrypt-proxy and set the captive portal server's IP address to resolve with a different server thru a dnsmasq setting.