You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- RFC 5389: [Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5389)
11
+
- RFC 5766: [Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5766)
12
+
- RFC 6156: [Traversal Using Relays around NAT (TURN) Extension for IPv6](https://datatracker.ietf.org/doc/html/rfc6156#autoid-7)
12
13
13
14
This project is in early stage of development and some of the features described in the RFCs might be missing.
14
15
Expect breaking changes.
@@ -43,7 +44,7 @@ pc = new RTCPeerConnection({
43
44
});
44
45
```
45
46
46
-
## Installation
47
+
## Installation and running
47
48
48
49
1. From source
49
50
@@ -57,63 +58,15 @@ mix run --no-halt
57
58
2. In Docker
58
59
59
60
```console
60
-
docker run ghcr.io/webrtc-elixir/rel:latest
61
+
docker run --network=host ghcr.io/elixir-webrtc/rel:latest
61
62
```
62
63
63
64
## Features and configuration
64
65
65
-
Currently, Rel is configured via environment variables.
Rel by default listens on `0.0.0.0:3478/UDP` for TURN traffic. This can be configured via `LISTEN_IP` and `LISTEN_PORT`.
70
-
71
-
```console
72
-
LISTEN_IP=0.0.0.0
73
-
LISTEN_PORT=3478
74
-
```
75
-
76
-
`EXTERNAL_LISTEN_IP` is the IP address at which Rel is visible to clients. By default, Rel will try to guess the address
77
-
based on active network interfaces, but this must be set explicitly when e.g. using Docker without `--network host`.
78
-
79
-
```console
80
-
EXTERNAL_LISTEN_IP=167.235.241.140
81
-
```
82
-
83
-
By default, Rel will use the same addresses (`RELAY_IP == LISTEN_IP and EXTERNAL_RELAY_IP == EXTERNAL_LISTEN_IP`) to open allocations, but this
84
-
can be set to something else:
85
-
86
-
```console
87
-
RELAY_IP=0.0.0.0
88
-
EXTERNAL_RELAY_IP=167.235.241.140
89
-
```
90
-
91
-
Remember to use the `DOMAIN` variable specific to your deployment. It's used in e.g. `REALM` STUN attributes.
92
-
93
-
```console
94
-
DOMAIN=my-amazing-turn.com
95
-
```
96
-
97
-
### Auth
98
-
99
-
Auth Provider is an HTTP endpoint that provides credentials required by *A REST API For Access To TURN Services*.
100
-
By default it is available at `http://127.0.0.1:4000/`, but the address, encryption and CORS can be configured:
101
-
102
-
```console
103
-
AUTH_PROVIDER_IP=127.0.0.1
104
-
AUTH_PROVIDER_PORT=4000
105
-
AUTH_PROVIDER_USE_TLS=false
106
-
KEY_FILE_PAHT=./rel.key
107
-
CERT_FILE_PATH./rel.cert
108
-
AUTH_PROVIDER_ALLOW_CORS=false
109
-
```
110
-
111
-
### Metrics
112
-
113
-
By default, Rel provides Prometheus metrics at `http://127.0.0.1:9578/metrics`. The address can be configured:
114
-
115
-
```console
116
-
METRICS_IP=127.0.0.1
117
-
METRICS_PORT=9568
118
-
```
68
+
Rel supports authentication described in [A REST API For Access To TURN Services](https://datatracker.ietf.org/doc/html/draft-uberti-rtcweb-turn-rest-00#section-2.2).
69
+
By default available under `http://127.0.0.1:4000/`. Example request would be `POST http://127.0.0.1:40000/?service=turn&username=johnsmith`.
70
+
Key query parameter currently is not supported.
119
71
72
+
Rel is configured via environment variables. All of the possible options are described in [sample env file](./sample.env).
0 commit comments