mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 08:05:49 -06:00
[PR #4943] [CLOSED] Interface Binding Support for frpc #5083
Labels
No labels
In Progress
WIP
WaitingForInfo
bug
doc
duplicate
easy
enhancement
future
help wanted
invalid
lifecycle/stale
need-issue-template
need-usage-help
no plan
proposal
pull-request
question
todo
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/frp#5083
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/fatedier/frp/pull/4943
Author: @jeet0733
Created: 8/18/2025
Status: ❌ Closed
Base:
dev← Head:feature/interface-binding-support📝 Commits (1)
07c8bb7Interface Binding Support for frpc📊 Changes
11 files changed (+434 additions, -6 deletions)
View changed files
📝
README.md(+35 -0)📝
client/connector.go(+22 -2)📝
conf/frpc_full_example.toml(+8 -1)📝
conf/legacy/frpc_legacy_full.ini(+8 -1)📝
pkg/config/flags.go(+2 -0)📝
pkg/config/legacy/client.go(+7 -1)📝
pkg/config/legacy/conversion.go(+1 -0)📝
pkg/config/v1/client.go(+6 -1)📝
pkg/config/v1/validation/client.go(+28 -0)➕
pkg/util/net/interface.go(+206 -0)➕
pkg/util/net/interface_test.go(+111 -0)📄 Description
What does this PR do?
This PR adds network interface binding support to frpc, allowing users to specify which network interface to use when connecting to the frps server. This is particularly useful for multi-network systems or when routing traffic through specific network paths.
Changes Made
New Features
pkg/util/net/interface.go): Core functionality for resolving interface names to IP addresses and auto-detectionpkg/util/net/interface.go): Validates interface names and IP addresses with security checksclient/connector.go): Integrates interface binding with connection establishmentpkg/config/v1/client.go): Added connectServerInterface field for TOML configurationpkg/config/flags.go): Added--bind-interfaceand--bind-ipflagspkg/config/legacy/client.go): Backward compatibility with INI configuration formatpkg/config/v1/validation/client.go): Ensures mutual exclusivity and validates interface namesEnhancements
Documentation
Configuration Example
TOML Configuration
Command Line
Legacy INI Configuration
Benefits
Testing
✅ All existing tests pass
✅ Code formatting and linting checks pass
✅ Interface name validation tests
✅ IP address validation tests
✅ Auto-detection functionality tests
✅ Cross-platform compatibility verified
✅ Race condition testing completed
Related Issues
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.