turntie

Crates.ioturntie
lib.rsturntie
version0.1.0
sourcesrc
created_at2023-03-28 01:03:58.907152
updated_at2023-03-28 01:03:58.907152
descriptionLibrary for creating simple communication channels using Mobility-enabled TURN servers. Like unreliable socketpair(2) for UDP.
homepage
repositoryhttps://github.com/vi/turntie
max_upload_size
id822628
size12,812
Vitaly Shukela (vi)

documentation

README

turntie

This library allows tying two TURN allocations with Mobility extension enabled together, for endpoints to be moved elsewhere and used for communicatinon.

Features

  • Creating a pair of allocations on a TURN server specified by IP, port, username and password and adding relayed addresses as permissions to each other.
  • Serializing TURN client state (including credentials) as not too long base64 lines.
  • Restoring TURN client from those lines and sending stdin lines to the other counterpart as UDP packets to TURN server.
  • Serialized TURN client state (specifier) can be moved to another host / network.

Limitations

  • Security is iffy: specified line contains TURN credentials in plaintext, communication channel is unreliable and insecure (basically raw UDP packets)
  • TURN client implementation is simplified - does not check authentity of TURN server and may be no production-ready. I haven't read the RFC in full while implementing it.
  • Unconnected channels expire relatively quickly
  • After connecting, an endpoint cannot be moved to next host anymore (in this implementation)
Commit count: 3

cargo fmt