-
Notifications
You must be signed in to change notification settings - Fork 591
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
WebRTC through WAN while client is on the same LAN #681
Comments
You need to open chrome://webrtc-internals/ before webrtc connection start and show candidates tables for old and new versions. You can send them in PM, if you want. |
Please check in attachment. |
Sorry for bothering Alex, but any ideas on my issue? |
Can check this on next week |
I can't see the candidates section in your config. Did you remove it when you posted to github? |
I have no such section in frigate.yaml at all. But when I check go2rtc dashboard at http://192.168.2.3:5000/live/webrtc/editor.html, I see the actual config go2rtc is using, and it has the same for all versions as follows:
|
OK. This is a problem. Both candidates have the same priority. I will think for the solution. |
No luck, it didn't help - still through WAN IP in my setup. Details attached. In log, I've noticed there's candidate advertisement as 2918e18d-56b7-4900-a25d-eb1fc2b86956.local - which is Chrome's way to obfuscate IPs of local candidates. Can this be a problem? Found this on topic: https://groups.google.com/g/discuss-webrtc/c/4Yggl6ZzqZk/m/nV24XkXXAQAJ?pli=1 and https://bloggeek.me/psa-mdns-and-local-ice-candidates-are-coming/ I'm absolutely not into topic, so please excuse my probably naive assumptions. |
You need to add to your config: go2rtc:
webrtc:
listen: ":8555" |
Added to frigate config as you suggesting:
And that's didn't change anything.
The log is like this (note WebRTC port was provided by supervisor):
The final config and log of go2rtc output was the same regardless if I include into frigate config this:
The webrtc-internals still shows WAN IP local/remote candidates pair chosen. |
@NickM-27 I've looked into your PR above, and I think there's a mistake. It reads:
While webrtc should listen to :8555 |
Oh yes that would explain it, it was an early morning for me 🤦🏻♂️ |
So I made some more experiments and here's my findings. First, explicitly adding listen address to config really helped (I added listen: ":8555"), and since then candidates pair is being chosen correctly, i.e. direct LAN IPs of client and server. But there are some things that seem questionnable to me:
|
|
@NickM-27 just restarted and got:
|
Ahhh, big thanks for that hint! Explicitly specified default candidates and now config was transferred well, along with listen parameter, so for now, my problem is solved. @AlexxIT But ideally, those defaults have to be sorted at the go2rtc side as well, since they're documented already |
Defaults was changed with v1.3. But docs not. |
I would say then, that there was nothing wrong with the go2rtc as such, except that defaults changed and so documentation and its startup log (where it still writes :8555) became out of sync from actual logic since then. |
Environment: HomeAssistant on RPI4 64 bit, HASSIO addon Frigate (Full Access) 0.12.1
Since some version of go2rtc, when client is on same LAN as HA, in some cases WebRTC candidate is chosen of type srflx which causes traffic to go through WAN interface back and forth. This really bad for my 4G connection with limited traffic.
go2rtc versions checked: 1.2.0, 1.6.2, 1.7.1
v1.2.0 (bundled with addon) works correctly, i.e. while client on same LAN as HA, the host candidate is always chosen, both for Chrome on wired desktop and for HA Companion app on Android phone (WiFi)
v1.6.2 and 1.7.1 (placed one by one to config directory) - issue is the same for both. For wired desktop with Chrome, srflx candidate is chosen, and all traffic goes through WAN interface. Surprisingly, HA Companion App still works throug LAN.
My config:
The text was updated successfully, but these errors were encountered: