wgengine/wgcfg, go.mod: bump wireguard-go dep, wire up new field

Bump wireguard-go and wire up its new field. (no current users)

https://github.com/tailscale/wireguard-go/compare/e61b6b78110b...9d8961514fae

Updates tailscale/corp#50068

Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
Change-Id: I80d7af011b43273e6c949214c6d862f9247a82e1
This commit is contained in:
Brad Fitzpatrick committed 2026-10-19 06:24:32 -07:00
1 parent e3c3ef18a5
commit 643f00c10e
9 files changed
+21 -11

No files matched your search

+1 -1
View File
@@ -173,4 +173,4 @@
});
};
}
# nix-direnv cache busting line: sha256-jrznfL26qyAGix9DVkmh0sLU2VvqeTNMdi6mPu9RlxM=
# nix-direnv cache busting line: sha256-sHq31+Zs8C1h8jL3ILdD2Q5aaQT7QTPt4wu1tTEV/T4=
+2 -2
View File
@@ -4,7 +4,7 @@
"sri": "sha256-JcOxcYFhNRg6fiQhe5GkPHQxLI0ypKClCShZcBY1920="
},
"vendor": {
"goModSum": "sha256-tCuqUvgL9H3779uKw3AeSaToYcOy2aBhIWoSLOgs6T8=",
"sri": "sha256-jrznfL26qyAGix9DVkmh0sLU2VvqeTNMdi6mPu9RlxM="
"goModSum": "sha256-W+Xx0gtW1PzEnvqXzRK6V/iITEDTQQ/FF0yXDR2mpG0=",
"sri": "sha256-sHq31+Zs8C1h8jL3ILdD2Q5aaQT7QTPt4wu1tTEV/T4="
}
}
+1 -1
View File
@@ -126,7 +126,7 @@ require (
github.com/tailscale/ts-gokrazy v0.0.0-20260630224145-b83088f2e52e
github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6
github.com/tailscale/wireguard-go v0.0.0-20260928213353-e61b6b78110b
github.com/tailscale/wireguard-go v0.0.0-20261015173605-9d8961514fae
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e
github.com/tc-hib/winres v0.3.1
github.com/tcnksm/go-httpstat v0.2.0
+2 -2
View File
@@ -1154,8 +1154,8 @@ github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea h1:a
github.com/tailscale/web-client-prebuilt v0.0.0-20260917222731-e0ed2d0d0fea/go.mod h1:agQPE6y6ldqCOui2gkIh7ZMztTkIQKH049tv8siLuNQ=
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6 h1:l10Gi6w9jxvinoiq15g8OToDdASBni4CyJOdHY1Hr8M=
github.com/tailscale/wf v0.0.0-20240214030419-6fbb0a674ee6/go.mod h1:ZXRML051h7o4OcI0d3AaILDIad/Xw0IkXaHM17dic1Y=
github.com/tailscale/wireguard-go v0.0.0-20260928213353-e61b6b78110b h1:roJhpZBsUsZayIDsfSSrgGKUNJjOPXXs1Ul/C/z7C0g=
github.com/tailscale/wireguard-go v0.0.0-20260928213353-e61b6b78110b/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg=
github.com/tailscale/wireguard-go v0.0.0-20261015173605-9d8961514fae h1:NgaM4SCMKaBhOw6j7Ojg5ptuMJizoZQmnyFVPggihpg=
github.com/tailscale/wireguard-go v0.0.0-20261015173605-9d8961514fae/go.mod h1:rUelGmuK4UnSJYM5gl5Mknp6YbwwcL8+VAPMhNYe+jg=
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e h1:zOGKqN5D5hHhiYUp091JqK7DPCqSARyUfduhGUY8Bek=
github.com/tailscale/xnet v0.0.0-20240729143630-8497ac4dab2e/go.mod h1:orPd6JZXXRyuDusYilywte7k094d7dycXXU5YnWsrwg=
github.com/tc-hib/winres v0.3.1 h1:CwRjEGrKdbi5CvZ4ID+iyVhgyfatxFoizjPhzez9Io4=
+1 -1
View File
@@ -16,4 +16,4 @@
) {
src = ./.;
}).shellNix
# nix-direnv cache busting line: sha256-jrznfL26qyAGix9DVkmh0sLU2VvqeTNMdi6mPu9RlxM=
# nix-direnv cache busting line: sha256-sHq31+Zs8C1h8jL3ILdD2Q5aaQT7QTPt4wu1tTEV/T4=
+1
View File
@@ -712,6 +712,7 @@ func (e *userspaceEngine) SyncDevicePeer(k key.NodePublic) {
}
if peer, ok := e.wgdev.LookupActivePeer(k.Raw32()); ok {
peer.SetPresharedKey(conf.PresharedKey)
peer.SetHybridHandshake(conf.Hybrid)
peer.SetAllowedIPs(conf.AllowedIPs)
}
}
+5
View File
@@ -33,6 +33,11 @@ type PeerConfig struct {
// PresharedKey is the optional WireGuard pre-shared key. The zero value
// disables the pre-shared-key layer.
PresharedKey device.NoisePresharedKey
// Hybrid is whether to use the hybrid post-quantum (Noise IKhfs+psk2)
// handshake with this peer. Both peers must agree on this setting to
// communicate; there is no fallback between handshake types.
Hybrid bool
}
func (c *Config) Equal(o *Config) bool {
+4 -3
View File
@@ -41,9 +41,9 @@ var (
)
// NewPeerLookupFunc returns a [device.PeerLookupFunc] that lazily
// creates peers using peerConfig as the source of each peer's allowed IPs and
// optional pre-shared key. The peer's endpoint is derived from its public key
// via bind.
// creates peers using peerConfig as the source of each peer's allowed IPs,
// optional pre-shared key, and handshake type. The peer's endpoint is derived
// from its public key via bind.
func NewPeerLookupFunc(bind conn.Bind, logf logger.Logf, peerConfig func(device.NoisePublicKey) (PeerConfig, bool)) device.PeerLookupFunc {
return func(pubk device.NoisePublicKey) (_ *device.NewPeerConfig, ok bool) {
conf, ok := peerConfig(pubk)
@@ -58,6 +58,7 @@ func NewPeerLookupFunc(bind conn.Bind, logf logger.Logf, peerConfig func(device.
return &device.NewPeerConfig{
AllowedIPs: conf.AllowedIPs,
PresharedKey: conf.PresharedKey,
Hybrid: conf.Hybrid,
Endpoint: ep,
}, true
}
+4 -1
View File
@@ -31,7 +31,7 @@ func TestNewPeerLookupFunc(t *testing.T) {
// LocalBackend provides via wgengine.Engine.SetPeerConfigFunc.
psk2 := device.NoisePresharedKey{1, 2, 3}
peers := map[device.NoisePublicKey]PeerConfig{
k2.Raw32(): {AllowedIPs: []netip.Prefix{ip2}, PresharedKey: psk2},
k2.Raw32(): {AllowedIPs: []netip.Prefix{ip2}, PresharedKey: psk2, Hybrid: true},
}
dev.SetPeerLookupFunc(NewPeerLookupFunc(dev.Bind(), t.Logf, func(pubk device.NoisePublicKey) (PeerConfig, bool) {
conf, ok := peers[pubk]
@@ -51,6 +51,9 @@ func TestNewPeerLookupFunc(t *testing.T) {
if want := "preshared_key=0102030000000000000000000000000000000000000000000000000000000000"; !strings.Contains(got, want) {
t.Fatalf("device config does not contain %q:\n%s", want, got)
}
if want := "hybrid=true"; !strings.Contains(got, want) {
t.Fatalf("device config does not contain %q:\n%s", want, got)
}
// An unknown peer should not be found.
if p := dev.LookupPeer(k3.Raw32()); p != nil {
t.Fatal("expected unknown peer k3 to not exist")