[PR #4771] [MERGED] vnet: fix issues #5040

Closed
opened 2026-05-05 14:53:34 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/4771
Author: @fatedier
Created: 4/27/2025
Status: Merged
Merged: 4/27/2025
Merged by: @fatedier

Base: devHead: new


📝 Commits (1)

📊 Changes

18 files changed (+268 additions, -182 deletions)

View changed files

📝 client/admin_api.go (+6 -6)
📝 client/control.go (+1 -1)
📝 client/service.go (+1 -1)
📝 pkg/plugin/client/virtual_net.go (+32 -11)
📝 pkg/plugin/visitor/virtual_net.go (+20 -60)
📝 pkg/util/vhost/http.go (+1 -1)
📝 pkg/util/vhost/vhost.go (+1 -1)
📝 pkg/vnet/controller.go (+72 -46)
📝 pkg/vnet/message.go (+4 -4)
📝 pkg/vnet/tun.go (+47 -15)
📝 pkg/vnet/tun_linux.go (+55 -8)
📝 server/control.go (+1 -1)
📝 server/dashboard_api.go (+10 -10)
📝 server/service.go (+9 -9)
📝 test/e2e/e2e.go (+1 -1)
📝 test/e2e/framework/request.go (+3 -3)
📝 test/e2e/legacy/features/real_ip.go (+2 -2)
📝 test/e2e/v1/features/real_ip.go (+2 -2)

📄 Description

WHY

Summary by CodeRabbit

  • New Features

    • Improved TUN device handling with dynamic device naming and enhanced buffer management for more efficient packet processing.
    • Enhanced connection lifecycle management and cleanup in virtual network plugins and controllers.
  • Refactor

    • Simplified and optimized internal connection tracking, route registration, and cleanup logic for virtual network components.
    • Updated batch reading and writing mechanisms for TUN devices to improve performance and reliability.
  • Style

    • Standardized log message formatting across the application by using lowercase initial letters for consistency.
  • Bug Fixes

    • Corrected error formatting to support proper error wrapping and improved error messages for easier debugging.
  • Chores

    • Updated test log outputs for consistency with new log message standards.

🔄 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/fatedier/frp/pull/4771 **Author:** [@fatedier](https://github.com/fatedier) **Created:** 4/27/2025 **Status:** ✅ Merged **Merged:** 4/27/2025 **Merged by:** [@fatedier](https://github.com/fatedier) **Base:** `dev` ← **Head:** `new` --- ### 📝 Commits (1) - [`1323010`](https://github.com/fatedier/frp/commit/1323010310fd7b0ce53ea6cb0a9beca7279bb779) vnet: fix issues ### 📊 Changes **18 files changed** (+268 additions, -182 deletions) <details> <summary>View changed files</summary> 📝 `client/admin_api.go` (+6 -6) 📝 `client/control.go` (+1 -1) 📝 `client/service.go` (+1 -1) 📝 `pkg/plugin/client/virtual_net.go` (+32 -11) 📝 `pkg/plugin/visitor/virtual_net.go` (+20 -60) 📝 `pkg/util/vhost/http.go` (+1 -1) 📝 `pkg/util/vhost/vhost.go` (+1 -1) 📝 `pkg/vnet/controller.go` (+72 -46) 📝 `pkg/vnet/message.go` (+4 -4) 📝 `pkg/vnet/tun.go` (+47 -15) 📝 `pkg/vnet/tun_linux.go` (+55 -8) 📝 `server/control.go` (+1 -1) 📝 `server/dashboard_api.go` (+10 -10) 📝 `server/service.go` (+9 -9) 📝 `test/e2e/e2e.go` (+1 -1) 📝 `test/e2e/framework/request.go` (+3 -3) 📝 `test/e2e/legacy/features/real_ip.go` (+2 -2) 📝 `test/e2e/v1/features/real_ip.go` (+2 -2) </details> ### 📄 Description ### WHY <!-- author to complete --> <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Improved TUN device handling with dynamic device naming and enhanced buffer management for more efficient packet processing. - Enhanced connection lifecycle management and cleanup in virtual network plugins and controllers. - **Refactor** - Simplified and optimized internal connection tracking, route registration, and cleanup logic for virtual network components. - Updated batch reading and writing mechanisms for TUN devices to improve performance and reliability. - **Style** - Standardized log message formatting across the application by using lowercase initial letters for consistency. - **Bug Fixes** - Corrected error formatting to support proper error wrapping and improved error messages for easier debugging. - **Chores** - Updated test log outputs for consistency with new log message standards. <!-- 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>
gitea-mirror 2026-05-05 14:53:34 -06:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/frp#5040
No description provided.