xtcp: add configuration to disable assisted addresses in NAT traversal (#4951)

This commit is contained in:
fatedier
2025-08-25 15:52:52 +08:00
committed by GitHub
parent 14253afe2f
commit 80d3f332e1
8 changed files with 63 additions and 11 deletions

View File

@@ -96,6 +96,14 @@ type TLSConfig struct {
ServerName string `json:"serverName,omitempty"`
}
// NatTraversalConfig defines configuration options for NAT traversal
type NatTraversalConfig struct {
// DisableAssistedAddrs disables the use of local network interfaces
// for assisted connections during NAT traversal. When enabled,
// only STUN-discovered public addresses will be used.
DisableAssistedAddrs bool `json:"disableAssistedAddrs,omitempty"`
}
type LogConfig struct {
// This is destination where frp should write the logs.
// If "console" is used, logs will be printed to stdout, otherwise,