WIP: rebase for 2026-05-18 #7

Draft
codinget wants to merge 234 commits from rebase/2026-05-18 into webnet
Showing only changes of commit 32f984f54c - Show all commits
+8 -1
View File
@@ -8,6 +8,7 @@ import (
"bytes"
"errors"
"fmt"
"io/fs"
"maps"
"net/netip"
"os"
@@ -246,7 +247,13 @@ func (m *windowsManager) setHosts(hosts []*HostEntry) error {
}
hostsFile := filepath.Join(systemDir, "drivers", "etc", "hosts")
b, err := os.ReadFile(hostsFile)
if err != nil {
switch {
case err == nil:
// Continue.
case errors.Is(err, fs.ErrNotExist):
// Non-fatal, we'll just create a new hosts file.
m.logf("failed to read the hosts file: %v", err)
default:
return err
}
outB, err := setTailscaleHosts(m.logf, b, hosts)