Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Which stun server implement is suitable for frp xtcp? #4321

Open
kkocdko opened this issue Jul 7, 2024 · 3 comments
Open

Which stun server implement is suitable for frp xtcp? #4321

kkocdko opened this issue Jul 7, 2024 · 3 comments

Comments

@kkocdko
Copy link

kkocdko commented Jul 7, 2024

Use stun.miwifi.com:3478 and 111.206.174.3:3478 works well. However:

frp-0.58.1 - debian-12-x86-64-kernel-6.1

# other config (frpc)
serverAddr = "111.111.111.111"
serverPort = 7000
natHoleStunServer = "111.111.111.111:3478" # use stun.miwifi.com:3478 and 111.206.174.3:3478 works fine

debian apt coturn (4.6.1-1) failed:

# coturn
turnserver -L 0.0.0.0 -p 3478 -v --no-auth --allow-loopback-peers --no-cli --no-dtls --no-tls
66: : session 000000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80
66: : session 000000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0
66: : session 000000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:35326, reason: allocation watchdog determined stale session state
77: : session 001000000000000001: usage: realm=<>, username=<>, rp=1, rb=20, sp=1, sb=80
77: : session 001000000000000001: peer usage: realm=<>, username=<>, rp=0, rb=0, sp=0, sb=0
77: : session 001000000000000001: closed (2nd stage), user <> realm <> origin <>, local 0.0.0.0:3478, remote 222.222.222.222:44711, reason: allocation watchdog determined stale session state

# frp
2024-07-08 06:15:53.473 [I] [visitor/visitor_manager.go:172] [56412290dbbec8b7] visitor added: [klc2_rdp_visitor klc_klc2_rdp_visitor klc_ssh_visitor klc3_ssh_visitor]
2024-07-08 06:15:55.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:16:05.839 [W] [visitor/xtcp.go:280] [56412290dbbec8b7] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:16:15.795 [E] [visitor/xtcp.go:179] [56412290dbbec8b7] [klc_ssh_visitor] open tunnel error: open tunnel timeout

paullouisageneau/violet (0.5.0) failed:

# violet
2024-07-08 06:18:09 INFO    Got STUN binding from client 99.99.99.99:47800
2024-07-08 06:18:19 INFO    Got STUN binding from client 99.99.99.99:41618

# frp
2024-07-08 06:17:58.626 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:18:08.624 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
2024-07-08 06:18:18.579 [E] [visitor/xtcp.go:179] [9c4d203bf39c6acb] [klc_ssh_visitor] open tunnel error: open tunnel timeout
2024-07-08 06:18:18.625 [W] [visitor/xtcp.go:280] [9c4d203bf39c6acb] [klc_ssh_visitor] nathole prepare error: discover error: not enough addresses
@kkocdko kkocdko changed the title editing Which stun server implement is suitable for frp? Jul 7, 2024
@kkocdko
Copy link
Author

kkocdko commented Jul 7, 2024

Is frp server + stun server on same ip not allowed?

The point I checked:

  • Firewall (all port passed, use stunner test fine).
  • NAT Type: 3 (both side).
  • Other public stun server: default server and stun.miwifi.com:3478 and 111.206.174.3:3478 works well.

@kkocdko kkocdko changed the title Which stun server implement is suitable for frp? Which stun server implement is suitable for frp xtcp? Jul 7, 2024
@fatedier
Copy link
Owner

fatedier commented Jul 8, 2024

I'm not sure. Most likely your stun server is not following the standard STUN protocol.

@kkocdko
Copy link
Author

kkocdko commented Jul 10, 2024

I will test more stun server implement, then post my test result here. After all done, I'll close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants