{"id":19208301,"url":"https://github.com/elixir-webrtc/rel","last_synced_at":"2025-05-12T18:54:03.187Z","repository":{"id":64609840,"uuid":"543988209","full_name":"elixir-webrtc/rel","owner":"elixir-webrtc","description":"Standalone TURN/STUN server in Elixir","archived":false,"fork":false,"pushed_at":"2024-04-26T13:54:33.000Z","size":103,"stargazers_count":62,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-20T15:44:30.827Z","etag":null,"topics":["elixir","networking","relay","server","stun","turn"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elixir-webrtc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-01T10:40:49.000Z","updated_at":"2025-02-03T13:38:30.000Z","dependencies_parsed_at":"2024-04-26T15:04:56.910Z","dependency_job_id":null,"html_url":"https://github.com/elixir-webrtc/rel","commit_stats":null,"previous_names":["elixir-webrtc/rel"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-webrtc%2Frel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-webrtc%2Frel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-webrtc%2Frel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elixir-webrtc%2Frel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elixir-webrtc","download_url":"https://codeload.github.com/elixir-webrtc/rel/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253804282,"owners_count":21967046,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elixir","networking","relay","server","stun","turn"],"created_at":"2024-11-09T13:25:41.778Z","updated_at":"2025-05-12T18:54:03.156Z","avatar_url":"https://github.com/elixir-webrtc.png","language":"Elixir","readme":"# Rel\n\n[![CI](https://img.shields.io/github/actions/workflow/status/elixir-webrtc/rel/ci.yml?logo=github\u0026label=CI)](https://github.com/elixir-webrtc/rel/actions/workflows/ci.yml)\n[![Deployment](https://img.shields.io/github/actions/workflow/status/elixir-webrtc/rel/build_deploy.yml?logo=github\u0026label=Deployment)](https://github.com/elixir-webrtc/rel/actions/workflows/build_deploy.yml)\n[![Package](https://ghcr-badge.egpl.dev/elixir-webrtc/rel/latest_tag?trim=major\u0026label=latest)](https://github.com/elixir-webrtc/rel/pkgs/container/rel)\n\nTURN server in pure Elixir.\n\nAims to implement:\n\n- RFC 5389: [Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5389)\n- RFC 5766: [Traversal Using Relays around NAT (TURN): Relay Extensions to Session Traversal Utilities for NAT (STUN)](https://datatracker.ietf.org/doc/html/rfc5766)\n- RFC 6156: [Traversal Using Relays around NAT (TURN) Extension for IPv6](https://datatracker.ietf.org/doc/html/rfc6156#autoid-7)\n\nThis project is in early stage of development and some of the features described in the RFCs might be missing.\nExpect breaking changes.\n\nSupports 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).\n\n## Public deployment\n\nIf you're in need of TURN server for testing purposes, feel free to use this Rel public deployment at `turn.elixir-webrtc.org`.\n\nIn case of any irregularities or bugs, please open an issue with description of the problem.\nDO NOT use this deployment in production, as it's intended to be an aid in developement only.\n\nTo obtain a set of credentials, use the built-in credentials mechanism. It does not require any authentication, but the credentials must be refreshed after 3 hours if not used.\n\n```console\n$ curl -X POST \"https://turn.elixir-webrtc.org/?service=turn\u0026username=johnsmith\"\n{\"password\":\"l6hs9SzUgudFeb5XjrfCfOWKeOQ=\",\"ttl\":1728,\"uris\":[\"turn:167.235.241.140:3478?transport=udp\"],\"username\":\"1691574817:johnsmith\"}⏎\n```\n\nUse the obtained credentials in e.g. WebRTC's `RTCPeerConnection`:\n\n```js\npc = new RTCPeerConnection({\n  iceServers: [\n    {\n      credential: \"l6hs9SzUgudFeb5XjrfCfOWKeOQ=\",\n      urls: \"turn:167.235.241.140:3478?transport=udp\", \n      username: \"1691574817:johnsmith\" \n    }\n  ]\n});\n```\n\n## Installation and running\n\n1. From source\n\n```console\ngit clone https://github.com/elixir-webrtc/rel.git\ncd rel\nmix deps.get\nmix run --no-halt\n```\n\n2. In Docker\n\n```console\ndocker run --network=host ghcr.io/elixir-webrtc/rel:latest\n```\n\n## Features and configuration\n\nRel exposes Prometheus metrics endpoint (by default `http://127.0.0.1:9568/metrics`).\n\nRel 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).\nBy default available under `http://127.0.0.1:4000/`. Example request would be `POST http://127.0.0.1:40000/?service=turn\u0026username=johnsmith`.\nKey query parameter currently is not supported.\n\nRel is configured via environment variables. All of the possible options are described in [sample env file](./sample.env).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-webrtc%2Frel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felixir-webrtc%2Frel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felixir-webrtc%2Frel/lists"}