Add support X-Forwarded-For

This commit is contained in:
Alexey Khit
2023-03-25 11:59:55 +03:00
parent a42c3e21c9
commit 8bf5c85b79
5 changed files with 24 additions and 8 deletions
+3 -2
View File
@@ -6,6 +6,7 @@ import (
"github.com/AlexxIT/go2rtc/cmd/streams"
"github.com/AlexxIT/go2rtc/pkg/core"
"github.com/AlexxIT/go2rtc/pkg/mp4"
"github.com/AlexxIT/go2rtc/pkg/tcp"
"strings"
)
@@ -17,7 +18,7 @@ func handlerWSMSE(tr *api.Transport, msg *api.Message) error {
}
cons := &mp4.Consumer{
RemoteAddr: tr.Request.RemoteAddr,
RemoteAddr: tcp.RemoteAddr(tr.Request),
UserAgent: tr.Request.UserAgent(),
}
@@ -64,7 +65,7 @@ func handlerWSMP4(tr *api.Transport, msg *api.Message) error {
}
cons := &mp4.Segment{
RemoteAddr: tr.Request.RemoteAddr,
RemoteAddr: tcp.RemoteAddr(tr.Request),
UserAgent: tr.Request.UserAgent(),
OnlyKeyframe: true,
}