Files
Miroslav Šedivý e8b875229b Add mux support. (#58)
* add mux support.

* usemux to mux.

* lint fix.

* dev script mux.

* add mux to readme.
2022-07-31 13:52:41 +02:00

32 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Docs
Case study: having 2 rooms, every with max 5 users, they only need 10 ports to be forwarded so the range can be `59000-59009`.
![architecture](./architecture.svg)
All clients visit `https://neko-rooms/room-name/`. Once they logged in, they get one of the ports allocated where the RTC data flows. It happens inside SDP negotiation and is completly transparent to the clients. Therefore those ports needs to remain open, but they will never be actually visited directly in the browser.
`NEKO_ROOMS_NAT1TO1` must be the IP where the mentioned UDP ports are forwarded. If this setting is not present, it will get automatically servers public IP at start of every room that will be sent to clients.
## Connection timeout
Neko room loads but you don't see the screen and it gives you `connection timeout` or `disconnected error`? [Validate](https://neko.m1k1o.net/#/getting-started/troubleshooting?id=validate-udp-ports-reachability) that your UDP ports are reachable.
## path prefix
Room names are by default put to root directory. If you want to have custom path prefix, you can specify it using env variable:
```
NEKO_ROOMS_PATH_PREFIX=/test/
```
Now room will be available at `example.org/test/<room-name>` instead of `example.org/<room-name>`.
## using mux
When using mux, there will be allocated two ports per room: TCP and UDP port with the same number.
```
NEKO_ROOMS_MUX=true
```