ICE candidates with docker IP
Dockerized go2RTC generates SDP answer with ice candidates containing the private docker IP. (172.18.0.2)
a=candidate:2516015194 1 udp 2130706431 172.18.0.2 44774 typ host
a=candidate:2516015194 2 udp 2130706431 172.18.0.2 44774 typ host
when runninc go2rtc via the binary the ip in these candidates (192.168.2.6) is correct
a=candidate:3078786767 1 udp 2130706431 192.168.2.6 39703 typ host
a=candidate:3078786767 2 udp 2130706431 192.168.2.6 39703 typ host
Not sure if this is something that can be fixed with code changes or different configuration in docker
Some docker IP ignored, but not all of them. It is very complicated thing for setup. I don't want the software to be for nerds.
https://github.com/AlexxIT/go2rtc/blob/12925a6bc5ed203582f465ef45ef4992270d8823/pkg/webrtc/api.go#L30-L32
For what it's worth, MediaMTX addresses this problem with a single config setting:
webrtcAdditionalHosts: [192.168.X.X]
https://github.com/bluenviron/mediamtx#connectivity-issues
go2rtc also has "additional hosts" via candidates setting