[PR #1865] [MERGED] Feature/route selection #15930

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1865
Author: @lixmal
Created: 4/18/2024
Status: Merged
Merged: 4/23/2024
Merged by: @lixmal

Base: mainHead: feature/route-selection


📝 Commits (10+)

📊 Changes

20 files changed (+1650 additions, -146 deletions)

View changed files

📝 client/cmd/root.go (+7 -0)
client/cmd/route.go (+144 -0)
📝 client/cmd/ssh.go (+2 -2)
📝 client/internal/connect.go (+13 -4)
📝 client/internal/engine.go (+32 -2)
📝 client/internal/engine_test.go (+7 -6)
📝 client/internal/routemanager/manager.go (+56 -15)
📝 client/internal/routemanager/manager_test.go (+2 -2)
📝 client/internal/routemanager/mock.go (+21 -4)
📝 client/internal/routemanager/systemops_linux.go (+4 -1)
client/internal/routeselector/routeselector.go (+132 -0)
client/internal/routeselector/routeselector_test.go (+275 -0)
📝 client/proto/daemon.pb.go (+446 -93)
📝 client/proto/daemon.proto (+31 -0)
📝 client/proto/daemon_grpc.pb.go (+114 -0)
client/server/route.go (+100 -0)
📝 client/server/server.go (+33 -7)
📝 client/server/server_test.go (+3 -2)
📝 client/ui/client_ui.go (+25 -8)
client/ui/route.go (+203 -0)

📄 Description

Describe your changes

Adds CLI and GUI functionality to select or deselect received client routes.

$ netbird routes list -h
List all available network routes.

Usage:
  netbird routes list [flags]

Aliases:
  list, ls

Examples:
  netbird routes list

$ netbird routes select -h
Select a list of routes by identifiers or 'all' to clear all selections and to accept all (including new) routes.
Default mode is replace, use -a to append to already selected routes.

Usage:
  netbird routes select route...|all [flags]

Examples:
  netbird routes select all
  netbird routes select route1 route2
  netbird routes select -a route3

Flags:
  -a, --append   Append to current route selection instead of replacing

$ netbird routes deselect -h
Deselect previously selected routes by identifiers or 'all' to disable accepting any routes.

Usage:
  netbird routes deselect route...|all [flags]

Examples:
  netbird routes deselect all
  netbird routes deselect route1 route2

image

image

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/1865 **Author:** [@lixmal](https://github.com/lixmal) **Created:** 4/18/2024 **Status:** ✅ Merged **Merged:** 4/23/2024 **Merged by:** [@lixmal](https://github.com/lixmal) **Base:** `main` ← **Head:** `feature/route-selection` --- ### 📝 Commits (10+) - [`fdea89a`](https://github.com/netbirdio/netbird/commit/fdea89a51873d3b3ebf5d05c79963764340df3a3) Fix SSH command description - [`39741a9`](https://github.com/netbirdio/netbird/commit/39741a9e483d5500065198b91c6449df1eefc417) Add route selection functionality - [`dc8f05c`](https://github.com/netbirdio/netbird/commit/dc8f05c4ba4361a2464a7bde41db856e83a6a7c4) Add gui route selector - [`68f4233`](https://github.com/netbirdio/netbird/commit/68f42334550f2984503d2026086162ba70ab2937) Apply route selections to route manager - [`8b30d88`](https://github.com/netbirdio/netbird/commit/8b30d8802affe4313e01f1233dea7324ab531538) Fix remove unreachable route error check - [`2773385`](https://github.com/netbirdio/netbird/commit/2773385ab488ce5ccc07de306be9f16396d9ae4a) Rename append - [`58e1541`](https://github.com/netbirdio/netbird/commit/58e1541e417b97e6cdee9cd996a096536584d491) Fix description - [`11d088f`](https://github.com/netbirdio/netbird/commit/11d088f1af1e3c40fcf9a84835333581c8fd3b8d) Use multi error - [`bab4ecf`](https://github.com/netbirdio/netbird/commit/bab4ecf99afd01bebc8bdda73aea8df6347f3197) Add test - [`6e7f01b`](https://github.com/netbirdio/netbird/commit/6e7f01bf8932186f806d9553acb03c2f3e4c550e) Fix test ### 📊 Changes **20 files changed** (+1650 additions, -146 deletions) <details> <summary>View changed files</summary> 📝 `client/cmd/root.go` (+7 -0) ➕ `client/cmd/route.go` (+144 -0) 📝 `client/cmd/ssh.go` (+2 -2) 📝 `client/internal/connect.go` (+13 -4) 📝 `client/internal/engine.go` (+32 -2) 📝 `client/internal/engine_test.go` (+7 -6) 📝 `client/internal/routemanager/manager.go` (+56 -15) 📝 `client/internal/routemanager/manager_test.go` (+2 -2) 📝 `client/internal/routemanager/mock.go` (+21 -4) 📝 `client/internal/routemanager/systemops_linux.go` (+4 -1) ➕ `client/internal/routeselector/routeselector.go` (+132 -0) ➕ `client/internal/routeselector/routeselector_test.go` (+275 -0) 📝 `client/proto/daemon.pb.go` (+446 -93) 📝 `client/proto/daemon.proto` (+31 -0) 📝 `client/proto/daemon_grpc.pb.go` (+114 -0) ➕ `client/server/route.go` (+100 -0) 📝 `client/server/server.go` (+33 -7) 📝 `client/server/server_test.go` (+3 -2) 📝 `client/ui/client_ui.go` (+25 -8) ➕ `client/ui/route.go` (+203 -0) </details> ### 📄 Description ## Describe your changes Adds CLI and GUI functionality to select or deselect received client routes. ``` $ netbird routes list -h List all available network routes. Usage: netbird routes list [flags] Aliases: list, ls Examples: netbird routes list ``` ``` $ netbird routes select -h Select a list of routes by identifiers or 'all' to clear all selections and to accept all (including new) routes. Default mode is replace, use -a to append to already selected routes. Usage: netbird routes select route...|all [flags] Examples: netbird routes select all netbird routes select route1 route2 netbird routes select -a route3 Flags: -a, --append Append to current route selection instead of replacing ``` ``` $ netbird routes deselect -h Deselect previously selected routes by identifiers or 'all' to disable accepting any routes. Usage: netbird routes deselect route...|all [flags] Examples: netbird routes deselect all netbird routes deselect route1 route2 ``` ![image](https://github.com/netbirdio/netbird/assets/17948409/9109983b-5714-4a22-b25b-e7741a8d14d0) ![image](https://github.com/netbirdio/netbird/assets/17948409/76cf1ac3-7718-4dc7-906e-c532510977d9) ## 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 03:08:40 -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#15930