Bumps [test-strategy](https://github.com/frozenlib/test-strategy) from 0.3.0 to 0.3.1. <details> <summary>Commits</summary> <ul> <li><a href="19797fdf2b"><code>19797fd</code></a> Version 0.3.1.</li> <li><a href="7a2705c71d"><code>7a2705c</code></a> Made it possible to use <code>#[proptest(dump)]</code> instead of <code>#[proptest_dump]</code>.</li> <li><a href="c492d62a51"><code>c492d62</code></a> Add docuemnt for <code>#[proptest(async = ...)]</code>.</li> <li><a href="839fe30cc6"><code>839fe30</code></a> Use <code>#[cfg(test)]</code>.</li> <li><a href="2b57ca7262"><code>2b57ca7</code></a> Merge pull request <a href="https://redirect.github.com/frozenlib/test-strategy/issues/10">#10</a> from niklaslong/clippy</li> <li><a href="5208cb2bfa"><code>5208cb2</code></a> Add test for using <code>#[proptest]</code> in areas not enclosed by <code>#[cfg(test)]</code>.</li> <li><a href="e258b67f9f"><code>e258b67</code></a> Fix clippy unused field warning in proptest <code>Args</code> structs.</li> <li><a href="885013160c"><code>8850131</code></a> Update expected compile error message.</li> <li><a href="5198884aa1"><code>5198884</code></a> Clippy.</li> <li><a href="fd49486cb2"><code>fd49486</code></a> Support async fn test.</li> <li>Additional commits viewable in <a href="https://github.com/frozenlib/test-strategy/compare/v0.3.0...v0.3.1">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
relay
This crate houses a minimalistic STUN & TURN server.
Features
We aim to support the following feature set:
- STUN binding requests
- TURN allocate requests
- TURN refresh requests
- TURN channel bind requests
- TURN channel data requests
Relaying of data through other means such as DATA frames is not supported.
Building
You can build the server using: cargo build --release --bin relay
Running
For an up-to-date documentation on the available configurations options and a detailed help text, run cargo run --bin relay -- --help.
All command-line options can be overridden using environment variables.
Those variables are listed in the --help output at the bottom of each command.
The relay listens on port 3478.
This is the standard port for STUN/TURN and not configurable.
Additionally, the relay needs to have access to the port range 49152 - 65535 for the allocations.
Portal connection
When given a portal endpoint, the relay will connect to it and wait for an init message before commencing relay operations.
Design
The relay is designed in a sans-IO fashion, meaning the core components do not cause side effects but operate as pure, synchronous state machines. They take in data and emit commands: wake me at this point in time, send these bytes to this peer, etc.
This allows us to very easily unit-test all kinds of scenarios because all inputs are simple values.
The main server runs in a single task and spawns one additional task for each allocation. Incoming data that needs to be relayed is forwarded to the main task where it gets authenticated and relayed on success.