AdguardTeam / dnsproxy

Simple DNS proxy with DoH, DoT, DoQ and DNSCrypt support
Apache License 2.0
2.37k stars 246 forks source link

How do you run this in some kind of daemon mode? #232

Open flavorgold1 opened 2 years ago

flavorgold1 commented 2 years ago

I'm on Ubuntu Linux x64.

joshcangit commented 2 years ago

It's not possible. It needs to be able to build the DNS cache on its own. I've only managed to make it run after the DNS cache is built by systemd-resolved. However after boot up, DNS will never resolve because dnsproxy needs to have cache already available.

Lanius-collaris commented 2 years ago

It's not possible. It needs to be able to build the DNS cache on its own. I've only managed to make it run after the DNS cache is built by systemd-resolved. However after boot up, DNS will never resolve because dnsproxy needs to have cache already available.

The reason may be that dnsproxy can't get the IP of upstream. -b can specify bootstrap DNS, for example: -b 45.90.28.1:5353. You can also use DNS Stamp or some servers which have SSL certificates for IP address. dnsproxy has cache, use --cache to enable it.

joshcangit commented 2 years ago

No, I do use bootstrap addresses and enable cache for dnsproxy

Actually, I needed to modify /etc/resolv.conf for any listen address dnsproxy uses. https://github.com/AdguardTeam/dnsproxy/issues/275#issuecomment-1255806799

But now /etc/resolv.conf is locked by systemd-resolved and uneditable so yeah, it cannot work anymore.