A library for easily creating WebRTC data channel connections in Rust

Overview

Cyberdeck

A library for easily creating WebRTC data channel connections in Rust.

let mut cd = Cyberdeck::new(|c, msg| {
    if let Some(m) = msg {
        println!("Recieved a message from channel {}!", c.name());
        let msg_str = String::from_utf8(m.data.to_vec()).unwrap();
        println!("Message from DataChannel '{}': {}", c.name(), msg_str);
    } else if c.state() == RTCDataChannelState::Open {
        println!("DataChannel '{}' opened", c.name());
        c.send_text("Connected to client!").unwrap();
    } else if c.state() == RTCDataChannelState::Closed {
        println!("DataChannel '{}' closed", c.name());
    }
})
.await?;
let answer = cd.set_offer(offer).await?;

You can try out this code by going to https://jsfiddle.net/ndgvLuyc/

  1. Copy the code from "Browser base64 Session Description"
  2. Open up a terminal and type in echo | cargo run --example simple
  3. Copy the response code in the terminal, and past it into "Rust base64 Session Description"
  4. Hit connect and send messages
You might also like...
Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers.

MQRT Small MQTT router. Allows creating multiple inputs/outputs and run action when input triggers. Features multi-(input/output) multiple actions tie

Bot creating DNS-01 challenged certificates. This is useful for automating wildcard certificates.

ACME Client Automating DNS-01 Challenge for Alfahosting Domains This is an ACME (letsencrypt by default) client that performs DNS-01 proofs agains an

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

Autometrics 📈 ✨ Autometrics is a macro that makes it trivial to add useful metrics to any function in your codebase. Easily understand and debug your

Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries
Easily add metrics to your system -- and actually understand them using automatically customized Prometheus queries

A Rust macro that makes it easy to understand the error rate, response time, and production usage of any function in your code. Jump from your IDE to

📊 Collect cloud usage data, so that it can be combined with impact data of Boavizta API.
📊 Collect cloud usage data, so that it can be combined with impact data of Boavizta API.

cloud-scanner Collect aws cloud usage data, so that it can be combined with impact data of Boavizta API. ⚠ Very early Work in progress ! At the moment

Streaming data over unix sockets, in Rust

Unix-socket based client/server In order to dig into Sōzu channels, I had to dig into the workings of unix sockets. What this repo contains a small so

RDE1 (Rusty Data Exfiltrator) is client and server tool allowing auditor to extract files from DNS and HTTPS protocols written in Rust. 🦀
RDE1 (Rusty Data Exfiltrator) is client and server tool allowing auditor to extract files from DNS and HTTPS protocols written in Rust. 🦀

Information: RDE1 is an old personal project (end 2022) that I didn't continue development on. It's part of a list of projects that helped me to learn

Shotover: L7 data-layer proxy
Shotover: L7 data-layer proxy

Shotover: L7 data-layer proxy

A tcp proxy server/client which exchange the data in temp files

ftcp A tcp proxy server/client which exchange the data in temp files 通过在临时文件中交换数据来进行TCP代理的一个服务端/客户端 学校内网中有针对教学楼的防火墙导致教室电脑难以上网( 但学校内建有公共ftp服务器,因此就有了这个借

Owner
RICHΛRD ΛNΛYΛ
Data Engineer, Code Philosopher, & Robot Psychologist.
RICHΛRD ΛNΛYΛ
A pure Rust implementation of WebRTC API

A pure Rust implementation of WebRTC API

WebRTC.rs 2.7k Jan 7, 2023
Painless peer-to-peer WebRTC networking for rust wasm

Matchbox Painless peer-to-peer WebRTC networking for rust wasm applications. The goal of the Matchbox project is to enable udp-like, unordered, unreli

Johan Klokkhammer Helsing 363 Jan 5, 2023
A multiplayer web based roguelike built on Rust and WebRTC

Gorgon A multiplayer web-based roguelike build on Rust and WebRTC. License This project is licensed under either of Apache License, Version 2.0, (LICE

RICHΛRD ΛNΛYΛ 2 Sep 19, 2022
All-batteries included GStreamer WebRTC producer

webrtcsink All-batteries included GStreamer WebRTC producer, that tries its best to do The Right Thing™. Use case The webrtcbin element in GStreamer i

Centricular 75 Dec 14, 2022
Reliable p2p network connections in Rust with NAT traversal

Reliable p2p network connections in Rust with NAT traversal. One of the most needed libraries for any server-less / decentralised projects

MaidSafe-Archive 948 Dec 20, 2022
Reliable p2p network connections in Rust with NAT traversal

Reliable p2p network connections in Rust with NAT traversal. One of the most needed libraries for any server-less, decentralised project.

MaidSafe-Archive 948 Dec 20, 2022
Drop-in proxy for Discord gateway connections and sessions allowing for zero downtime deploys

gateway-proxy This is a very hacky project, so it might stop working if Discord changes their API core. This is unlikely, but keep that in mind while

Jens Reidel 39 Nov 26, 2022
A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

A fast, stable, efficient, and lightweight intranet penetration, port forwarding tool supports multiple connections, cascading proxy, and transmission encryption

editso 1.3k Dec 30, 2022
Easily share data between terminal windows!

abra A tool that makes data sharing between terminal windows easy. abra can be used for displaying info about the current working directory, for split

Denis Isidoro 23 Oct 2, 2022
Safe Rust crate for creating socket servers and clients with ease.

bitsock Safe Rust crate for creating socket servers and clients with ease. Description This crate can be used for Client <--> Server applications of e

Lorenzo Torres 3 Nov 25, 2021