AdguardTeam / dnsproxy

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

Clean up the system dns cache after dnsproxy starts successfully #305

Closed NPCDW closed 1 year ago

NPCDW commented 1 year ago

I set up two dns addresses, primary dns: 127.0.0.1, and backup dns: 192.168.0.1.

After turning off dnsproxy, the backup dns worked.

When I reopened dnsproxy, some websites were cached by the backup dns , did not pass the main dns.

When I execute the ipconfig /flushdns command, the primary dns started to work.

Proceed as follows:

  1. Close dnsproxy, then clear the system cache and open a new inprivate window and visit a website
  2. Open dnsproxy a. do not clean up the system cache, and then open a new inprivate window image b. clear the system cache, open a new inprivate window image
ameshkov commented 1 year ago

I don't think this should be a part of dnsproxy functionality.

Every OS provides a way to clear DNS cache, you should use it in your own scripts.