Skip to content

jgcoded/Rooms

Repository files navigation

REST API For Access To TURN Services

A REST API For Access To TURN Services that can be used with Coturn.

This project assumes the API is hosted via an Ubuntu VM, nginx, and systemd: https://docs.microsoft.com/en-us/aspnet/core/host-and-deploy/linux-nginx?view=aspnetcore-6.0

Command line steps I used are found here.

Coturn must be installed on the same machine and use a sqlite database located at /var/db/turndb.

To protect from unauthorized access, OAuth 2.0 is used with OpenId. This project assumes Azure AD B2C is the identity management service. Replace the settings in appsettings.json with your B2C details.

The project is small and should be easy to enhance to allow the separation of the API and Coturn via a remote DB. I just did it this way so I could pack everything into a cheap VM on Azure.

Setup

Install VS 2019 with msbuild at least 16.11. Install the .NET 6 SDK. Install VS Code.

Use Visual Studio Code for development with the C# extension. The SQLite Explorer extension may also be helpful.

Build and Debug

Use Visual Studio code for local testing and debugging.

Use dotnet build to build.

Deployment

dotnet publish -r linux-x64 --self-contained false --configuration Release
scp bin\Release\net6.0\linux-x64\publish\* [email protected]:/var/www/rooms
ssh [email protected] sudo systemctl restart kestrel-rooms.service
ssh [email protected] sudo systemctl status kestrel-rooms.service

Releases

No releases published

Packages

No packages published

Languages