mini changes

This commit is contained in:
notch
2020-12-22 10:27:30 +08:00
parent 4c1542fa96
commit 05e2caaa0e
5 changed files with 7 additions and 13 deletions

View File

@@ -187,7 +187,6 @@ func (s *Service) onGetRuntime(w http.ResponseWriter, r *http.Request, pathParam
Proc stats.Proc `json:"proc"`
Streams sccc `json:"streams"`
Rtsp stats.ConnsSample `json:"rtsp"`
Rtmp stats.ConnsSample `json:"rtmp"`
Wsp stats.ConnsSample `json:"wsp"`
Flv stats.ConnsSample `json:"flv"`
Extra *stats.Runtime `json:"extra,omitempty"`

View File

@@ -18,7 +18,6 @@ import (
"github.com/cnotch/ipchub/config"
"github.com/cnotch/ipchub/media"
"github.com/cnotch/ipchub/network"
"github.com/cnotch/ipchub/network/socket/buffered"
"github.com/cnotch/ipchub/network/websocket"
"github.com/cnotch/ipchub/provider/auth"
@@ -26,7 +25,6 @@ import (
"github.com/cnotch/ipchub/stats"
"github.com/cnotch/ipchub/utils"
"github.com/cnotch/xlog"
"github.com/emitter-io/address"
"github.com/pixelbender/go-sdp/sdp"
)
@@ -112,11 +110,11 @@ func newSession(svr *Server, conn net.Conn) *Session {
session.user = auth.Get(wsc.Username())
}
ipaddr, _ := address.Parse(conn.RemoteAddr().String(), 80)
// 如果是本机IP不验证以便ffmpeg本机rtsp->rtmp
if network.IsLocalhostIP(ipaddr.IP) {
session.authMode = auth.NoneAuth
}
// ipaddr, _ := address.Parse(conn.RemoteAddr().String(), 80)
// // 如果是本机IP不验证以便ffmpeg本机rtsp->rtmp
// if network.IsLocalhostIP(ipaddr.IP) {
// session.authMode = auth.NoneAuth
// }
for i := rtpChannelMin; i < rtpChannelCount; i++ {
session.transport.Channels[i] = -1

View File

@@ -101,7 +101,7 @@ func (s *Service) Listen() (err error) {
defer s.Close()
s.hookSignals()
// http rtsp rtmp ws
// http rtsp ws
addr, err := address.Parse(config.Addr(), 554)
if err != nil {
s.logger.Panic(err.Error())