Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thomaseizinger/xtra-quinn-prototype
A PoC for using QUIC to establish direction connections between two actors.
https://github.com/thomaseizinger/xtra-quinn-prototype
Last synced: 20 days ago
JSON representation
A PoC for using QUIC to establish direction connections between two actors.
- Host: GitHub
- URL: https://github.com/thomaseizinger/xtra-quinn-prototype
- Owner: thomaseizinger
- Created: 2021-12-19T05:12:43.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-01-09T07:21:25.000Z (almost 3 years ago)
- Last Synced: 2024-12-16T20:06:03.966Z (23 days ago)
- Language: Rust
- Size: 63.5 KB
- Stars: 0
- Watchers: 3
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Prototype for combining `xtra` and `quinn`
The question we started out with was: How can we use QUIC's multiplexing to establishing a direct connection between two actors in a p2p application?
The answer is:
- Use a custom certificate verifier so we can use self-signed certificates.
We expect the certificate to be signed with a specific public key.
This has not been audited by a cryptographer so might be complete bogus.
- Use libp2p `multistream-select` to negotiate the purpose of a newly opened, bi-directional stream.
- Once established, spawn the actor appropriate for the given protocol and hand the reading and writing end to it.## Usage:
Check the output of `--help` for the two binaries provided.
```shell
cargo run --bin listener -- --help
cargo run --bin dialer -- --help
```The listener supports protocol `/ping/1.0.0`, so once the dialer asks for which protocol to use you can enter that to upgrade successfully and receive ping/pong message.