Bumps [env_logger](https://github.com/rust-cli/env_logger) from 0.10.1 to 0.10.2. <details> <summary>Changelog</summary> <p><em>Sourced from <a href="https://github.com/rust-cli/env_logger/blob/main/CHANGELOG.md">env_logger's changelog</a>.</em></p> <blockquote> <h2>[0.10.2] - 2024-01-18</h2> <h3>Performance</h3> <ul> <li>Avoid extra UTF-8 validation performed in some cases</li> </ul> <h3>Fixes</h3> <ul> <li>Ensure custom pipes/stdout get flushed</li> <li>Don't panic on broken pipes when <code>color</code> is disabled</li> </ul> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="7929b7fc3d"><code>7929b7f</code></a> chore: Release env_logger version 0.10.2</li> <li><a href="3df552c315"><code>3df552c</code></a> docs: Update changelog</li> <li><a href="6ec4104864"><code>6ec4104</code></a> Merge pull request <a href="https://redirect.github.com/rust-cli/env_logger/issues/296">#296</a> from epage/refactor</li> <li><a href="939687dd75"><code>939687d</code></a> style: Make clippy happy</li> <li><a href="c088820ae8"><code>c088820</code></a> fix(fmt): Ensure stream gets flushed</li> <li><a href="2b3f26fc29"><code>2b3f26f</code></a> perf(fmt): Avoid UTF-8 validation</li> <li><a href="7428386da3"><code>7428386</code></a> refactor(fmt): Pull out stream lookup from write</li> <li><a href="e8674a237b"><code>e8674a2</code></a> refactor(fmt): Consolidate target printing</li> <li><a href="f5f3392886"><code>f5f3392</code></a> refactor(fmt): Pull is_test into the target</li> <li><a href="87008fdf78"><code>87008fd</code></a> fix(fmt): Don't panic on broken pipes without termcolor</li> <li>Additional commits viewable in <a href="https://github.com/rust-cli/env_logger/compare/v0.10.1...v0.10.2">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 show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore <dependency name> major version` will close this group update PR and stop Dependabot creating any more for the specific dependency's major version (unless you unignore this specific dependency's major version or upgrade to it yourself) - `@dependabot ignore <dependency name> minor version` will close this group update PR and stop Dependabot creating any more for the specific dependency's minor version (unless you unignore this specific dependency's minor version or upgrade to it yourself) - `@dependabot ignore <dependency name>` will close this group update PR and stop Dependabot creating any more for the specific dependency (unless you unignore this specific dependency or upgrade to it yourself) - `@dependabot unignore <dependency name>` will remove all of the ignore conditions of the specified dependency - `@dependabot unignore <dependency name> <ignore condition>` will remove the ignore condition of the specified dependency and ignore conditions </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 relay using: cargo build --release --bin firezone-relay
You should then find a binary in target/release/firezone-relay.
Running
The Firezone Relay supports Linux only. To run the Relay binary on your Linux host:
- Generate a new Relay token from the "Relays" section of the admin portal and save it in your secrets manager.
- Ensure the
FIREZONE_TOKEN=<relay_token>environment variable is set securely in your Relay's shell environment. The Relay expects this variable at startup. - Now, you can start the Firezone Relay with:
firezone-relay
To view more advanced configuration options pass the --help flag:
firezone-relay --help
Ports
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 token, the relay will connect to the Firezone portal 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.