mirror of
https://github.com/fatedier/frp.git
synced 2026-05-15 16:15:49 -06:00
[PR #3382] [MERGED] feat(nathole): use serverUDPPort in nathole discovery when available #4738
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#4738
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/3382
Author: @fatedier
Created: 3/30/2023
Status: ✅ Merged
Merged: 3/30/2023
Merged by: @fatedier
Base:
dev← Head:nathole📝 Commits (1)
80e4db8feat(nathole): use serverUDPPort in nathole discovery when available📊 Changes
3 files changed (+151 additions, -97 deletions)
View changed files
📝
cmd/frpc/sub/nathole.go(+9 -4)📝
pkg/nathole/discovery.go(+125 -93)📝
pkg/nathole/utils.go(+17 -0)📄 Description
Summary
🤖 Generated by Copilot at
80e4db8This pull request adds a feature to enable NAT hole punching without a server UDP port, using the server TCP port and multiple stun servers instead. It modifies
cmd/frpc/sub/nathole.goto handle the new feature, and refactors and enhancespkg/nathole/discovery.goandpkg/nathole/utils.goto use strings, a newdiscoverConntype, and a newChangedAddresstype for nathole discovery.WHY
Walkthrough
🤖 Generated by Copilot at
80e4db8discoverConntype to send stun requests and discover external addresses from primary and secondary stun servers (link)ChangedAddressto get the changed address attribute from a stun response (link)net,strconv, andgithub.com/pion/stun(link)Addressfrom the nathole package (link)net.Addrobjects (link)discoverConntype (link)🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.