[PR #1403] [MERGED] Netstack #15347

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1403
Author: @pappz
Created: 12/19/2023
Status: Merged
Merged: 1/3/2024
Merged by: @pappz

Base: mainHead: feature/netstack


📝 Commits (10+)

📊 Changes

40 files changed (+1731 additions, -988 deletions)

View changed files

📝 client/internal/dns/server_test.go (+7 -3)
📝 client/internal/engine.go (+75 -88)
📝 client/internal/engine_test.go (+3 -3)
📝 client/internal/mobile_dependency.go (+5 -2)
📝 client/internal/routemanager/manager_test.go (+3 -2)
📝 client/internal/routemanager/systemops_nonandroid_test.go (+5 -2)
📝 go.mod (+4 -1)
📝 go.sum (+2 -0)
📝 iface/iface.go (+16 -20)
📝 iface/iface_android.go (+14 -22)
iface/iface_create.go (+20 -0)
iface/iface_darwin.go (+38 -0)
📝 iface/iface_ios.go (+9 -31)
iface/iface_linux.go (+48 -0)
iface/iface_nonandroid.go (+0 -47)
📝 iface/iface_test.go (+55 -51)
📝 iface/iface_windows.go (+34 -1)
iface/ipc_parser_mobile.go (+0 -63)
iface/netstack/dialer.go (+32 -0)
iface/netstack/env.go (+33 -0)

...and 20 more files

📄 Description

Describe your changes

Add netstack support for the agent to run it without privileges.

  • use interface for tun device
  • use common IPC for userspace WireGuard integration
  • move udpmux creation and sharedsock to tun layer

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/1403 **Author:** [@pappz](https://github.com/pappz) **Created:** 12/19/2023 **Status:** ✅ Merged **Merged:** 1/3/2024 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `main` ← **Head:** `feature/netstack` --- ### 📝 Commits (10+) - [`61f46c0`](https://github.com/netbirdio/netbird/commit/61f46c0dcc8551224a514e1eef97ece54c387939) Refactor the tun code. - [`b764588`](https://github.com/netbirdio/netbird/commit/b7645889133232c18c4f054ac81f140eabd52306) Workaround to fix test - [`a70ec52`](https://github.com/netbirdio/netbird/commit/a70ec52ef1eada1584ea86fdf01cc646acc58233) Fix error handling - [`1114d4b`](https://github.com/netbirdio/netbird/commit/1114d4b33ecc6088e1909a5fbcdcb0c45ffd74a3) Fix iface implementations - [`dc83404`](https://github.com/netbirdio/netbird/commit/dc834049071efd1181e1da9c2998a8e764621d37) Fix iface implementations - [`275ec25`](https://github.com/netbirdio/netbird/commit/275ec25ab8292a8a5aa39efdd93330eb103a37ee) Fix tests - [`b3858b2`](https://github.com/netbirdio/netbird/commit/b3858b2e04d05295c23dcf2f911457b76ee06157) Fix build tag - [`fce60e7`](https://github.com/netbirdio/netbird/commit/fce60e71401a359c3f51af55957bdd5c1701a675) Fix error msg - [`2aaf963`](https://github.com/netbirdio/netbird/commit/2aaf963cee604d43cc91fb6f9d917dde99e3aad0) Add netstack code - [`20c6bf7`](https://github.com/netbirdio/netbird/commit/20c6bf71e05c5225fc37477aa2e0340055fdd1e9) Typo fix ### 📊 Changes **40 files changed** (+1731 additions, -988 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/dns/server_test.go` (+7 -3) 📝 `client/internal/engine.go` (+75 -88) 📝 `client/internal/engine_test.go` (+3 -3) 📝 `client/internal/mobile_dependency.go` (+5 -2) 📝 `client/internal/routemanager/manager_test.go` (+3 -2) 📝 `client/internal/routemanager/systemops_nonandroid_test.go` (+5 -2) 📝 `go.mod` (+4 -1) 📝 `go.sum` (+2 -0) 📝 `iface/iface.go` (+16 -20) 📝 `iface/iface_android.go` (+14 -22) ➕ `iface/iface_create.go` (+20 -0) ➕ `iface/iface_darwin.go` (+38 -0) 📝 `iface/iface_ios.go` (+9 -31) ➕ `iface/iface_linux.go` (+48 -0) ➖ `iface/iface_nonandroid.go` (+0 -47) 📝 `iface/iface_test.go` (+55 -51) 📝 `iface/iface_windows.go` (+34 -1) ➖ `iface/ipc_parser_mobile.go` (+0 -63) ➕ `iface/netstack/dialer.go` (+32 -0) ➕ `iface/netstack/env.go` (+33 -0) _...and 20 more files_ </details> ### 📄 Description ## Describe your changes Add netstack support for the agent to run it without privileges. - use interface for tun device - use common IPC for userspace WireGuard integration - move udpmux creation and sharedsock to tun layer ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [x] It is a refactor - [ ] 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 03:07:27 -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#15347