fatedier / frp

A fast reverse proxy to help you expose a local server behind a NAT or firewall to the internet.
Apache License 2.0
85.64k stars 13.27k forks source link

STUN服务不满足要求 #4510

Closed Qiiamx closed 2 hours ago

Qiiamx commented 2 hours ago

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

  1. ...

Affected area

fatedier commented 2 hours ago

3469

Qiiamx commented 1 hour ago

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