[PR #6763] [client, proxy] Remove lazy connection exclusions and run Rosenpass on the embedded proxy #26948

Open
opened 2026-08-05 07:08:00 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/6763
Author: @lixmal
Created: 7/14/2026
Status: 🔄 Open

Base: lazy-conn-per-peerHead: lazy-conn-rosenpass


📝 Commits (3)

  • 98da386 Run lazy connection manager for rosenpass peers
  • 53b04d5 Treat forward-target peers as normal lazy connections
  • f7da5fe Run Rosenpass in permissive mode on the embedded proxy

📊 Changes

6 files changed (+63 additions, -174 deletions)

View changed files

📝 client/embed/embed.go (+7 -0)
📝 client/internal/conn_mgr.go (+10 -17)
📝 client/internal/conn_mgr_test.go (+1 -1)
📝 client/internal/engine.go (+19 -60)
client/internal/engine_lazy_exclude_test.go (+0 -89)
📝 proxy/internal/roundtrip/netbird.go (+26 -7)

📄 Description

Describe your changes

Follow-up to #6762. Removes the remaining special-cases that kept lazy connections from applying uniformly, and lets the embedded reverse proxy interoperate with Rosenpass-enabled peers.

  • Run the lazy connection manager for Rosenpass-enabled peers instead of disabling it outright. Such connections simply never idle on their own, since Rosenpass rekey traffic keeps them active.
  • Treat forward-target peers as normal lazy connections instead of forcing them always-active; they wake on demand like any other peer.
  • Run Rosenpass in permissive mode on the embedded proxy so it can connect to Rosenpass-enabled peers (post-quantum) and fall back to plain WireGuard for peers without it. Without this a Rosenpass peer cannot reach the proxy at all (PSK mismatch). Toggle with NB_PROXY_ROSENPASS (default on).

Stack

Stacked on #6762.

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)
  • This change does not modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — OR I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See CONTRIBUTING.md.

By submitting this pull request, you confirm that you have read and agree to the terms of the Contributor License Agreement.

Documentation

Select exactly one:

  • I added/updated documentation for this change
  • Documentation is not needed for this change (explain why)

No user-facing client configuration changes. The proxy NB_PROXY_ROSENPASS option is exposed via the netbird-proxy Helm chart (netbirdio/helms).

Docs PR URL (required if "docs added" is checked)

Paste the PR link from https://github.com/netbirdio/docs here:

https://github.com/netbirdio/docs/pull/__

Summary by CodeRabbit

  • New Features

    • Added embedded-client options to enable Rosenpass post-quantum key exchange and configure permissive behavior.
    • Added environment-variable controls for Rosenpass and embedded-client log level settings.
    • Rosenpass is enabled by default for embedded clients and can be overridden through configuration.
  • Improvements

    • Improved lazy peer connection handling so peer activity follows configured lazy policies more consistently.
    • Enhanced startup and configuration logging, including Rosenpass settings and clearer invalid log-level warnings.

🔄 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/6763 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 7/14/2026 **Status:** 🔄 Open **Base:** `lazy-conn-per-peer` ← **Head:** `lazy-conn-rosenpass` --- ### 📝 Commits (3) - [`98da386`](https://github.com/netbirdio/netbird/commit/98da386aa07b50fdddfb0615a9f682b3b44f4920) Run lazy connection manager for rosenpass peers - [`53b04d5`](https://github.com/netbirdio/netbird/commit/53b04d591d112ada26543396879862db34d18618) Treat forward-target peers as normal lazy connections - [`f7da5fe`](https://github.com/netbirdio/netbird/commit/f7da5fe54e9c74078ac2254347553c63f5e13322) Run Rosenpass in permissive mode on the embedded proxy ### 📊 Changes **6 files changed** (+63 additions, -174 deletions) <details> <summary>View changed files</summary> 📝 `client/embed/embed.go` (+7 -0) 📝 `client/internal/conn_mgr.go` (+10 -17) 📝 `client/internal/conn_mgr_test.go` (+1 -1) 📝 `client/internal/engine.go` (+19 -60) ➖ `client/internal/engine_lazy_exclude_test.go` (+0 -89) 📝 `proxy/internal/roundtrip/netbird.go` (+26 -7) </details> ### 📄 Description ## Describe your changes Follow-up to #6762. Removes the remaining special-cases that kept lazy connections from applying uniformly, and lets the embedded reverse proxy interoperate with Rosenpass-enabled peers. - Run the lazy connection manager for Rosenpass-enabled peers instead of disabling it outright. Such connections simply never idle on their own, since Rosenpass rekey traffic keeps them active. - Treat forward-target peers as normal lazy connections instead of forcing them always-active; they wake on demand like any other peer. - Run Rosenpass in permissive mode on the embedded proxy so it can connect to Rosenpass-enabled peers (post-quantum) and fall back to plain WireGuard for peers without it. Without this a Rosenpass peer cannot reach the proxy at all (PSK mismatch). Toggle with `NB_PROXY_ROSENPASS` (default on). ## Issue ticket number and link ## Stack <!-- branch-stack --> Stacked on #6762. ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] This change does **not** modify the public API, gRPC protocols, functionality behavior, CLI / service flags, or introduce a new feature — **OR** I have discussed it with the NetBird team beforehand (link the issue / Slack thread in the description). See [CONTRIBUTING.md](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTING.md#discuss-changes-with-the-netbird-team-first). > By submitting this pull request, you confirm that you have read and agree to the terms of the [Contributor License Agreement](https://github.com/netbirdio/netbird/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT.md). ## Documentation Select exactly one: - [ ] I added/updated documentation for this change - [x] Documentation is **not needed** for this change (explain why) No user-facing client configuration changes. The proxy `NB_PROXY_ROSENPASS` option is exposed via the netbird-proxy Helm chart (netbirdio/helms). ### Docs PR URL (required if "docs added" is checked) Paste the PR link from https://github.com/netbirdio/docs here: https://github.com/netbirdio/docs/pull/__ <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Added embedded-client options to enable Rosenpass post-quantum key exchange and configure permissive behavior. * Added environment-variable controls for Rosenpass and embedded-client log level settings. * Rosenpass is enabled by default for embedded clients and can be overridden through configuration. * **Improvements** * Improved lazy peer connection handling so peer activity follows configured lazy policies more consistently. * Enhanced startup and configuration logging, including Rosenpass settings and clearer invalid log-level warnings. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --- <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 07:08:00 -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#26948