GithubHelp home page GithubHelp logo

tempbottle / saltyrtc-client-rs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from saltyrtc/saltyrtc-client-rs

0.0 1.0 0.0 724 KB

SaltyRTC Rust implementation. Currently in beta.

License: Apache License 2.0

Rust 99.15% Meson 0.11% C 0.74%

saltyrtc-client-rs's Introduction

saltyrtc-client-rs

CircleCI Rust Join our chat on Gitter

Asynchronous SaltyRTC client implementation for Rust 1.26+.

SaltyRTC is an end-to-end encrypted signalling protocol. It offers to freely choose from a range of signalling tasks, such as setting up a WebRTC or ORTC peer-to-peer connection, or using the WebSocket based signaling server as a relay. SaltyRTC is completely open to new and custom signalling tasks for everything feasible.

Docs

Testing

Note: The tests currently expect a SaltyRTC Server instance to run on localhost:6699.

Unit Tests

To run the testsuite:

cargo test

Fuzz Testing

To run fuzz tests, first install cargo-fuzz:

cargo install cargo-fuzz

Then run the fuzzer against a target:

cargo +nightly fuzz run <target>

You can list all targets with cargo fuzz list.

Linting

To run clippy lints, compile the library with --features clippy on a nightly compiler:

$ cargo +nightly build --features clippy

Example Client

There is an example chat client at examples/chat/main.rs. You can invoke it both as initiator or responder.

If you start the chat as initiator, the signaling path and auth token will be randomly generated and printed:

$ cargo run --example chat -- initiator
INFO:saltyrtc_client::crypto: Generating new key pair
INFO:saltyrtc_client::crypto: Generating new auth token

******************************
Connecting as Initiator

Signaling path: f637d7fff53defe8db111b17b2c445f7888a83c13dc40d7ff8449f700910f01f
Auth token: 0e94b54a49e4ec7f4398ec9bec5d4359cca810f7eca31704e6c0afadd54a7818

To connect with a peer:
cargo run --example chat -- responder \
    --path f637d7fff53defe8db111b17b2c445f7888a83c13dc40d7ff8449f700910f01f \
    --auth-token 0e94b54a49e4ec7f4398ec9bec5d4359cca810f7eca31704e6c0afadd54a7818
******************************

INFO:saltyrtc_client: Connected to server as Initiator
...

Simply copy that command in the second half of the output to another terminal to connect to the initiator with a responder.

To see all options, use cargo run --example chat -- initiator --help and cargo run --example chat -- responder --help.

The chat example will log to a file called chat.<role>.log.

Note: The tests currently expect a SaltyRTC Server instance to run on localhost:6699.

Msgpack Debugging

If you enable the msgpack-debugging compile flag, you'll get direct msgpack analysis URLs for all decoded messages in your TRACE level logs.

cargo build --features 'msgpack-debugging'

You can customize that URL prefix at compile time using the MSGPACK_DEBUG_URL env var. This is the default URL:

MSGPACK_DEBUG_URL='https://msgpack.dbrgn.ch/#base64='

Release Signatures

Release commits and tags are signed with the Threema signing key (E7ADD9914E260E8B35DFB50665FDE935573ACDA6).

FFI

You can find C FFI bindings in the ffi subdirectory of this source repository.

Note: The FFI bindings are currently incomplete and blocked by rust-lang/rust#36342.

License

Licensed under either of

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

saltyrtc-client-rs's People

Contributors

dbrgn avatar threema-danilo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.