five-on-it / apps/server/src/rtc-settings
apps/server/src/rtc-settings
The WebRTC data channel's switches, as the process's environment sets them:
FOI_RTC:1offers the channel to the clients (off by default;npm run devturns it on).FOI_RTC_PORTS: the UDP ports its peer connections bind to,first-last(40000-40999by default). A peer takes one port per address it gathers on. Under a supervisor (FOI_PROCESSESover 1) each process gets its own slice (slicePorts).FOI_RTC_ADDRESSES: the local addresses to gather candidates on and bind to (at most one IPv4 and one IPv6, comma-separated); every one of the host's by default.FOI_RTC_PUBLIC_IP: the address announced in the candidates instead of the local one, for a host behind a NAT that forwards the same ports (Docker's published range).FOI_RTC_MAX_PEERS: the most channels the process holds (128, and no more than its ports).