From c67a4adf8396c1eff5421b4c4851e76c8ad9c7a3 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 29 Sep 2020 14:23:20 +0200 Subject: [PATCH] 6 UDP ports are enough (but does not work) --- Dockerfile | 2 +- stream/stream.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 70888de..f256082 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,5 +16,5 @@ RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/testing libs COPY --from=build_base /code/out/ghostream /app/ghostream WORKDIR /app # 8080 for Web and Websocket, 2112 for prometheus monitoring and 9710 for SRT -EXPOSE 8080 2112 9710 +EXPOSE 8080 2112 9710 10000-10005/udp CMD ["/app/ghostream"] diff --git a/stream/stream.go b/stream/stream.go index 6a4c204..ff0f1cc 100644 --- a/stream/stream.go +++ b/stream/stream.go @@ -46,7 +46,7 @@ func newPeerHandler(remoteSdp webrtc.SessionDescription) webrtc.SessionDescripti // Create a new PeerConnection settingsEngine := webrtc.SettingEngine{} - if err := settingsEngine.SetEphemeralUDPPortRange(10000, 11000); err != nil { + if err := settingsEngine.SetEphemeralUDPPortRange(10000, 10005); err != nil { log.Println("Failed to set min/max UDP ports", err) return webrtc.SessionDescription{} }