turn-server

Crates.ioturn-server
lib.rsturn-server
version1.2.0
sourcesrc
created_at2023-01-01 05:44:27.138604
updated_at2023-06-24 22:50:42.434958
descriptionA pure rust-implemented turn server.
homepagehttps://github.com/colourful-rtc/turn-rs
repositoryhttps://github.com/colourful-rtc/turn-rs
max_upload_size
id748736
size98,025
Lazy Panda (mycrl)

documentation

README

TURN-RS


TURN Server implemented by ❤️ Rust


A pure rust-implemented turn server, different from coturn, provides a more flexible external control API and provides the same performance and memory footprint, this project is most compatible with the scenario of using stun/turn server in webrtc.

Who uses it?

Table of contents

Features

  • udp and tcp transport.
  • webhooks api. (hooks-api)
  • external controller api. (controller-api)
  • static identity in configuration file.
  • only long-term authentication is supported.
  • virtual port support. (allocate request does not allocate real udp ports)

Crates

  • stun, fast and zero-cost stun message decoder and encoder. (crate).
  • turn, a library for handling turn sessions. (crate).
  • turn-server, implementation of turn server based on turn library.

Usage

cargo install turn-server

Start with configuration file:

turn-server --config=/etc/turn_server/config.toml

Please check the example configuration file for details: turn_server.toml

Docker

docker pull quasipaa/turn-server

The custom configuration file overrides the /etc/turn-server/config.toml path inside the image through -v.

Linux service

./install-service.sh

This will compile the project and install and start the service.

Building

Prerequisites

You need to install the Rust toolchain, if you have already installed it, you can skip it, Install Rust, then get the source code:

git clone https://github.com/mycrl/turn-rs

Build workspace

Compile the entire workspace in release mode:

cd turn-rs
cargo build --release

After the compilation is complete, you can find the binary file in the "target/release" directory.

License

MIT Copyright (c) 2022 Mr.Panda.

Commit count: 256

cargo fmt