[PR #652] [MERGED] Adding --external-ip-map and --dns-resolver-address and shorthand flags #12827

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/652
Author: @mlsmaycon
Created: 1/12/2023
Status: Merged
Merged: 1/17/2023
Merged by: @mlsmaycon

Base: mainHead: feature/add-new-cli-flags


📝 Commits (10+)

  • 164ffc8 Add external-ip-map flag for ICE nat 1:1 candidates
  • 52679be Add ParseNATExternalIPMappings tests
  • 7372302 use findIPFromInterface for tests
  • 752c166 test with first interface with ipv4
  • 85e281e remove leftover
  • 1aeb19d Support listen on custom dns address
  • 5b57bbb cancel context if err
  • c82a7d7 add dns-resolver-address flag
  • 5358f55 Merge branch 'main' into feature/add-new-cli-flags
  • 7b38221 support loading environment variables from different commands

📊 Changes

21 files changed (+608 additions, -553 deletions)

View changed files

📝 client/Dockerfile (+1 -1)
📝 client/cmd/down.go (+1 -1)
📝 client/cmd/login.go (+1 -1)
📝 client/cmd/root.go (+27 -7)
📝 client/cmd/service_controller.go (+4 -4)
📝 client/cmd/service_installer.go (+2 -2)
📝 client/cmd/ssh.go (+2 -1)
📝 client/cmd/status.go (+1 -1)
📝 client/cmd/up.go (+124 -8)
📝 client/internal/config.go (+30 -7)
���� client/internal/connect.go (+1 -5)
📝 client/internal/dns/server.go (+29 -10)
📝 client/internal/dns/server_test.go (+66 -54)
📝 client/internal/engine.go (+6 -2)
📝 client/internal/engine_test.go (+85 -18)
📝 client/proto/daemon.pb.go (+158 -122)
📝 client/proto/daemon.proto (+10 -0)
📝 client/server/server.go (+43 -37)
📝 go.mod (+2 -2)
📝 go.sum (+6 -259)

...and 1 more files

📄 Description

Describe your changes

Adding --external-ip-map and --dns-resolver-address to up command and shorthand option to global flags.

updated reference doc with new flags here: https://github.com/netbirdio/docs/pull/28

Refactor get and read config functions with new ConfigInput type.

updated cobra package to latest release.

#585

Checklist

  • Is a feature enhancement
  • 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/652 **Author:** [@mlsmaycon](https://github.com/mlsmaycon) **Created:** 1/12/2023 **Status:** ✅ Merged **Merged:** 1/17/2023 **Merged by:** [@mlsmaycon](https://github.com/mlsmaycon) **Base:** `main` ← **Head:** `feature/add-new-cli-flags` --- ### 📝 Commits (10+) - [`164ffc8`](https://github.com/netbirdio/netbird/commit/164ffc879c7a1039fabf47e96c1aa4188fc80d4e) Add external-ip-map flag for ICE nat 1:1 candidates - [`52679be`](https://github.com/netbirdio/netbird/commit/52679bef049eba2760e75269c1b09e9e44db9f07) Add ParseNATExternalIPMappings tests - [`7372302`](https://github.com/netbirdio/netbird/commit/7372302257ec7b088e0df3b9c4e1b40cd66625c9) use findIPFromInterface for tests - [`752c166`](https://github.com/netbirdio/netbird/commit/752c16615d9305cc96f0b18f425834717f72aad6) test with first interface with ipv4 - [`85e281e`](https://github.com/netbirdio/netbird/commit/85e281eae6dc3f03a3e775ed2a72cc48c80f9144) remove leftover - [`1aeb19d`](https://github.com/netbirdio/netbird/commit/1aeb19dcbbc9668e06fb2dbb7299408d41a9f829) Support listen on custom dns address - [`5b57bbb`](https://github.com/netbirdio/netbird/commit/5b57bbb75ae0e45fc8e044bb96f236ed2d2e6879) cancel context if err - [`c82a7d7`](https://github.com/netbirdio/netbird/commit/c82a7d7c3c02d27eeb9bf4f960f659d04dee3899) add dns-resolver-address flag - [`5358f55`](https://github.com/netbirdio/netbird/commit/5358f55f9ba2053bacf40999dd52f7dbdc863dec) Merge branch 'main' into feature/add-new-cli-flags - [`7b38221`](https://github.com/netbirdio/netbird/commit/7b38221eeec6c6b44c9a9e4615757a88612c4f62) support loading environment variables from different commands ### 📊 Changes **21 files changed** (+608 additions, -553 deletions) <details> <summary>View changed files</summary> 📝 `client/Dockerfile` (+1 -1) 📝 `client/cmd/down.go` (+1 -1) 📝 `client/cmd/login.go` (+1 -1) 📝 `client/cmd/root.go` (+27 -7) 📝 `client/cmd/service_controller.go` (+4 -4) 📝 `client/cmd/service_installer.go` (+2 -2) 📝 `client/cmd/ssh.go` (+2 -1) 📝 `client/cmd/status.go` (+1 -1) 📝 `client/cmd/up.go` (+124 -8) 📝 `client/internal/config.go` (+30 -7) ���� `client/internal/connect.go` (+1 -5) 📝 `client/internal/dns/server.go` (+29 -10) 📝 `client/internal/dns/server_test.go` (+66 -54) 📝 `client/internal/engine.go` (+6 -2) 📝 `client/internal/engine_test.go` (+85 -18) 📝 `client/proto/daemon.pb.go` (+158 -122) 📝 `client/proto/daemon.proto` (+10 -0) 📝 `client/server/server.go` (+43 -37) 📝 `go.mod` (+2 -2) 📝 `go.sum` (+6 -259) _...and 1 more files_ </details> ### 📄 Description ## Describe your changes Adding --external-ip-map and --dns-resolver-address to `up` command and shorthand option to global flags. updated reference doc with new flags here: https://github.com/netbirdio/docs/pull/28 Refactor get and read config functions with new ConfigInput type. updated cobra package to latest release. ## Issue ticket number and link #585 ### Checklist - [x] Is a feature enhancement - [x] Created tests that fail without the change (if possible) - [x] 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:06:47 -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#12827