Skip to content

usagi-coffee/unison

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unison

Proof of Concept - expect bugs and breaking changes.

Flexible UDP transport layer designed for bi-directional multi-path delivery.

Features

  • Packet duplication across multiple interfaces for redundancy
  • Packet deduplication, with out-of-order handling
  • Packet fragmentation across multiple interfaces for parallel transmission and reassembly
  • Seamless bidirectional handling of UDP traffic
  • Source IP masquerading and restoration for single-source IP–dependent protocols like SRT

Planned Features

  • Configurable heuristics for adaptive multi-path delivery
  • Packet retransmissions for lost packets/fragments

Installation

cargo install --git https://github.com/usagi-coffee/unison --locked

Client

This configirations duplicates the UDP traffic that targets port 8888 through eth0 and eth1.

unison --ports 8888 --interfaces eth0 eth1

Server

Usually server needs only one interface, in this case we just useeth0 for receiving and sending the packets back if needed, the duplicated traffic comes over port 8888.

unison --server --ports 8888 --interfaces eth0

Consistent Source IP/Port

Some protocols like SRT, RTP, or other connection-oriented UDP protocols require all packets to originate from a single consistent source IP and port by reading the ip and udp header. When using multi-path transport, this consistency can be lost and can lead to session instability or rejections.

Unison supports "snat-like" source address and port rewriting to preserve consistency. This is done at the ip/udp header level and ensures that the target socket sees all packets as coming from the same source.

# Packets will appear as to come from 10.64.0.1:1337 to sockets on the server
unison --server --snat 10.64.0.1:1337 --ports 8888 --interfaces eth0

About

Flexible UDP transport layer designed for bi-directional multi-path delivery

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages