You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
No. This is not an issue. The reason is that Go is garbage collected at runtime so when these go out of scope they're released, and since Go is compiled, performance isn't really an issue here.
And this is not even a cache. It's just that I wanted to use a singleton pattern for the DoH resolver. It could live perfectly fine not doing so.
No. This is not an issue. The reason is that Go is garbage collected at runtime so when these go out of scope they're released, and since Go is compiled, performance isn't really an issue here.
Yes, I meant using a singleton DNS client 🙂.
It might not be a significant issue now since you're using DNS over UDP. However, if you decide to add an option for DNS over TCP in the future, avoiding multiple handshakes and resource allocations could be beneficial.
I'll close the issue, thanks for the answer)
Hi there!
I see, that doh client is cached via sync.Once.
But custom dns client is created on every dns request.
WDYT if we will cache dns client too?
SpoofDPI/dns/dns.go
Line 58 in ab4d681
Assign me, if you think this is a good idea.
The text was updated successfully, but these errors were encountered: