Open gak opened 2 years ago
I don't think you've done anything stupid .. Personally I have been very stumped by how to get this working on Firefox. I've spent several hours myself messing with Firefox feature flags regarding WebRTC .. no luck.
Related: https://github.com/naia-lib/naia/issues/46 https://github.com/triplehex/webrtc-unreliable/issues/3 (kyren seems to think the issue is with the loopback address in the demo .. not true)
Wait, I saw a little while back on Discord that Firefox requires you use port 3478 for WebRTC? Try that. Also search for "Firefox" in the Naia Discord for further hints possibly?
Thanks for the response! I'll try your suggestions and check out the Discord, report here if I discover a solution.
I didn't know about the port 3478 requirement for Firefox.
I've tried to just change the port for webrtc_listen_addr
and public_webrtc_url
.
(But not session_listen_addr
)
Unfortunately Firefox still refuses to connect.
I still guess it has something to do with webrtc-unreliable
and connecting to IPv6 only...
Also it kind of makes sense to firefox to not allow the connection. Have a look at the response I'm getting from the naia server:
Of course this is the correct IPv4 address of my server. But the DNS entry only resolves to the IPv6 address. So firefox assumes the IPv6 address to be the one to cummunicate with. I think security wise it's a good idea to reject connections to other addresses. Think of it like the CORS restrictions modern browsers have these days.
Oh and just for completeness. This is what I get in chromium, where everything works fine:
As you can see, here the server offers both IPv6 und IPv4. Chromium decides to use IPv4 but fortunately doesn't care about the "foreign" address.
Okay, nevermind. I've disabled IPv6 on my server completely. Won't work either...
Hi,
I've been able to get a connection from Firefox to naia based server via WebRTC perfectly fine on LAN addresses. As soon as it connects via a public IP address, I get the error below. I can only guess it is using some other protocol when it should just be sending a HTTP POST?
I've tried many combinations of things with no luck. CORS is enabled for all hosts, if that makes a difference.
When changing the IP address I always update the
public_webrtc_url
inServerAddrs
to match the public IP address of the server.I thought it was a firewall issue (at home), so I just ran it on a DigitalOcean host (which is what the logs are below) and exactly the same thing happened.
(Very limited knowledge about this:) I tried removing the STUN entries as I don't need any sort of NAT, as the server is not behind a NAT, but that caused a panic elsewhere in the code.
Sorry for asking in here, this is probably me doing something stupid (I don't know much about WebRTC), and thought this would be the best place to get a good answer. Thanks for any hints/help.