miekg / dns

DNS library in Go
https://miek.nl/2014/august/16/go-dns-package
BSD 3-Clause "New" or "Revised" License
7.86k stars 1.12k forks source link

feat: add the ability to inject a custom dialcontext method #1548

Closed dpeckett closed 3 months ago

dpeckett commented 3 months ago

Add the ability to use a custom DialContext function, this allows bypassing the host networking stack (the original inspiration for this was a userspace vpn project I'm working on).

miekg commented 3 months ago

I don't see why this is needed when you can just use a net.Conn in most places?