Files
firezone/rust
dependabot[bot] 6f566450da build(deps): bump reqwest from 0.12.15 to 0.12.18 in /rust (#9360)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.12.15 to
0.12.18.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/seanmonstar/reqwest/releases">reqwest's
releases</a>.</em></p>
<blockquote>
<h2>v0.12.18</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix compilation when <code>socks</code> enabled without TLS.</li>
</ul>
<h2>v0.12.17</h2>
<h2>What's Changed</h2>
<ul>
<li>build: Fix compilation issues on macOS by <a
href="https://github.com/0x676e67"><code>@​0x676e67</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2696">seanmonstar/reqwest#2696</a></li>
</ul>
<h2>v0.12.16</h2>
<h2>Highlights</h2>
<ul>
<li>Add <code>ClientBuilder::http3_congestion_bbr()</code> to enable BBR
congestion control.</li>
<li>Add <code>ClientBuilder::http3_send_grease()</code> to configure
whether to send use QUIC grease.</li>
<li>Add <code>ClientBuilder::http3_max_field_section_size()</code> to
configure the maximum response headers.</li>
<li>Add <code>ClientBuilder::tcp_keepalive_interval()</code> to
configure TCP probe interval.</li>
<li>Add <code>ClientBuilder::tcp_keepalive_retries()</code> to configure
TCP probe count.</li>
<li>Add <code>Proxy::headers()</code> to add extra headers that should
be sent to a proxy.</li>
<li>Fix <code>redirect::Policy::limit()</code> which had an off-by-1
error, allowing 1 more redirect than specified.</li>
<li>Fix HTTP/3 to support streaming request bodies.</li>
<li>(wasm) Fix null bodies when calling
<code>Response::bytes_stream()</code>.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Clarify that <code>Response::content_length()</code> is not derived
from a <code>Content-Length</code> header in docs by <a
href="https://github.com/babolivier"><code>@​babolivier</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2588">seanmonstar/reqwest#2588</a></li>
<li>docs: link to <code>char::REPLACEMENT_CHARACTER</code> by <a
href="https://github.com/marcospb19"><code>@​marcospb19</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/1880">seanmonstar/reqwest#1880</a></li>
<li>feat: add H3 client config support by <a
href="https://github.com/smalls0098"><code>@​smalls0098</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2609">seanmonstar/reqwest#2609</a></li>
<li>chore: update brotli to v7 by <a
href="https://github.com/nyurik"><code>@​nyurik</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2620">seanmonstar/reqwest#2620</a></li>
<li>Do not pull in an entirely different DEFLATE implementation just for
tests by <a
href="https://github.com/Shnatsel"><code>@​Shnatsel</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2625">seanmonstar/reqwest#2625</a></li>
<li>chore: fix some typos in comment by <a
href="https://github.com/xixishidibei"><code>@​xixishidibei</code></a>
in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2628">seanmonstar/reqwest#2628</a></li>
<li>fix(wasm): handle null body in bytes_stream by <a
href="https://github.com/alongubkin"><code>@​alongubkin</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2632">seanmonstar/reqwest#2632</a></li>
<li><code>ClientBuilder::interface</code> on macOS/Solarish OSes by <a
href="https://github.com/hawkw"><code>@​hawkw</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2623">seanmonstar/reqwest#2623</a></li>
<li>ci: use ubuntu-latest in nightly job by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2646">seanmonstar/reqwest#2646</a></li>
<li>feat: BBR congestion control for http3 by <a
href="https://github.com/threeninesixseven"><code>@​threeninesixseven</code></a>
in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2642">seanmonstar/reqwest#2642</a></li>
<li>feat: Add extentions for Request by <a
href="https://github.com/Xuanwo"><code>@​Xuanwo</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2647">seanmonstar/reqwest#2647</a></li>
<li>refactor: Store request timeout in request extensions instead by <a
href="https://github.com/Xuanwo"><code>@​Xuanwo</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2650">seanmonstar/reqwest#2650</a></li>
<li>chore: make ci pass by <a
href="https://github.com/linyihai"><code>@​linyihai</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2666">seanmonstar/reqwest#2666</a></li>
<li>update h3 dependencys by <a
href="https://github.com/Ruben2424"><code>@​Ruben2424</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2670">seanmonstar/reqwest#2670</a></li>
<li>Document reqwest can make TLS and cookie requests with Wasm by <a
href="https://github.com/nickbabcock"><code>@​nickbabcock</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2661">seanmonstar/reqwest#2661</a></li>
<li>fix(redirect): make the number of redirects of policy matches its
maximum limit. by <a
href="https://github.com/linyihai"><code>@​linyihai</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2664">seanmonstar/reqwest#2664</a></li>
<li>Exposed hyper tcp keepalive interval and retries parameters by <a
href="https://github.com/mackliet"><code>@​mackliet</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2675">seanmonstar/reqwest#2675</a></li>
<li>refactor: use hyper-util's proxy::Matcher by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2681">seanmonstar/reqwest#2681</a></li>
<li>Support streaming request body in HTTP/3 by <a
href="https://github.com/ducaale"><code>@​ducaale</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2673">seanmonstar/reqwest#2673</a></li>
<li>refactor: use hyper-util <code>Tunnel</code> by <a
href="https://github.com/seanmonstar"><code>@​seanmonstar</code></a> in
<a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2684">seanmonstar/reqwest#2684</a></li>
<li>Upgrade webpki-roots to 1 by <a
href="https://github.com/djc"><code>@​djc</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2688">seanmonstar/reqwest#2688</a></li>
<li>refactor: remove <code>futures-util</code> unless using
<code>stream</code>/<code>multipart</code>/compression/<code>blocking</code>
by <a
href="https://github.com/paolobarbolini"><code>@​paolobarbolini</code></a>
in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2692">seanmonstar/reqwest#2692</a></li>
<li>chore: replace rustls-pemfile with rustls-pki-types by <a
href="https://github.com/tottoto"><code>@​tottoto</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2541">seanmonstar/reqwest#2541</a></li>
<li>Ensure H3ResponseFuture Implements Sync by <a
href="https://github.com/ducaale"><code>@​ducaale</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2685">seanmonstar/reqwest#2685</a></li>
<li>feat(redirect): Using <code>FollowRedirect</code> from
<code>tower-http</code> to handle the <code>redirect</code> loop by <a
href="https://github.com/linyihai"><code>@​linyihai</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2617">seanmonstar/reqwest#2617</a></li>
<li>feat: add customizable headers in proxy mode by <a
href="https://github.com/chanbengz"><code>@​chanbengz</code></a> in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2600">seanmonstar/reqwest#2600</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/seanmonstar/reqwest/blob/master/CHANGELOG.md">reqwest's
changelog</a>.</em></p>
<blockquote>
<h2>v0.12.18</h2>
<ul>
<li>Fix compilation when <code>socks</code> enabled without TLS.</li>
</ul>
<h2>v0.12.17</h2>
<ul>
<li>Fix compilation on macOS.</li>
</ul>
<h2>v0.12.16</h2>
<ul>
<li>Add <code>ClientBuilder::http3_congestion_bbr()</code> to enable BBR
congestion control.</li>
<li>Add <code>ClientBuilder::http3_send_grease()</code> to configure
whether to send use QUIC grease.</li>
<li>Add <code>ClientBuilder::http3_max_field_section_size()</code> to
configure the maximum response headers.</li>
<li>Add <code>ClientBuilder::tcp_keepalive_interval()</code> to
configure TCP probe interval.</li>
<li>Add <code>ClientBuilder::tcp_keepalive_retries()</code> to configure
TCP probe count.</li>
<li>Add <code>Proxy::headers()</code> to add extra headers that should
be sent to a proxy.</li>
<li>Fix <code>redirect::Policy::limit()</code> which had an off-by-1
error, allowing 1 more redirect than specified.</li>
<li>Fix HTTP/3 to support streaming request bodies.</li>
<li>(wasm) Fix null bodies when calling
<code>Response::bytes_stream()</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="595c80b1fb"><code>595c80b</code></a>
v0.12.18</li>
<li><a
href="f279ad1488"><code>f279ad1</code></a>
fix compilation if socks is enabled without tls</li>
<li><a
href="fed6bc6fd5"><code>fed6bc6</code></a>
ci: add a feature powerset check job</li>
<li><a
href="56ed35bbea"><code>56ed35b</code></a>
v0.12.17</li>
<li><a
href="f0bf46b9c5"><code>f0bf46b</code></a>
build: Fix compilation issues on macOS (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2696">#2696</a>)</li>
<li><a
href="99259cb8b5"><code>99259cb</code></a>
v0.12.16</li>
<li><a
href="57670aca66"><code>57670ac</code></a>
feat: add customizable headers for <code>reqwest::Proxy</code> (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2600">#2600</a>)</li>
<li><a
href="d9cf60e8f6"><code>d9cf60e</code></a>
refactor: Using <code>FollowRedirect</code> from <code>tower-http</code>
to handle the <code>redirect</code> l...</li>
<li><a
href="75f62f2436"><code>75f62f2</code></a>
fix: ensure H3ResponseFuture is sync (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2685">#2685</a>)</li>
<li><a
href="0e1d18895e"><code>0e1d188</code></a>
chore: replace rustls-pemfile with rustls-pki-types (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2541">#2541</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/seanmonstar/reqwest/compare/v0.12.15...v0.12.18">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=reqwest&package-manager=cargo&previous-version=0.12.15&new-version=0.12.18)](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 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>
Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2025-06-05 07:02:42 +00:00
..
2023-05-10 07:58:32 -07:00

Rust development guide

Firezone uses Rust for all data plane components. This directory contains the Linux and Windows clients, and low-level networking implementations related to STUN/TURN.

We target the last stable release of Rust using rust-toolchain.toml. If you are using rustup, that is automatically handled for you. Otherwise, ensure you have the latest stable version of Rust installed.

Reading Client logs

The Client logs are written as JSONL for machine-readability.

To make them more human-friendly, pipe them through jq like this:

cd path/to/logs  # e.g. `$HOME/.cache/dev.firezone.client/data/logs` on Linux
cat *.log | jq -r '"\(.time) \(.severity) \(.message)"'

Resulting in, e.g.

2024-04-01T18:25:47.237661392Z INFO started log
2024-04-01T18:25:47.238193266Z INFO GIT_VERSION = 1.0.0-pre.11-35-gcc0d43531
2024-04-01T18:25:48.295243016Z INFO No token / actor_name on disk, starting in signed-out state
2024-04-01T18:25:48.295360641Z INFO null

Benchmarking on Linux

The recommended way for benchmarking any of the Rust components is Linux' perf utility. For example, to attach to a running application, do:

  1. Ensure the binary you are profiling is compiled with the release profile.
  2. sudo perf record -g --freq 10000 --pid $(pgrep <your-binary>).
  3. Run the speed test or whatever load-inducing task you want to measure.
  4. sudo perf script > profile.perf
  5. Open profiler.firefox.com and load profile.perf

Instead of attaching to a process with --pid, you can also specify the path to executable directly. That is useful if you want to capture perf data for a test or a micro-benchmark.