ITADN

moq-rtc: default config fails every WHIP/WHEP accept with HTTP 500 (unspecified-IP candidate)

#2004Closedkixelated 创建于 2026-07-02
K
kixelatedcommented
## Summary With the default `Config` (`udp_bind = 0.0.0.0:0`, no ICE candidates configured), moq-rtc falls back to `socket.local_addr()` for the advertised host candidate (`rs/moq-rtc/src/server/mux.rs:81-83` on main, same for the client paths). A socket bound to `0.0.0.0:0` reports the unspecified address, and `str0m`'s `Candidate::host()` rejects any unspecified IP (`BadCandidate`). ## Impact Every incoming WHIP/WHEP POST returns HTTP 500 ("invalid ip 0.0.0.0") under the documented default. The `Config::udp_bind` doc claims the default "works for loopback testing", which is false; it requires `--udp-bind 127.0.0.1:0` or an explicit public address to work at all. ## Suggested fix When the bind address is unspecified and no candidates are configured, either substitute loopback (and say so in a log line), enumerate local interface addresses, or fail fast at bind time with an actionable error instead of per-request 500s. Found during a full review of the dev branch; the same fallback exists on main. (Written by Claude Fable 5)
关闭于 2026-07-03 1 条评论