mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #4681] [CLOSED] feat: add support for setting custom udp listen port on the xtcp mode #5026
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#5026
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/4681
Author: @zjay1987
Created: 2/20/2025
Status: ❌ Closed
Base:
dev← Head:dev📝 Commits (1)
5b32150feat: add support for setting custom udp listen port on the xtcp mode📊 Changes
4 files changed (+9 additions, -4 deletions)
View changed files
📝
client/proxy/xtcp.go(+1 -1)📝
client/visitor/xtcp.go(+1 -1)📝
pkg/config/v1/visitor.go(+5 -0)📝
pkg/nathole/nathole.go(+2 -2)📄 Description
Enhancing xtcp Connectivity with UDP Port Forwarding
If the home router’s NAT traversal (hole punching) doesn’t work well—such as when it operates in Symmetric NAT mode only—an explicit UDP port forwarding rule can be configured on the router to make the NAT on the configured port deterministic. For example:
Router Configuration
frpc Configuration
With this setup, frpc will use UDP port 9999 for communication with the STUN server instead of selecting a random port. Since port 9999 on the router is already configured to forwarded all traffics to {Your-LAN-IP}:9999, if there's no other Symmetric NAT above the router, a successful xtcp connection will be established.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.