[PR #3395] [MERGED] nathole: support discover without configuration file #4739

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

📋 Pull Request Information

Original PR: https://github.com/fatedier/frp/pull/3395
Author: @fatedier
Created: 4/10/2023
Status: Merged
Merged: 4/10/2023
Merged by: @fatedier

Base: devHead: nathole


📝 Commits (1)

  • 5fa1026 nathole: support discover without configuration file

📊 Changes

1 file changed (+11 additions, -7 deletions)

View changed files

📝 cmd/frpc/sub/nathole.go (+11 -7)

📄 Description

Summary

🤖 Generated by Copilot at 5fa1026

Added a new option and a default value for nathole feature in frpc. This improves the usability and reliability of UDP hole punching for frp clients.

WHY

Walkthrough

🤖 Generated by Copilot at 5fa1026

  • Add a new flag --server_udp_port to specify the UDP port of frps for nathole (link)
  • Change the default value of natHoleSTUNServer to "stun.easyvoip.com:3478" to provide a public STUN server for nathole (link)
  • Override the values of natHoleSTUNServer and serverUDPPort in the cfg object with the flag values if they are not empty or zero (link)
  • Remove the error handling of config.ParseClientConfig in nathole.go as the flags can override the config file or the environment variables (link)
  • Add a new variable serverUDPPort to store the UDP port of frps for nathole (link)

🔄 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/3395 **Author:** [@fatedier](https://github.com/fatedier) **Created:** 4/10/2023 **Status:** ✅ Merged **Merged:** 4/10/2023 **Merged by:** [@fatedier](https://github.com/fatedier) **Base:** `dev` ← **Head:** `nathole` --- ### 📝 Commits (1) - [`5fa1026`](https://github.com/fatedier/frp/commit/5fa10261e4e677e78d38dc046b1f0c72b48b055f) nathole: support discover without configuration file ### 📊 Changes **1 file changed** (+11 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `cmd/frpc/sub/nathole.go` (+11 -7) </details> ### 📄 Description ### Summary <!-- copilot:summary --> ### <samp>🤖 Generated by Copilot at 5fa1026</samp> Added a new option and a default value for nathole feature in `frpc`. This improves the usability and reliability of UDP hole punching for frp clients. ### WHY <!-- author to complete --> ### Walkthrough <!-- copilot:walkthrough --> ### <samp>🤖 Generated by Copilot at 5fa1026</samp> * Add a new flag `--server_udp_port` to specify the UDP port of frps for nathole ([link](https://github.com/fatedier/frp/pull/3395/files?diff=unified&w=0#diff-5ac4ee81516dfc6b3f0a0abd3e447ee4a2d03d59a7a62be497d7dbf208c3da0dL37-R41)) * Change the default value of `natHoleSTUNServer` to "stun.easyvoip.com:3478" to provide a public STUN server for nathole ([link](https://github.com/fatedier/frp/pull/3395/files?diff=unified&w=0#diff-5ac4ee81516dfc6b3f0a0abd3e447ee4a2d03d59a7a62be497d7dbf208c3da0dL37-R41)) * Override the values of `natHoleSTUNServer` and `serverUDPPort` in the `cfg` object with the flag values if they are not empty or zero ([link](https://github.com/fatedier/frp/pull/3395/files?diff=unified&w=0#diff-5ac4ee81516dfc6b3f0a0abd3e447ee4a2d03d59a7a62be497d7dbf208c3da0dL49-R60)) * Remove the error handling of `config.ParseClientConfig` in `nathole.go` as the flags can override the config file or the environment variables ([link](https://github.com/fatedier/frp/pull/3395/files?diff=unified&w=0#diff-5ac4ee81516dfc6b3f0a0abd3e447ee4a2d03d59a7a62be497d7dbf208c3da0dL49-R60)) * Add a new variable `serverUDPPort` to store the UDP port of frps for nathole ([link](https://github.com/fatedier/frp/pull/3395/files?diff=unified&w=0#diff-5ac4ee81516dfc6b3f0a0abd3e447ee4a2d03d59a7a62be497d7dbf208c3da0dL29-R32)) --- <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:47:51 -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#4739
No description provided.