-
Notifications
You must be signed in to change notification settings - Fork 0
[ME-4826] Propagate Peer Private IP Addresses #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ME-4826] Propagate Peer Private IP Addresses #55
Conversation
WalkthroughThe protobuf schema was updated to add a new repeated Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Server
Client->>Server: Send DiscoveryDetailsMessage (with repeated WireGuardEndpointAddr)
Note right of Client: Each address includes iface, IP, port, STUN info
Server-->>Client: Respond with WireGuardPeer (with repeated WireGuardEndpointAddr)
Note left of Server: Peers use detailed endpoint addresses for traffic
Possibly related PRs
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI ⛔ Files ignored due to path filters (12)
📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (3)
common/messages.proto (2)
79-85: Inconsistent naming style between enum values and comment blockThe newly added
addressesfield is great, but the comment right above (// endpoint for UDP …) is now misleading because the field itself is deprecated – the comment makes it look current.- string public_udp4_endpoint = 6 [deprecated = true]; // endpoint for UDP peer-to-peer communication over IPv4 (public IPv4 + port as seen from the Internet) + string public_udp4_endpoint = 6 [deprecated = true]; // DEPRECATED – superseded by addressesSame for
public_udp6_endpoint.Minor, but avoiding stale comments will save future confusion.
108-113: Renameip_versionor change its type to avoid ambiguityField
ip_versionis of typeIPAddressType, which already encodes the version. Having both the word “version” and an enum namedTypeis confusing:- IPAddressType ip_version = 2; + IPAddressType ip_type = 2;If you keep the current name, at least clarify it in a leading comment.
(Also consider
bytesforip_address; leaving asstringis OK if you never need raw binary.)docker/go.Dockerfile (1)
1-1: Pin the base image to a patch version for reproducible builds
golang:1.24-alpine3.22floats on future 1.24.x patch releases.
Pinning to the exact patch (e.g.golang:1.24.1-alpine3.22) guarantees the same tool-chain and CVE set for every build.-FROM golang:1.24-alpine3.22 +FROM golang:1.24.1-alpine3.22
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (11)
common/messages.pb.gois excluded by!**/*.pb.goconnector/connector.pb.gois excluded by!**/*.pb.goconnector/connector_grpc.pb.gois excluded by!**/*.pb.godevice/device.pb.gois excluded by!**/*.pb.godevice/device_grpc.pb.gois excluded by!**/*.pb.gogen/kotlin/border0/common/v1/DiscoveryDetailsMessageKt.ktis excluded by!**/gen/**gen/kotlin/border0/common/v1/IPAddrPortKt.ktis excluded by!**/gen/**gen/kotlin/border0/common/v1/WireGuardPeerKt.ktis excluded by!**/gen/**gen/swift/connector.pb.swiftis excluded by!**/gen/**gen/swift/device.pb.swiftis excluded by!**/gen/**gen/swift/messages.pb.swiftis excluded by!**/gen/**
📒 Files selected for processing (3)
common/messages.proto(3 hunks)docker/go.Dockerfile(1 hunks)go.mod(1 hunks)
🔇 Additional comments (1)
common/messages.proto (1)
14-19: Confirm wire-compatibility & consider reserving removed field numbersAdding the new
addressesfield at tag5is fine, but the two deprecated fields (2,3) are still present.
Once you actually remove them in a future revision, remember toreserved 2, 3;to avoid accidental reuse that would break binary compatibility.No action needed now – just a heads-up for the follow-up migration.
6d768ca to
ea9e51b
Compare
efaf33b to
dbc5980
Compare
dbc5980 to
eb93c68
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances peer endpoint representation with support for multiple IP addresses and ports, including IP version and interface details, while maintaining backward compatibility by deprecating previous single-string endpoint fields in favor of a new structured and extensible address format.
- Introduces WireGuardEndpointAddr struct with support for STUN discovery, interface metadata, and structured endpoint information
- Deprecates existing single endpoint fields in favor of a more comprehensive addressing system
- Updates generated code across multiple languages (Swift, Kotlin) and toolchain versions
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| go.mod | Updates Go version from 1.22 to 1.23 |
| common/messages.proto | Adds WireGuardEndpointAddr message and updates field comments for clarity |
| gen/swift/messages.pb.swift | Updates Swift bindings with new endpoint structure and deprecation markers |
| gen/kotlin/border0/common/v1/WireGuardPeerKt.kt | Refactors Kotlin DSL to support new endpoint addressing |
| gen/kotlin/border0/common/v1/WireGuardEndpointAddrKt.kt | New Kotlin bindings for the endpoint address structure |
| docker/go.Dockerfile | Updates base Docker image from golang:1.23-alpine3.20 to golang:1.24-alpine3.22 |
| Various generated files | Updates protoc version references and generated code patterns |
[ME-4826] Propagate Peer Private IP Addresses
Allows passing private ip addresses.
Summary by CodeRabbit