Luci-app-https-dns-proxy Can you please tell me how to add two dns servers?

To add one server, for example google, I enter this

while uci -q delete https-dns-proxy.@https-dns-proxy[0]; do :; done
uci set https-dns-proxy.dns="https-dns-proxy"
uci set https-dns-proxy.dns.bootstrap_dns="8.8.8.8,8.8.4.4"
uci set https-dns-proxy.dns.resolver_url="https://dns.google/dns-query"
uci set https-dns-proxy.dns.listen_addr="127.0.0.1"
uci set https-dns-proxy.dns.listen_port="5053"
uci set https-dns-proxy.dns.user="nobody"
uci set https-dns-proxy.dns.group="nogroup"
uci commit https-dns-proxy
/etc/init.d/https-dns-proxy restart

And how to add a second dns manually via PuTTY ? I can't, tell me who knows.
I enter the second dns cloudflare and overwrites the first.
I understand that the point is in the first line, in the title, but I just don’t know how to do it right
uci set https-dns-proxy.dns="https-dns-proxy" ????

Option 1

Use a different name when creating the second section (e.g dns2).

uci set https-dns-proxy.dns2=https-dns-proxy
uci set https-dns-proxy.dns2.bootstrap_dns='1.1.1.1,1.0.0.1'
uci set https-dns-proxy.dns2.resolver_url='https://cloudflare-dns.com/dns-query'
uci set https-dns-proxy.dns2.listen_addr='127.0.0.1'
uci set https-dns-proxy.dns2.listen_port='5054'
uci set https-dns-proxy.dns2.user='nobody'
uci set https-dns-proxy.dns2.group='nogroup'

Option 2
Create an unnamed section for the second provider.

uci add https-dns-proxy https-dns-proxy
uci set https-dns-proxy.@https-dns-proxy[-1]=https-dns-proxy
uci set https-dns-proxy.@https-dns-proxy[-1].bootstrap_dns='1.1.1.1,1.0.0.1'
uci set https-dns-proxy.@https-dns-proxy[-1].resolver_url='https://cloudflare-dns.com/dns-query'
uci set https-dns-proxy.@https-dns-proxy[-1].listen_addr='127.0.0.1'
uci set https-dns-proxy.@https-dns-proxy[-1].listen_port='5054'
uci set https-dns-proxy.@https-dns-proxy[-1].user='nobody'
uci set https-dns-proxy.@https-dns-proxy[-1].group='nogroup'
2 Likes

Thanks a lot !

1 Like