📝 docs(README): update documentation for clarity and accuracy

This commit is contained in:
Sergey Krashevich
2026-01-26 00:35:06 +03:00
parent a41185c22a
commit 5970dd2fe4
11 changed files with 93 additions and 93 deletions
+24 -24
View File
@@ -1,15 +1,15 @@
What you should to know about WebRTC:
What you should know about WebRTC:
- It's almost always a **direct [peer-to-peer](https://en.wikipedia.org/wiki/Peer-to-peer) connection** from your browser to go2rtc app
- When you use Home Assistant, Frigate, Nginx, Nabu Casa, Cloudflare and other software - they are only **involved in establishing** the connection, but they are **not involved in transferring** media data
- It's almost always a **direct [peer-to-peer](https://en.wikipedia.org/wiki/Peer-to-peer) connection** from your browser to the go2rtc app
- When you use Home Assistant, Frigate, Nginx, Nabu Casa, Cloudflare, and other software, they are only **involved in establishing** the connection; they are **not involved in transferring** media data
- WebRTC media cannot be transferred inside an HTTP connection
- Usually, WebRTC uses random UDP ports on client and server side to establish a connection
- Usually, WebRTC uses public [STUN](https://en.wikipedia.org/wiki/STUN) servers to establish a connection outside LAN, such servers are only needed to establish a connection and are not involved in data transfer
- Usually, WebRTC will automatically discover all of your local addresses and all of your public addresses and try to establish a connection
- Usually, WebRTC uses random UDP ports on the client and server to establish a connection
- Usually, WebRTC uses public [STUN](https://en.wikipedia.org/wiki/STUN) servers to establish a connection outside the LAN; these servers are only needed to establish a connection and are not involved in data transfer
- Usually, WebRTC will automatically discover all of your local and public addresses and try to establish a connection
If an external connection via STUN is used:
- Uses [UDP hole punching](https://en.wikipedia.org/wiki/UDP_hole_punching) technology to bypass NAT even if you not open your server to the World
- Uses [UDP hole punching](https://en.wikipedia.org/wiki/UDP_hole_punching) technology to bypass NAT even if you haven't opened your server to the world
- For about 20% of users, the technology will not work because of the [Symmetric NAT](https://tomchen.github.io/symmetric-nat-test/)
- UDP is not suitable for transmitting 2K and 4K high bit rate video over open networks because of the high loss rate:
- https://habr.com/ru/companies/flashphoner/articles/480006/
@@ -26,7 +26,7 @@ webrtc:
## Config
**Important!** This example is not for copy pasting!
**Important!** This example is not for copy/pasting!
```yaml
webrtc:
@@ -41,34 +41,34 @@ webrtc:
- home.duckdns.org:8555 # if you have domain
# add custom STUN and TURN servers
# use `ice_servers: []` for remove defaults and leave empty
# use `ice_servers: []` to remove defaults and leave it empty
ice_servers:
- urls: [ stun:stun1.l.google.com:19302 ]
- urls: [ turn:123.123.123.123:3478 ]
username: your_user
credential: your_pass
# optional filter list for auto discovery logic
# optional filter list for auto-discovery logic
# some settings only make sense if you don't specify a fixed UDP port
filters:
# list of host candidates from auto discovery to be sent
# including candidates from the `listen` option
# use `candidates: []` to remove all auto discovery candidates
# list of host candidates from auto-discovery to be sent
# includes candidates from the `listen` option
# use `candidates: []` to remove all auto-discovery candidates
candidates: [ 192.168.1.123 ]
# enable localhost candidates
loopback: true
# list of network types to be used for connection
# including candidates from the `listen` option
# list of network types to be used for the connection
# includes candidates from the `listen` option
networks: [ udp4, udp6, tcp4, tcp6 ]
# list of interfaces to be used for connection
# including interfaces from unspecified `listen` option (empty host)
# list of interfaces to be used for the connection
# includes interfaces from unspecified `listen` option (empty host)
interfaces: [ eno1 ]
# list of host IP-addresses to be used for connection
# including IPs from unspecified `listen` option (empty host)
# list of host IP addresses to be used for the connection
# includes IPs from unspecified `listen` option (empty host)
ips: [ 192.168.1.123 ]
# range for random UDP ports [min, max] to be used for connection
@@ -76,15 +76,15 @@ webrtc:
udp_ports: [ 50000, 50100 ]
```
By default go2rtc uses **fixed TCP** port and **fixed UDP** ports for each **direct** WebRTC connection - `listen: ":8555"`.
By default, go2rtc uses a **fixed TCP** port and **fixed UDP** ports for each **direct** WebRTC connection: `listen: ":8555"`.
You can set **fixed TCP** and **random UDP** port for all connections - `listen: ":8555/tcp"`.
You can set a **fixed TCP** port and a **random UDP** port for all connections: `listen: ":8555/tcp"`.
Don't know why, but you can disable TCP port and leave only random UDP ports - `listen: ""`.
You can also disable the TCP port and leave only random UDP ports: `listen: ""`.
## Config filters
**Important!** By default go2rtc exclude all Docker-like candidates (`172.16.0.0/12`). This can not be disabled.
**Important!** By default, go2rtc excludes all Docker-like candidates (`172.16.0.0/12`). This cannot be disabled.
Filters allow you to exclude unnecessary candidates. Extra candidates don't make your connection worse or better. But the wrong filter settings can break everything. Skip this setting if you don't understand it.
@@ -98,7 +98,7 @@ webrtc:
networks: [ udp4, tcp4 ] # skip IPv6, if it's not supported for you
```
For example, go2rtc inside closed docker container (ex. [Frigate](https://frigate.video/)). You shouldn't filter docker interfaces, otherwise go2rtc will not be able to connect anywhere. But you can filter the docker candidates because no one can connect to them.
For example, go2rtc is inside a closed Docker container (e.g. [Frigate](https://frigate.video/)). You shouldn't filter Docker interfaces; otherwise, go2rtc won't be able to connect anywhere. But you can filter the Docker candidates because no one can connect to them.
```yaml
webrtc: