{"record":{"id":"834a76785681541b","repo":"AlexxIT/go2rtc","slug":"unsupported-scheme-u-scheme","errorCode":null,"errorMessage":"unsupported scheme: ${u.Scheme}","messagePattern":"unsupported scheme: (.+?)","errorType":"error_code","errorClass":null,"httpStatus":null,"severity":"error","filePath":"pkg/tcp/dial.go","lineNumber":42,"sourceCode":"\t\t\taddress = u.Host + \":1935\"\n\t\tcase \"rtmps\", \"rtmpx\":\n\t\t\taddress = u.Host + \":443\"\n\t\t}\n\t\thostname = u.Host\n\t}\n\n\tvar secure *tls.Config\n\n\tswitch u.Scheme {\n\tcase \"rtsp\", \"rtmp\":\n\tcase \"rtsps\", \"rtspx\", \"rtmps\", \"rtmpx\":\n\t\tif u.Scheme[4] == 'x' || IsIP(hostname) {\n\t\t\tsecure = &tls.Config{InsecureSkipVerify: true}\n\t\t} else {\n\t\t\tsecure = &tls.Config{ServerName: hostname}\n\t\t}\n\tdefault:\n\t\treturn nil, errors.New(\"unsupported scheme: \" + u.Scheme)\n\t}\n\n\tconn, err := net.DialTimeout(\"tcp\", address, timeout)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\n\tif secure == nil {\n\t\treturn conn, nil\n\t}\n\n\ttlsConn := tls.Client(conn, secure)\n\tif err = tlsConn.Handshake(); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif u.Scheme[4] == 'x' {\n\t\tu.Scheme = u.Scheme[:4] + \"s\"","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/AlexxIT/go2rtc/blob/c245815e75e2a5fd60b4290f12bfc04e55a984d3/pkg/tcp/dial.go#L24-L60","documentation":"tcp.Dial scheme guard: the URL scheme is not one of rtsp/rtsps/rtspx/rtmp/rtmps/rtmpx handled by this dialer (offending scheme appended). Only RTSP and RTMP families over TCP/TLS are supported here; anything else is refused before any connection attempt.","triggerScenarios":"Thrown at pkg/tcp/dial.go:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the URL scheme typo (rstp->rtsp, rtsp+s variants)","Use the proper dialer for other protocols (udp, srt, etc.)","For secure variants use rtsps/rtmps; 'x' suffix forces InsecureSkipVerify"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"c245815e75e2a5fd60b4290f12bfc04e55a984d3","analyzedAt":"2026-09-07T11:47:02.965Z","contentChangedAt":"2026-09-07T11:47:02.965Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}