datarhei / restreamer

The Restreamer is a complete streaming server solution for self-hosting. It has a visually appealing user interface and no ongoing license costs. Upload your live stream to YouTube, Twitch, Facebook, Vimeo, or other streaming solutions like Wowza. Receive video data from OBS and publish it with the RTMP and SRT server.
https://docs.datarhei.com/restreamer/
Apache License 2.0
3.85k stars 441 forks source link

Restreamer 2.0 UI Web tunneling with CloudFlare Tunnel #331

Closed owenilc closed 2 years ago

owenilc commented 2 years ago

Hi~

With Restreamer 2.0 , I can not expose UI website using cloudflare tunnel.

It was worked ideally with Restreamer v0.6.8

Now, the root of website is being occupied by the Playersite, but all I want is a password protected UI website.

The cloudflare tunnel ingress rules don't support proxying to a different path on the origin service. The path will be the same as the eyeball request's path.

Is there a work around to solve it?

jstabenow commented 2 years ago

Hey @owenilc Oh ok, Cloudflare Tunnel... I know that but have never used it.

You can set up a redirect from / to /ui. That's not a problem:

docker run -d --restart=always --name restreamer \
   -e CORE_ROUTER_ROUTES="/:/ui" \
   -v /opt/restreamer/config:/core/config -v /opt/restreamer/data:/core/data \
   -p 8080:8080 -p 8181:8181 -p 1935:1935 datarhei/restreamer:latest

The paths /ui/* and /api/* must remain accessible.

Alternatively, you can host the Restreamer UI separately: https://github.com/datarhei/restreamer-ui

But the path /api/* must also be accessible for this:

owenilc commented 2 years ago

Hi~ jstabenow,

Thank you! this solved my problem.

With your docker run command instructions, now I can expose Restreamer 2.0 UI website using CloudFlare tunnel perfectly.

best regards,

Owen

goblinmaks commented 1 year ago

@owenilc could you please share guide how to configure CloudFlare and Restreamer work correctly ? Thanks,

owenilc commented 1 year ago

@goblinmaks Hi, I am using CloudFlare tunnel to expose my Restreamer UI web.

I have my DNS record hosted by CloudFlare, using Cloudflare ZeroTrust Web to create tunnels.

After tunnel being created, just add a public hostname. give the hostname and Restreamer's private IP address. And it is going public now.

you may found this useful link to help setup CloudFlare Tunnels: https://noted.lol/say-goodbye-to-reverse-proxy-and-hello-to-cloudflare-tunnels/

FilipStadler commented 1 year ago

Is it possible to tunnel SRT UDP traffic also and rtmp also?