Skip to content

Conversation

@jwhited
Copy link
Member

@jwhited jwhited commented Jul 4, 2025

To be implemented by [magicsock.lazyEndpoint], which is responsible for triggering JIT peer configuration.

Updates tailscale/corp#20732
Updates tailscale/corp#30042

To be implemented by [magicsock.lazyEndpoint], which is responsible for
triggering JIT peer configuration.

Updates tailscale/corp#20732
Updates tailscale/corp#30042

Signed-off-by: Jordan Whited <jordan@tailscale.com>
@jwhited jwhited requested a review from Copilot July 4, 2025 04:00
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds support for an InitiationAwareEndpoint to trigger just-in-time peer configuration when a WireGuard handshake initiation is received.

  • Extends ConsumeMessageInitiation to accept an Endpoint and notify it of the initiator’s public key.
  • Defines the new InitiationAwareEndpoint interface in conn/conn.go.
  • Updates existing callers (device/receive.go, noise_test.go) and adds a test stub for the new interface.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
device/receive.go Updated ConsumeMessageInitiation calls to pass the endpoint
device/noise-test.go Added initAwareEP stub and test assertions for the new interface
device/noise-protocol.go Changed ConsumeMessageInitiation signature and invokes the new callback
conn/conn.go Introduced InitiationAwareEndpoint interface and documentation
Comments suppressed due to low confidence (1)

conn/conn.go:89

  • [nitpick] Use backticks instead of square brackets around type references in Go doc comments (e.g., Endpoint and PeerAwareEndpoint) so that tools like go doc link them properly.
// InitiationAwareEndpoint is an optional [Endpoint] specialization for

@jwhited jwhited requested review from dylan-tailscale and raggi July 4, 2025 04:02
Copy link

@dylan-tailscale dylan-tailscale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@jwhited jwhited merged commit 1f398ae into tailscale Jul 7, 2025
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants