Skip to content

📖 Scribe: Fix WireGuard handshake documentation#2

Merged
igorls merged 1 commit intomainfrom
scribe-wg-handshake-docs-15455729219446802175
Feb 23, 2026
Merged

📖 Scribe: Fix WireGuard handshake documentation#2
igorls merged 1 commit intomainfrom
scribe-wg-handshake-docs-15455729219446802175

Conversation

@igorls
Copy link
Copy Markdown
Owner

@igorls igorls commented Feb 23, 2026

The documentation for the wire protocol was outdated and described a custom handshake mechanism (0x10/0x11) that is not used in the codebase. The actual implementation uses standard WireGuard Noise_IKpsk2 handshake messages (Types 1-4) which are multiplexed on the same UDP port as SWIM gossip messages.

This PR corrects docs/concepts/wire-protocol.md and README.md to reflect the actual implementation:

  • Explains the packet classification logic (first 4 bytes).
  • Replaces the incorrect handshake message definitions with the standard WireGuard handshake structures (HandshakeInitiation and HandshakeResponse).
  • Removes unimplemented message types (RelayRequest, RelayData, EndpointUpdate) from the documentation to avoid confusion.

PR created automatically by Jules for task 15455729219446802175 started by @igorls

The documentation incorrectly described a custom `0x10`/`0x11` handshake protocol.
The implementation (`src/wireguard/noise.zig`) actually uses the standard WireGuard
Noise_IKpsk2 handshake (Types 1/2) multiplexed on the same port.

This change updates `docs/concepts/wire-protocol.md` and `README.md` to:
- Document the 4-byte packet classification logic (WireGuard vs SWIM)
- List the correct WireGuard message types (Type 1-4)
- Remove references to unused `HandshakeInit` (0x10) and `HandshakeResp` (0x11)
- Remove references to unimplemented `EndpointUpdate` (0x32)

Co-authored-by: igorls <4753812+igorls@users.noreply.github.com>
@google-labs-jules
Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@igorls igorls merged commit 3b7d029 into main Feb 23, 2026
1 check passed
@igorls igorls deleted the scribe-wg-handshake-docs-15455729219446802175 branch February 23, 2026 17:31
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.

1 participant