[BUG]webrtc ICE候选时本地ipv4与远端地址ipv6族不一致,且不支持mDNS 地址(.local)
现象描述
ZLMediaKit 未匹配IP地址族,导致尝试向 IPv6 地址发送 IPv4 UDP 包失败。chrome浏览器发送ICE候选时会发送xxxx.local内网地址,但ZLMediaKit不支持这种地址的解析
如何复现?
1、在局域网部署zlmediakit,外网服务器部署信令服务 2、通过SDK中mk_webrtc_add_room_keeper接口将内网ZLM注册到信令服务中 3、手机4G服务访问外网服务器上的网页,通过信令服务中转,webrtc播放内网视频
相关日志或截图
-- 协议族不一致的日志 2026-06-16 08:43:51.074 I [main.exe] [3588-event poller 0] IceTransport.cpp:1904 addToChecklist | connectivity check candidate pair local host 192.168.0.100:62398 <-> remote srflx 2409:895a:d8cf:84e2:98c3:78ff:fee2:c875:54269, pair info: udp 192.168.0.100:62398<->2409:895a:d8cf:84e2:98c3:78ff:fee2:c875:54269 2026-06-16 08:43:51.074 W [main.exe] [3588-event poller 0] Socket.cpp:871 flushData | Send udp socket[764] failed, data ignored: address family not supported
--不支持mDNS 2026-06-15 20:19:08.993 E [main.exe] [22416-event poller 0] Timer.cpp:31 operator () | Exception occurred when do timer task: Not ip address: 30212e81-7185-44b5-aa2d-871c137935b0.local 2026-06-15 20:19:09.089 E [main.exe] [22416-event poller 0] Timer.cpp:31 operator () | Exception occurred when do timer task: Not ip address: b583389b-5070-46fa-afbd-30866ae93aa7.local 2026-06-15 20:19:09.089 E [main.exe] [22416-event poller 0] Timer.cpp:31 operator () | Exception occurred when do timer task: Not ip address: b583389b-5070-46fa-afbd-30866ae93aa7.local
配置
默认配置
各种环境信息
本地电脑:windows11 zlm版本:编译日期: 2026-06-11
Source: ZLMediaKit/ZLMediaKit