fix(vpn): configure dns hosts with username (#16352)

Previously we were configuring using the display name of the user, which
may contain spaces, special characters, and isn't unique. This was
always supposed to be the username.
This commit is contained in:
Ethan
2025-01-31 14:08:57 +11:00
committed by GitHub
parent 6ea5c6f0ef
commit 49a2412206
2 changed files with 3 additions and 2 deletions

View File

@ -148,7 +148,7 @@ func (*client) NewConn(initCtx context.Context, serverURL *url.URL, token string
updatesCtrl := tailnet.NewTunnelAllWorkspaceUpdatesController(
options.Logger,
coordCtrl,
tailnet.WithDNS(conn, me.Name),
tailnet.WithDNS(conn, me.Username),
tailnet.WithHandler(options.UpdateHandler),
)
controller.WorkspaceUpdatesCtrl = updatesCtrl

View File

@ -5,10 +5,11 @@ package vpn
import (
"os"
"cdr.dev/slog"
"github.com/tailscale/wireguard-go/tun"
"golang.org/x/sys/unix"
"golang.org/x/xerrors"
"cdr.dev/slog"
)
func GetNetworkingStack(t *Tunnel, req *StartRequest, _ slog.Logger) (NetworkStack, error) {