m1k1o / neko

A self hosted virtual browser that runs in docker and uses WebRTC.
https://neko.m1k1o.net/
Apache License 2.0
5.95k stars 449 forks source link

Changing UDP port. #322

Closed Juliasmatius closed 9 months ago

Juliasmatius commented 11 months ago

I am using cloudflared (cloudflare zero trust tunnel) to reverse proxy my server to a web ip. Cloudflared has a list of ports that you can use list on developers.cloudflare.com. It has to be one of those ports. How do i change my port in the config?

Current config


services:
      neko:
            image: "m1k1o/neko:firefox
            restart: "unless-stopped"
            shm_size: "2gb"
            ports:
                -   "8080:8080"
                -    "52000-52100:520000-52100/udp"
             enviroment:
                NEKO_SCREEN: 1280x720@30
                NEKO_PASSWORD: not telling you
                NEKO_PASSWORD_ADMIN: also not telling
                NEKO_ERP: 52000-52100
                NEKO_ICELITE: 1
                NEKO_NAT1TO1: myserverip```
KriyenKP commented 11 months ago

This is all mentioned in the documentation.

Getting Started

Why so many ports? WebRTC needs UDP ports in order to transfer Audio/Video towards user and Mouse/Keyboard events to the server in real time. If you don't set NEKO_ICELITE=true, every user will need 2 UDP ports. If you set NEKO_ICELITE=true, every user will need only 1 UDP port. It is recommended to use ice-lite. Do not forget, they are UDP ports, that configuration must be correct in your firewall/router/docker. You can freely limit number of UDP ports. But you can't map them to different ports. This WON'T work: 32000-32100:52000-52100/udp You can change API port (8080). This WILL work: 3000:8080

WebRTC NEKO_EPR: For WebRTC needed range of UDP ports. e.g. 52000-52099 NEKO_UDPMUX: Alternative to epr with only one UDP port. e.g. 52100 NEKO_TCPMUX: Use TCP connection, meant as fallback for UDP. e.g. 52100

Juliasmatius commented 11 months ago

Thanks. I didn't see that. And cloudflared doesnt support udp so yay.