AlexxIT/go2rtc · error
streams: source from insecure producer
Error message
streams: source from insecure producer
What it means
Validate rejects a source URL whose scheme has been marked insecure via MarkInsecure. It is a policy guard, not a protocol error: the scheme itself is functional but deliberately blocked (see the TODO about reviewing insecure-source logic), so any source using it fails validation before a stream is created.
Solutions
- Switch to a secure variant of the protocol (e.g. rtsps/https instead of rtsp/http)
- Find where MarkInsecure was called for this scheme and remove or override it if the source is trusted
- Wrap the insecure source in a secure proxy and use the proxied URL
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at internal/streams/handlers.go:127 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of AlexxIT/go2rtc@c245815e75 (2026-09-07).
Data as JSON: /api/errors/881071bdf9369d68.
Report an issue: GitHub.
Appendix: source
Thrown at internal/streams/handlers.go:127
}
}
return nil, nil, errors.New("streams: unsupported scheme: " + url)
}
var insecure = map[string]bool{}
func MarkInsecure(scheme string) {
insecure[scheme] = true
}
var sanitize = regexp.MustCompile(`\s`)
func Validate(source string) error {
// TODO: Review the entire logic of insecure sources
if i := strings.IndexByte(source, ':'); i > 0 {
if insecure[source[:i]] {
return errors.New("streams: source from insecure producer")
}
}
if sanitize.MatchString(source) {
return errors.New("streams: source with spaces may be insecure")
}
return nil
}
View on GitHub (pinned to c245815e75)