net/dns: factor directManager out over an FS interface

This is preliminary work for using the directManager as
part of a wslManager on windows, where in addition to configuring
windows we'll use wsl.exe to edit the linux file system and modify the
system resolv.conf.

The pinholeFS is a little funky, but it's designed to work through
simple unix tools via wsl.exe without invoking bash. I would not have
thought it would stand on its own like this, but it turns out it's
useful for writing a test for the directManager.

Signed-off-by: David Crawshaw <crawshaw@tailscale.com>
This commit is contained in:
David Crawshaw
2021-06-25 09:43:13 -07:00
committed by David Crawshaw
parent 506c2fe8e2
commit 9b063b86c3
6 changed files with 179 additions and 44 deletions

View File

@ -7,5 +7,5 @@ package dns
import "tailscale.com/types/logger"
func NewOSConfigurator(logger.Logf, string) (OSConfigurator, error) {
return newDirectManager()
return newDirectManager(), nil
}