mirror of
https://github.com/cnotch/ipchub.git
synced 2025-09-26 19:41:18 +08:00
mini changes
This commit is contained in:
@@ -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"`
|
||||
|
@@ -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
|
||||
|
@@ -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())
|
||||
|
Reference in New Issue
Block a user