|
|
|
@ -117,11 +117,11 @@ func (s *rtspSource) run() { |
|
|
|
func (s *rtspSource) runInner() bool { |
|
|
|
func (s *rtspSource) runInner() bool { |
|
|
|
s.log(logger.Debug, "connecting") |
|
|
|
s.log(logger.Debug, "connecting") |
|
|
|
|
|
|
|
|
|
|
|
client := &gortsplib.Client{ |
|
|
|
tlsConfig := &tls.Config{} |
|
|
|
Transport: s.proto.Transport, |
|
|
|
|
|
|
|
TLSConfig: &tls.Config{ |
|
|
|
if s.fingerprint != "" { |
|
|
|
InsecureSkipVerify: true, |
|
|
|
tlsConfig.InsecureSkipVerify = true |
|
|
|
VerifyConnection: func(cs tls.ConnectionState) error { |
|
|
|
tlsConfig.VerifyConnection = func(cs tls.ConnectionState) error { |
|
|
|
h := sha256.New() |
|
|
|
h := sha256.New() |
|
|
|
h.Write(cs.PeerCertificates[0].Raw) |
|
|
|
h.Write(cs.PeerCertificates[0].Raw) |
|
|
|
hstr := hex.EncodeToString(h.Sum(nil)) |
|
|
|
hstr := hex.EncodeToString(h.Sum(nil)) |
|
|
|
@ -133,8 +133,12 @@ func (s *rtspSource) runInner() bool { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return nil |
|
|
|
return nil |
|
|
|
}, |
|
|
|
} |
|
|
|
}, |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
client := &gortsplib.Client{ |
|
|
|
|
|
|
|
Transport: s.proto.Transport, |
|
|
|
|
|
|
|
TLSConfig: tlsConfig, |
|
|
|
ReadTimeout: time.Duration(s.readTimeout), |
|
|
|
ReadTimeout: time.Duration(s.readTimeout), |
|
|
|
WriteTimeout: time.Duration(s.writeTimeout), |
|
|
|
WriteTimeout: time.Duration(s.writeTimeout), |
|
|
|
ReadBufferCount: s.readBufferCount, |
|
|
|
ReadBufferCount: s.readBufferCount, |
|
|
|
|