[GH-ISSUE #4510] STUN服务不满足要求 #3564

Closed
opened 2026-05-05 14:17:28 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @Qiiamx on GitHub (Oct 24, 2024).
Original GitHub issue: https://github.com/fatedier/frp/issues/4510

Bug Description

xtcp报错(如果我不配置stun服务器则不会报错但是打洞的过程经常会超时)
所以我自己用coturn建了一个stun服务器,但是打洞失败,日志如下

1729759303047(1)

我查了源代码, 不理解为什么要加这一行
if len(addrs) < 2 { return nil, fmt.Errorf("discover error: not enough addresses") }
求佬解答

frpc Version

0.61.0

frps Version

0.61.0

System Architecture

windows/amd64

Configurations

serverAddr = "xxxx"
serverPort = 7000
auth.method = "token"
auth.token = "xxxx"
natHoleStunServer = "121.89.169.157:3478"

webServer.addr = "127.0.0.1"
webServer.port = 7400
webServer.user = "admin"
webServer.password = "admin"

proxies
#name = "nginx"
#type = "tcp"
#localIP = "127.0.0.1"
#localPort = 80
#remotePort = 7999
name = "nginx"
type = "xtcp"
localIP = "127.0.0.1"
localPort = 80
secretKey = "xxxx"

Logs

nathole prepare error: discover error: not enough addresses

Steps to reproduce

...

Affected area

  • Docs
  • Installation
  • Performance and Scalability
  • Security
  • User Experience
  • Test and Release
  • Developer Infrastructure
  • Client Plugin
  • Server Plugin
  • Extensions
  • Others
Originally created by @Qiiamx on GitHub (Oct 24, 2024). Original GitHub issue: https://github.com/fatedier/frp/issues/4510 ### Bug Description xtcp报错(如果我不配置stun服务器则不会报错但是打洞的过程经常会超时) 所以我自己用coturn建了一个stun服务器,但是打洞失败,日志如下 ![1729759303047(1)](https://github.com/user-attachments/assets/572daca8-c28d-4a41-a026-caf52d2ecc81) 我查了源代码, 不理解为什么要加这一行 ` if len(addrs) < 2 { return nil, fmt.Errorf("discover error: not enough addresses") }` 求佬解答 ### frpc Version 0.61.0 ### frps Version 0.61.0 ### System Architecture windows/amd64 ### Configurations serverAddr = "xxxx" serverPort = 7000 auth.method = "token" auth.token = "xxxx" natHoleStunServer = "121.89.169.157:3478" webServer.addr = "127.0.0.1" webServer.port = 7400 webServer.user = "admin" webServer.password = "admin" [[proxies]] #name = "nginx" #type = "tcp" #localIP = "127.0.0.1" #localPort = 80 #remotePort = 7999 name = "nginx" type = "xtcp" localIP = "127.0.0.1" localPort = 80 secretKey = "xxxx" ### Logs nathole prepare error: discover error: not enough addresses ### Steps to reproduce 1. 2. 3. ... ### Affected area - [ ] Docs - [ ] Installation - [ ] Performance and Scalability - [ ] Security - [ ] User Experience - [ ] Test and Release - [ ] Developer Infrastructure - [ ] Client Plugin - [ ] Server Plugin - [ ] Extensions - [X] Others
Author
Owner

@fatedier commented on GitHub (Oct 24, 2024):

#3469

<!-- gh-comment-id:2434706322 --> @fatedier commented on GitHub (Oct 24, 2024): #3469
Author
Owner

@Qiiamx commented on GitHub (Oct 24, 2024):

一言以蔽之, 如果你的STUN服务器没有两个公网IP
coturn.conf中
把 no-rfc5780 注释掉
external-ip 写 公网IP/内网IP
佬,太帅了佬= =

<!-- gh-comment-id:2434866832 --> @Qiiamx commented on GitHub (Oct 24, 2024): 一言以蔽之, 如果你的STUN服务器没有两个公网IP coturn.conf中 把 no-rfc5780 注释掉 external-ip 写 公网IP/内网IP 佬,太帅了佬= =
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#3564
No description provided.