go2rtc icon indicating copy to clipboard operation
go2rtc copied to clipboard

ICE candidates with docker IP

Open dlavrantonis opened this issue 3 years ago • 3 comments

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

dlavrantonis avatar Oct 04 '22 20:10 dlavrantonis

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

AlexxIT avatar Oct 06 '22 11:10 AlexxIT

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

JoeHogan avatar Dec 12 '23 17:12 JoeHogan

go2rtc also has "additional hosts" via candidates setting

AlexxIT avatar Apr 23 '24 12:04 AlexxIT