screego / server

screen sharing for developers https://screego.net/
https://app.screego.net
GNU General Public License v3.0
7.62k stars 551 forks source link

Stream only loads under specific circumstances #175

Closed Tech-Non closed 9 months ago

Tech-Non commented 9 months ago

First of all, thanks for this amazing tool! It can come in really handy and using this self-hosted is a cherry on top!

However, currently there is some bug, making it troublesome to use. When I share my screen a user outside my network does not see the stream, but a blank screen. When I quit my sharing and they share their screen the same issue persists. HOWEVER, when I then take over screen sharing AGAIN, everything works flawlessly, so I wouldn't directly attribute it to a misconfiguration.

But I'll still provide my setup and configuration here:

docker-compose:

version: "3.7"
services:
  screego:
    image: ghcr.io/screego/server:1.10.2
    restart: unless-stopped
    network_mode: host
    environment:
      SCREEGO_EXTERNAL_IP: "dns:screenshare.mydomain.com"
      SCREEGO_SECRET: "myamazingsecret"
      SCREEGO_SERVER_TLS: false
      SCREEGO_SERVER_ADDRESS: "0.0.0.0:5050"
      SCREEGO_TURN_ADDRESS: "0.0.0.0:3478"
      SCREEGO_TRUST_PROXY_HEADERS: "true"
      SCREEGO_AUTH_MODE: "none" # "turn"
      SCREEGO_CORS_ALLOWED_ORIGINS: "https://screenshare.mydomain.com"
      SCREEGO_LOG_LEVEL: debug
    expose:
      - "5050"
      - "3478"

I'm using Traefik with it, which is configured like this:

http:
  routers:
    screego:
      rule: "Host(`screenshare.mydomain.com`) && PathPrefix(`/`)"
      service: screego
      entrypoints:
        - web
        - websecure
      tls:
        certResolver: production
    turn:
      rule: "Host(`screenshare.mydomain.com`) && PathPrefix(`/`)"
      service: turn
      entrypoints:
        - web
        - websecure
  services:
    screego:
      loadbalancer:
        servers:
          - url: http://10.4.20.69:5050/
    turn:
      loadbalancer:
        servers:
          - url: http://10.4.20.69:3478/

I have my ports 80 and 443 open on my router, over which Traefik sends its traffic. I have not manually declared any udp ports, but that should be handled automatically by my router for NATting.

Any help would be appreciated, thanks

Tech-Non commented 9 months ago

Okay, I missed one crucial step, I needed to port forward the TCP and UDP ports, with this setup. Which incidentally was the one thing I left out of my various testing. Other friends had problems, which pertained to ipv6, so Samuel, you might wanna check out, if you have a problem there. If the traffic arrives at your network via ipv6, Docker might not be able to receive it.