[PR #2626] [MERGED] [client] Close the remote conn in proxy #15413

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

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/2626
Author: @pappz
Created: 9/20/2024
Status: Merged
Merged: 9/25/2024
Merged by: @pappz

Base: mainHead: relay/close-conn-in-proxy


📝 Commits (10+)

📊 Changes

16 files changed (+467 additions, -255 deletions)

View changed files

📝 client/internal/engine.go (+1 -1)
📝 client/internal/peer/conn.go (+4 -4)
📝 client/internal/peer/conn_test.go (+4 -4)
📝 client/internal/wgproxy/ebpf/portlookup.go (+1 -1)
📝 client/internal/wgproxy/ebpf/portlookup_test.go (+1 -1)
📝 client/internal/wgproxy/ebpf/proxy.go (+88 -77)
📝 client/internal/wgproxy/ebpf/proxy_test.go (+4 -5)
client/internal/wgproxy/ebpf/wrapper.go (+44 -0)
client/internal/wgproxy/factory.go (+0 -22)
📝 client/internal/wgproxy/factory_linux.go (+28 -5)
📝 client/internal/wgproxy/factory_nonlinux.go (+14 -2)
📝 client/internal/wgproxy/proxy.go (+3 -3)
client/internal/wgproxy/proxy_test.go (+128 -0)
client/internal/wgproxy/proxy_userspace.go (+0 -129)
client/internal/wgproxy/usp/proxy.go (+146 -0)
📝 relay/client/picker_test.go (+1 -1)

📄 Description

Port the conn close call to eBPF proxy

Describe your changes

  • Move the userspace proxy and ebpf proxy to separated packages
  • Extend the ebpf proxy with Close() function

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/2626 **Author:** [@pappz](https://github.com/pappz) **Created:** 9/20/2024 **Status:** ✅ Merged **Merged:** 9/25/2024 **Merged by:** [@pappz](https://github.com/pappz) **Base:** `main` ← **Head:** `relay/close-conn-in-proxy` --- ### 📝 Commits (10+) - [`17ac0b8`](https://github.com/netbirdio/netbird/commit/17ac0b82a89577f3031cdda09a57e8871eefd2a9) Close the remote conn in proxy - [`2d4a51d`](https://github.com/netbirdio/netbird/commit/2d4a51dc2a526c21e8e633cdc6ab58a7161bf2d9) Avoid duplicated error messages - [`b239fe4`](https://github.com/netbirdio/netbird/commit/b239fe45c7c03a2fe859ac510ffda056515447dd) Add comment - [`a33c9c4`](https://github.com/netbirdio/netbird/commit/a33c9c46c836990a08b2b2cc787bc3b02d06421c) Fix error handling - [`e39c9df`](https://github.com/netbirdio/netbird/commit/e39c9df59db46803ec77c2b8308be730cbfdaadd) Add comment - [`ca760e9`](https://github.com/netbirdio/netbird/commit/ca760e91cf94491fc8ec6d109f791011092c3007) Code cleaning - [`ae441fb`](https://github.com/netbirdio/netbird/commit/ae441fb0520d0abcf2ff3a11dea2d0dd2e8a0eff) Fix compile issue - [`2903313`](https://github.com/netbirdio/netbird/commit/2903313eb4c837a7380685faf754f172202aec0d) Fix test - [`014fbce`](https://github.com/netbirdio/netbird/commit/014fbce2914e43fcb3cca09fcc1be905a6c3e322) Fix build - [`422cee5`](https://github.com/netbirdio/netbird/commit/422cee59773291cc1301e65dda28e34ca35aa1a8) Fix lint ### 📊 Changes **16 files changed** (+467 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `client/internal/engine.go` (+1 -1) 📝 `client/internal/peer/conn.go` (+4 -4) 📝 `client/internal/peer/conn_test.go` (+4 -4) 📝 `client/internal/wgproxy/ebpf/portlookup.go` (+1 -1) 📝 `client/internal/wgproxy/ebpf/portlookup_test.go` (+1 -1) 📝 `client/internal/wgproxy/ebpf/proxy.go` (+88 -77) 📝 `client/internal/wgproxy/ebpf/proxy_test.go` (+4 -5) ➕ `client/internal/wgproxy/ebpf/wrapper.go` (+44 -0) ➖ `client/internal/wgproxy/factory.go` (+0 -22) 📝 `client/internal/wgproxy/factory_linux.go` (+28 -5) 📝 `client/internal/wgproxy/factory_nonlinux.go` (+14 -2) 📝 `client/internal/wgproxy/proxy.go` (+3 -3) ➕ `client/internal/wgproxy/proxy_test.go` (+128 -0) ➖ `client/internal/wgproxy/proxy_userspace.go` (+0 -129) ➕ `client/internal/wgproxy/usp/proxy.go` (+146 -0) 📝 `relay/client/picker_test.go` (+1 -1) </details> ### 📄 Description Port the conn close call to eBPF proxy ## Describe your changes - Move the userspace proxy and ebpf proxy to separated packages - Extend the ebpf proxy with Close() function ## Issue ticket number and link ### 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 --- <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:35 -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#15413