[PR #727] [MERGED] Exchange proxy mode via signal #12925

Closed
opened 2026-08-05 02:07:01 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/727
Author: @mlsmaycon
Created: 3/6/2023
Status: Merged
Merged: 3/16/2023
Merged by: @mlsmaycon

Base: mainHead: feature/exchange-proxy-mode-via-signal


📝 Commits (10+)

  • cf45d8a Exchange proxy mode via signal
  • dad96a0 update error message and rename channel field
  • 6f90995 exchange protocol support message and conn meta
  • f89436c register meta
  • 468ef0c use uint32 array to describe features
  • b767f26 use optional direct mode indication
  • 6b2c19a name featuresSupported
  • 938c57f add tests
  • 9ae3d7a Add message and feature support exchange tests
  • 9fff8fd go mod tidy

📊 Changes

9 files changed (+463 additions, -54 deletions)

View changed files

📝 client/internal/engine.go (+30 -0)
📝 client/internal/peer/conn.go (+101 -12)
📝 client/internal/peer/conn_test.go (+109 -0)
📝 go.mod (+1 -1)
📝 signal/client/client.go (+22 -0)
📝 signal/client/client_test.go (+56 -13)
📝 signal/proto/generate.sh (+14 -1)
📝 signal/proto/signalexchange.pb.go (+120 -27)
📝 signal/proto/signalexchange.proto (+10 -0)

📄 Description

Describe your changes

Before defining if we will use direct or proxy connection we will exchange a message with the other peer if the modes match we keep the decision from the shouldUseProxy function otherwise we skip using direct connection.

Added a feature support message to the signal protocol

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/727 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 3/6/2023 **Status:** ✅ Merged **Merged:** 3/16/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `feature/exchange-proxy-mode-via-signal` --- ### 📝 Commits (10+) - [`cf45d8a`](https://github.com/netbirdio/netbird/commit/cf45d8a8434ada1afa24a05c034ddd50f74722c8) Exchange proxy mode via signal - [`dad96a0`](https://github.com/netbirdio/netbird/commit/dad96a0684fd19ce053805d594437ac277b4ea9c) update error message and rename channel field - [`6f90995`](https://github.com/netbirdio/netbird/commit/6f9099540a70e4b1235f14f63eaa5e5925ce744c) exchange protocol support message and conn meta - [`f89436c`](https://github.com/netbirdio/netbird/commit/f89436c9f2688ac4990bd6449a836f73326be2d1) register meta - [`468ef0c`](https://github.com/netbirdio/netbird/commit/468ef0c4d8075d196262243c22765dafdb1e0ee1) use uint32 array to describe features - [`b767f26`](https://github.com/netbirdio/netbird/commit/b767f26b822771d4fd7934322ffe6fa4b552e5c0) use optional direct mode indication - [`6b2c19a`](https://github.com/netbirdio/netbird/commit/6b2c19a8b827bc58401c5ba004f82db9f090c3f5) name featuresSupported - [`938c57f`](https://github.com/netbirdio/netbird/commit/938c57f875a9edcfd682bba19a7c82888a6be263) add tests - [`9ae3d7a`](https://github.com/netbirdio/netbird/commit/9ae3d7aaf2e5ebf199445da87549459508792815) Add message and feature support exchange tests - [`9fff8fd`](https://github.com/netbirdio/netbird/commit/9fff8fd36382d6001ab1e5b3de6017d429ce7de7) go mod tidy ### 📊 Changes **9 files changed** (+463 additions, -54 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/engine.go` (+30 -0) 📝 `client/internal/peer/conn.go` (+101 -12) 📝 `client/internal/peer/conn_test.go` (+109 -0) 📝 `go.mod` (+1 -1) 📝 `signal/client/client.go` (+22 -0) 📝 `signal/client/client_test.go` (+56 -13) 📝 `signal/proto/generate.sh` (+14 -1) 📝 `signal/proto/signalexchange.pb.go` (+120 -27) 📝 `signal/proto/signalexchange.proto` (+10 -0) </details> ### 📄 Description ## Describe your changes Before defining if we will use direct or proxy connection we will exchange a message with the other peer if the modes match we keep the decision from the shouldUseProxy function otherwise we skip using direct connection. Added a feature support message to the signal protocol ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [x] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:07:01 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#12925