paullouisageneau / violet

Lightweight STUN/TURN server
GNU General Public License v2.0
225 stars 23 forks source link
c coturn ice rfc-5389 rfc-5766 rfc-8489 rfc-8656 stun stun-server turn turn-server webrtc

Violet - Lightweight STUN/TURN server

License: GPL v2 or later Build Docker Gitter Discord

Violet is a lightweight STUN/TURN server (RFC8489 and RFC8656) written in C without dependencies, based on libjuice.

Violet is licensed under GPLv2 or later, see LICENSE.

Oompa-Loompas rolling Violet, from Charlie and the Chocolate Factory

"Mercy! Save us!" yelled Mrs Beauregarde. "[...] Violet, you’re turning violet, Violet!" [...]

"Squeeze her," said Mr Wonka. "We've got to squeeze the juice out of her immediately."

-- Charlie and the Chocolate Factory, Roald Dahl

Dependencies

No external dependencies!

Running with Docker

An image is available on Docker Hub, running the TURN server with default options is as simple as:

docker run --network=host paullouisageneau/violet --credentials=USER:PASSWORD

Available options can be listed with the --help flag:

docker run paullouisageneau/violet --help

Installing on Arch Linux

Violet is available as a package on AUR:

paru -S violet
sudo systemctl enable --now violet

The configuration file is /etc/violet/violet.conf

Building

Clone repository and submodules

git clone https://github.com/paullouisageneau/violet.git
cd violet
git submodule update --init --recursive

Build with CMake

cmake -B build -DCMAKE_BUILD_TYPE=Release
cd build
make -j2
./violet --credentials=USER:PASSWORD

You can list available options with the --help (or -h) flag. You can also load a configuration file:

./violet -f ../example.conf

Build with Docker

docker build -t violet .
docker run --network=host violet --credentials=USER:PASSWORD

You can list available options with the --help flag. You can also load a configuration file:

docker run \
    --network=host \
    --mount type=bind,source=$(pwd)/example.conf,target=/etc/violet.conf,readonly \
    paullouisageneau/violet --file=/etc/violet.conf