SpoofDPI
SpoofDPI copied to clipboard
chore: refactor dns
A minor refactoring of the DNS functionality has been completed. The dns.Resolve function had an unclear interface and primarily handled cross-cutting concerns (such as logging and error handling). A new entity, the DNS handler, has been introduced to manage these cross-cutting concerns. The advantage of this approach is the ability to dynamically add new cross-cutting logic (for example, dns caching) simply by adding a new handler to the chain. Please take a look.