Commit Graph

711 Commits

Author SHA1 Message Date
Thomas Eizinger
5744ed2a13 chore(connlib): remove unused event (#4110)
Seems to be a left-over from a previous design.
2024-03-13 03:25:21 +00:00
Thomas Eizinger
6b1c2c9369 chore(snownet): add basic unit test for a connection (#4097)
This is heavily inspired by how `str0m`'s `IceAgent` is tested. I left a
link for attribution. We can copy / move this later to write unit tests
for the `Tunnel`.
2024-03-12 22:26:10 +00:00
dependabot[bot]
3a245bdb65 build(deps): Bump @tauri-apps/cli from 1.5.10 to 1.5.11 in /rust/gui-client (#4078)
Bumps [@tauri-apps/cli](https://github.com/tauri-apps/tauri) from 1.5.10
to 1.5.11.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/tauri/releases"><code>@​tauri-apps/cli</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​tauri-apps/cli</code> v1.5.11</h2>
<h2>[1.5.11]</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="b15948b11c"><code>b15948b11</code></a>(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/8903">#8903</a>)
Fix <code>.taurignore</code> failing to ignore in some cases.</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>Upgraded to <code>tauri-cli@1.5.11</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b705f89a10"><code>b705f89</code></a>
Apply Version Updates From Current Changes (v1) (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9074">#9074</a>)</li>
<li><a
href="97a05145fb"><code>97a0514</code></a>
fix(cli): migrate to stable features of <code>log</code> crate (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9119">#9119</a>)</li>
<li><a
href="b15948b11c"><code>b15948b</code></a>
fix(cli): use <code>matched_path_or_any_parents</code> when checking if
a file is ignore...</li>
<li><a
href="5163861588"><code>5163861</code></a>
fix(bundler): escape potentially problematic strings in an XML (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9040">#9040</a>)</li>
<li><a
href="80a215a6f3"><code>80a215a</code></a>
Apply Version Updates From Current Changes (v1) (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9013">#9013</a>)</li>
<li><a
href="01ae1218dc"><code>01ae121</code></a>
ci: downgrade thread_local to 1.1.7 in msrv list (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9012">#9012</a>)</li>
<li><a
href="d42668ce17"><code>d42668c</code></a>
fix(runtime-wry): avoid panic during clipboard initialization on wayland
(<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9003">#9003</a>)</li>
<li><a
href="1ab0db6352"><code>1ab0db6</code></a>
chore: port PR template from <code>dev</code> branch (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/9004">#9004</a>)</li>
<li><a
href="e816a46b95"><code>e816a46</code></a>
chore: update lock files</li>
<li><a
href="a4b82d9dba"><code>a4b82d9</code></a>
chore: bump tauri-utils</li>
<li>See full diff in <a
href="https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v1.5.10...@tauri-apps/cli-v1.5.11">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@tauri-apps/cli&package-manager=npm_and_yarn&previous-version=1.5.10&new-version=1.5.11)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-12 20:53:09 +00:00
Jamil
574585d146 chore(ci): Add debug/ and perf/ prefix to some images (#4104)
Followup from #4100:


- Add `perf/relay` and `debug/relay` etc data plane images in
`firezone-staging`.
- The `perf` images are `debug` stage images and have tooling installed,
but use release binaries.
- The `debug` images are `debug` binaries inside `debug` images
- `firezone-prod` contains only release binaries -- these image names
haven't changed
2024-03-12 20:27:32 +00:00
Gabi
2e85ea1b3a refactor(connlib): use on_update_routes instead of on_add/on_remove_route (#3825)
Extracted from #3791 and #3750 

Co-authored-by: @jamilbk <jamilbk@users.noreply.github.com>
2024-03-12 19:49:32 +00:00
dependabot[bot]
9836c74ea5 build(deps): Bump the otel group in /rust with 3 updates (#3980)
Bumps the otel group in /rust with 3 updates:
[tracing-stackdriver](https://github.com/NAlexPear/tracing-stackdriver),
[tracing-opentelemetry](https://github.com/tokio-rs/tracing-opentelemetry)
and
[opentelemetry-otlp](https://github.com/open-telemetry/opentelemetry-rust).

Updates `tracing-stackdriver` from 0.8.0 to 0.9.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4a9fe0a37e"><code>4a9fe0a</code></a>
⬆ Bump version to 0.9.0</li>
<li>See full diff in <a
href="https://github.com/NAlexPear/tracing-stackdriver/compare/v0.8.0...v0.9.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `tracing-opentelemetry` from 0.21.0 to 0.22.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tracing-opentelemetry/releases">tracing-opentelemetry's
releases</a>.</em></p>
<blockquote>
<h2>0.22.0</h2>
<h3>Breaking Changes</h3>
<ul>
<li>Upgrade to <code>v0.21.0</code> of <code>opentelemetry</code>
For list of breaking changes in OpenTelemetry, see the
<a
href="https://github.com/open-telemetry/opentelemetry-rust/blob/v0.21.0/opentelemetry/CHANGELOG.md">v0.21.0
changelog</a>.</li>
<li>Update MSRV to require Rust 1.65+, as <code>opentelemetry</code>
requires it now. (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/68">#68</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>WASM Support (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/57">#57</a>)</li>
<li>Fix potential deadlock (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/59">#59</a>)</li>
</ul>
<p>Thanks to <a
href="https://github.com/jesseditson"><code>@​jesseditson</code></a>, <a
href="https://github.com/AsmPrgmC3"><code>@​AsmPrgmC3</code></a>, and <a
href="https://github.com/rthomas"><code>@​rthomas</code></a> for
contributing to this release!</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tracing-opentelemetry/blob/v0.1.x/CHANGELOG.md">tracing-opentelemetry's
changelog</a>.</em></p>
<blockquote>
<h1>0.22.0 (November 7, 2023)</h1>
<h3>Breaking Changes</h3>
<ul>
<li>Upgrade to <code>v0.21.0</code> of <code>opentelemetry</code>
For list of breaking changes in OpenTelemetry, see the
<a
href="https://github.com/open-telemetry/opentelemetry-rust/blob/v0.21.0/opentelemetry/CHANGELOG.md">v0.21.0
changelog</a>.</li>
<li>Update MSRV to require Rust 1.65+, as <code>opentelemetry</code>
requires it now. (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/68">#68</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>WASM Support (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/57">#57</a>)</li>
<li>Fix potential deadlock (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/59">#59</a>)</li>
</ul>
<p>Thanks to <a
href="https://github.com/jesseditson"><code>@​jesseditson</code></a>, <a
href="https://github.com/AsmPrgmC3"><code>@​AsmPrgmC3</code></a>, and <a
href="https://github.com/rthomas"><code>@​rthomas</code></a> for
contributing to this release!</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="62690b4ac9"><code>62690b4</code></a>
Prepare for v0.22.0 release (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/75">#75</a>)</li>
<li><a
href="2156c236db"><code>2156c23</code></a>
Update otel to version 0.21 (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/68">#68</a>)</li>
<li><a
href="cfc64f37b6"><code>cfc64f3</code></a>
build(deps): update tracing-log requirement from 0.1.3 to 0.2.0 (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/64">#64</a>)</li>
<li><a
href="70f3ed6f73"><code>70f3ed6</code></a>
build(deps): update pprof requirement from 0.12.1 to 0.13.0 (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/61">#61</a>)</li>
<li><a
href="bddef29233"><code>bddef29</code></a>
Add support for instrumented functions which return Result (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/28">#28</a>)</li>
<li><a
href="1c61ea6b56"><code>1c61ea6</code></a>
Fix potential deadlock (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/59">#59</a>)</li>
<li><a
href="5223a67887"><code>5223a67</code></a>
Update README example Cargo.toml (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/60">#60</a>)</li>
<li><a
href="a03ff2275b"><code>a03ff22</code></a>
Update criterion and pprof (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/42">#42</a>)</li>
<li><a
href="80ae3211db"><code>80ae321</code></a>
WASM Support (<a
href="https://redirect.github.com/tokio-rs/tracing-opentelemetry/issues/57">#57</a>)</li>
<li>See full diff in <a
href="https://github.com/tokio-rs/tracing-opentelemetry/compare/v0.21.0...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `opentelemetry-otlp` from 0.13.0 to 0.15.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/open-telemetry/opentelemetry-rust/releases">opentelemetry-otlp's
releases</a>.</em></p>
<blockquote>
<h2>v0.15.0</h2>
<h3>Added</h3>
<ul>
<li>More resource detectors <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/573">#573</a></li>
</ul>
<h3>Changed</h3>
<ul>
<li>Expose the Error type to allow users to set custom error handlers <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/551">#551</a></li>
<li>Allow users to use different channels based on runtime in batch span
processor <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/560">#560</a></li>
<li>Move <code>Unit</code> into <code>metrics</code> module <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/564">#564</a></li>
<li>Update trace flags to match spec <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/565">#565</a></li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix debug loop, add notes for <code>#[tokio::test]</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/552">#552</a></li>
<li><code>TraceState</code> cannot insert new key-value pairs <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/567">#567</a></li>
</ul>
<h2>v0.14.0</h2>
<h2>Added</h2>
<ul>
<li>Adding a dynamic dispatch to Aggregator Selector <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/497">#497</a></li>
<li>Add <code>global::force_flush_tracer_provider</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/512">#512</a></li>
<li>Add config <code>max_attributes_per_event</code> and
<code>max_attributes_per_link</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/521">#521</a></li>
<li>Add dropped attribute counts to events and links <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/529">#529</a></li>
</ul>
<h2>Changed</h2>
<ul>
<li>Remove unnecessary clone in <code>Key</code> type <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/491">#491</a></li>
<li>Remove <code>#[must_use]</code> from
<code>set_tracer_provider</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/501">#501</a></li>
<li>Rename remaining usage of <code>default_sampler</code> to
<code>sampler</code> <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/509">#509</a></li>
<li>Use current span for SDK-less context propagation <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/510">#510</a></li>
<li>Always export span batch when limit reached <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/519">#519</a></li>
<li>Rename message events to events <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/530">#530</a></li>
<li>Update resource merge behaviour <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/537">#537</a></li>
<li>Ignore links with invalid context <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/538">#538</a></li>
</ul>
<h2>Removed</h2>
<ul>
<li>Remove remote span context <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/508">#508</a></li>
<li>Remove metrics quantiles <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/525">#525</a></li>
</ul>
<h1>Fixed</h1>
<ul>
<li>Allow users to use custom export kind selector <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/526">#526</a></li>
</ul>
<h2>Performance</h2>
<ul>
<li>Improve simple span processor performance <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/502">#502</a></li>
<li>Local span perf improvements <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/505">#505</a></li>
<li>Reduce string allocations where possible <a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/506">#506</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d7ba1ea4f7"><code>d7ba1ea</code></a>
Prepare for v0.15.0 release (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/572">#572</a>)</li>
<li><a
href="6834b64192"><code>6834b64</code></a>
feat: add more resource detectors (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/573">#573</a>)</li>
<li><a
href="efbc842c11"><code>efbc842</code></a>
semantic-conventions: update to v1.4.0 spec (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/570">#570</a>)</li>
<li><a
href="d70a537548"><code>d70a537</code></a>
Update example and optional dependencies (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/568">#568</a>)</li>
<li><a
href="a2dd6e7779"><code>a2dd6e7</code></a>
fix: TraceState cannot insert new key-value pairs. (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/567">#567</a>)</li>
<li><a
href="dc7d81fdfa"><code>dc7d81f</code></a>
Update trace flags to match spec (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/565">#565</a>)</li>
<li><a
href="635f10e15d"><code>635f10e</code></a>
Move unit into metrics module (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/564">#564</a>)</li>
<li><a
href="99e51c1980"><code>99e51c1</code></a>
Update lib and tracing module docs with examples (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/563">#563</a>)</li>
<li><a
href="1ca62d337e"><code>1ca62d3</code></a>
feat: allow users to use different channels based on runtime in batch
span pr...</li>
<li><a
href="fb576b0e71"><code>fb576b0</code></a>
move hyper prometheus example into something runnable (<a
href="https://redirect.github.com/open-telemetry/opentelemetry-rust/issues/562">#562</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/open-telemetry/opentelemetry-rust/compare/v0.13.0...v0.15.0">compare
view</a></li>
</ul>
</details>
<br />


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>
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>
2024-03-12 19:16:35 +00:00
Gabi
270563bb93 chore(connlib): update quinn-udp (#4087)
quinn-rs/quinn#1758 was merged, meaning we don't need to maintain our
fork

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-03-12 17:22:48 +00:00
Thomas Eizinger
c67ba0b73b chore(snownet): remove repeated attribute (#4090) 2024-03-12 14:06:46 +00:00
Thomas Eizinger
48dc15f215 chore(snownet): extract constant for handshake timeout (#4091) 2024-03-12 14:06:28 +00:00
Thomas Eizinger
36848e31a9 fix(relay): actually expire channels which allows re-binding them (#4094)
Previously, the relay neither scheduled a `Wake` command nor did it
register a `TimedAction` to expire a channel binding. Such an action was
only scheduled after the first refresh.

This PR fixes this and adds a test that asserts we can re-bind the same
channel to a different peer after 15 minutes.

Resolves: #3979.
2024-03-12 10:13:47 +00:00
Thomas Eizinger
32e16ec927 feat(relay): improve logs for expiry and deletion of channel bindings (#4089)
Unfortunately, the current logs don't allow us to correlate, which
allocation and thus which client the expired channel binding relates to.
This PR fixes this by adding more fields to the relevant log messages.
2024-03-12 10:13:15 +00:00
Thomas Eizinger
066ed4c85d chore(snownet): log channel number and peer as part of failed channel binding (#4086)
Should help in debugging which channel we tried to bind without having
to sieve through the relay's logs for the transaction ID.
2024-03-12 10:12:50 +00:00
Thomas Eizinger
407d20d817 refactor(connlib): use phoenix-channel crate for clients (#3682)
Depends-On: #4048.
Depends-On: #4015.

Resolves: #2158.

---------

Co-authored-by: conectado <gabrielalejandro7@gmail.com>
2024-03-12 08:10:56 +00:00
Thomas Eizinger
879a9019b3 refactor(connlib): split Device creation from initialization (#4069)
This reduces the amount of boilerplate required in the `Tunnel`'s
eventloop. It also makes re-initialization of a `Device` much easier.
2024-03-11 21:04:18 +00:00
Thomas Eizinger
dde8b646f0 chore(connlib): remove redundant action from wire log (#4061)
The fields `to` and `from` already indicate that we are either reading
or writing.
2024-03-11 21:04:17 +00:00
Jamil
6575e0ca26 chore(ci): Refactor CI to use prod images in staging and prevent accidental hotfix breakages (#4049)
- Runs release asset builds simultaneously with `deploy-staging`. Those
don't depend on each other.
- Prevents running some build workflows in CD because they're run
already in the PR and in the merge group, and the risk of semantic
conflict is negligible
- Run `release` assets in staging
- Adds `compatibility_tests`: **To successfully introduce a breaking
change in the control / data plane APIs, you must now "Merge as
Administrator"**
- Since `CI` is no longer run on `main`, caching needed to be refactored
to make sense again
- Since `CI` is no longer run on `main`, the Elixir
`migrations_and_seeds_test` had to be rewritten. This now tests
migrations using `git checkout` instead of importing `main`'s DB dump.
- Move tauri builds to its own workflow so we can trigger Linux and
Windows builds manually on an adhoc basis like we do for the Swift and
Kotlin builds
- Add a new `hotfix` workflow that will run `compatibility_tests` with
the latest published images
- Add `workflow_dispatch` to trigger `CD` manually for testing purposes
(cc @ReactorScram)


Refs #3995
2024-03-11 20:01:34 +00:00
Thomas Eizinger
aeee9920a3 refactor(snownet): compose lower-level SANS-IO components differently (#4047)
As part of implementing https://github.com/firezone/firezone/pull/4022,
I realised that I probably composed all the SANS-IO components in the
wrong way. This PR fixes this and adds some documentation on why.
Interestingly, this makes several things of the design simpler because
we end up passing around less state.
2024-03-11 17:34:51 +00:00
Reactor Scram
b6b44fd6db chore: fix the warning about Tauri notifications (#4075)
They do work on aarch64, it's just on systems where the MSI hasn't been
installed, they'll silently fail.
2024-03-11 16:13:26 +00:00
Jamil
a9b8e2fec9 refactor(connlib): Disable log uploading until UI flows can be built in the clients to opt in (#4065)
Making a minimal PR to get the app shipped. A better method of
configuring this (or removing it altogether if deemed unnecessary) is
coming in #3910
2024-03-11 15:37:31 +00:00
Thomas Eizinger
187dc0c58d chore(connlib): delete stale file (#4070)
This should have been deleted as part of
https://github.com/firezone/firezone/pull/3984 but I think a rebase
messed it up.
2024-03-11 14:53:23 +00:00
dependabot[bot]
1600a14cb9 build(deps): Bump reqwest from 0.11.24 to 0.11.25 in /rust (#4071)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.24 to
0.11.25.
<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.11.25</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix <code>Certificate::from_pem_bundle()</code> parsing.</li>
<li>Fix Apple linker errors from detecting system proxies.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/cdata"><code>@​cdata</code></a> made
their first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2130">seanmonstar/reqwest#2130</a></li>
<li><a
href="https://github.com/yottalogical"><code>@​yottalogical</code></a>
made their first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2154">seanmonstar/reqwest#2154</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25">https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25</a></p>
</blockquote>
</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.11.25</h2>
<ul>
<li>Fix <code>Certificate::from_pem_bundle()</code> parsing.</li>
<li>Fix Apple linker errors from detecting system proxies.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7e776747f5"><code>7e77674</code></a>
v0.11.25</li>
<li><a
href="ba550f0da6"><code>ba550f0</code></a>
docs: change no-default-features to default-features (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2154">#2154</a>)</li>
<li><a
href="68547a0af6"><code>68547a0</code></a>
chore: blocking doesn't need multi-threaded (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2146">#2146</a>)</li>
<li><a
href="e639bdc126"><code>e639bdc</code></a>
fix: Patch <code>system-configuration</code> version (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2130">#2130</a>)</li>
<li><a
href="ba9e5887ce"><code>ba9e588</code></a>
Fix Certificate::from_pem_bundle (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2129">#2129</a>)</li>
<li><a
href="2d6eb24445"><code>2d6eb24</code></a>
chore: Inline format args (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2024">#2024</a>)</li>
<li><a
href="05c3982e24"><code>05c3982</code></a>
chore: Use edition 2021 panics (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2122">#2122</a>)</li>
<li><a
href="05996d80b7"><code>05996d8</code></a>
chore: edition 2021 (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2023">#2023</a>)</li>
<li>See full diff in <a
href="https://github.com/seanmonstar/reqwest/compare/v0.11.24...v0.11.25">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.11.24&new-version=0.11.25)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:32:30 +00:00
dependabot[bot]
5d246d65ff build(deps): Bump redis from 0.24.0 to 0.25.0 in /rust (#4073)
Bumps [redis](https://github.com/redis-rs/redis-rs) from 0.24.0 to
0.25.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/redis-rs/redis-rs/releases">redis's
releases</a>.</em></p>
<blockquote>
<h2>v0.25.0</h2>
<h3>0.25.0 (2024-03-08)</h3>
<h4>Features</h4>
<ul>
<li><strong>Breaking change</strong>: Add connection timeout to the
cluster client (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/834">#834</a>)</li>
<li><strong>Breaking change</strong>: Deprecate aio::Connection (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/889">#889</a>)</li>
<li>Cluster: fix read from replica &amp; missing slots (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/965">#965</a>)</li>
<li>Async cluster connection: Improve handling of missing connections
(<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/968">#968</a>)</li>
<li>Add support for parsing to/from any sized arrays (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/981">#981</a>)</li>
<li>Upgrade to rustls 0.22 (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1000">#1000</a>
<a href="https://github.com/djc"><code>@​djc</code></a>)</li>
<li>add SMISMEMBER command (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1002">#1002</a>
<a href="https://github.com/Zacaria"><code>@​Zacaria</code></a>)</li>
<li>Add support for some big number types (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1014">#1014</a>
<a
href="https://github.com/AkiraMiyakoda"><code>@​AkiraMiyakoda</code></a>)</li>
<li>Add Support for UUIDs (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1029">#1029</a>
<a
href="https://github.com/Rabbitminers"><code>@​Rabbitminers</code></a>)</li>
<li>Add FromRedisValue::from_owned_redis_value to reduce copies while
parsing response (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1030">#1030</a>
<a
href="https://github.com/Nathan-Fenner"><code>@​Nathan-Fenner</code></a>)</li>
<li>Save reconnected connections during retries (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1033">#1033</a>)</li>
<li>Avoid panic on connection failure (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1035">#1035</a>)</li>
<li>add disable client setinfo feature and its default mode is off (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1036">#1036</a>
<a href="https://github.com/Ggiggle"><code>@​Ggiggle</code></a>)</li>
<li>Reconnect on parsing errors (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1051">#1051</a>)</li>
<li>preallocate buffer for evalsha in Script (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1044">#1044</a>
<a href="https://github.com/framlog"><code>@​framlog</code></a>)</li>
</ul>
<h4>Changes</h4>
<ul>
<li>Align more commands routings (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/938">#938</a>)</li>
<li>Fix HashMap conversion (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/977">#977</a>
<a href="https://github.com/mxbrt"><code>@​mxbrt</code></a>)</li>
<li>MultiplexedConnection: Remove unnecessary allocation in send (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/990">#990</a>)</li>
<li>Tests: Reduce cluster setup flakiness (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/999">#999</a>)</li>
<li>Remove the unwrap_or! macro (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1010">#1010</a>)</li>
<li>Remove allocation from command function (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1008">#1008</a>)</li>
<li>Catch panics from task::spawn in tests (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1015">#1015</a>)</li>
<li>Fix lint errors from new Rust version (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1016">#1016</a>)</li>
<li>Fix warnings that appear only with native-TLS (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1018">#1018</a>)</li>
<li>Hide the req_packed_commands from docs (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1020">#1020</a>)</li>
<li>Fix documentaion error (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1022">#1022</a>
<a
href="https://github.com/rcl-viveksharma"><code>@​rcl-viveksharma</code></a>)</li>
<li>Fixes minor grammar mistake in json.rs file (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1026">#1026</a>
<a href="https://github.com/RScrusoe"><code>@​RScrusoe</code></a>)</li>
<li>Enable ignored pipe test (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1027">#1027</a>)</li>
<li>Fix names of existing async cluster tests (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1028">#1028</a>)</li>
<li>Add lock file to keep MSRV constant (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1039">#1039</a>)</li>
<li>Fail CI if lock file isn't updated (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1042">#1042</a>)</li>
<li>impl Clone/Copy for SetOptions (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1046">#1046</a>
<a href="https://github.com/ahmadbky"><code>@​ahmadbky</code></a>)</li>
<li>docs: add &quot;connection-manager&quot; cfg attr (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1048">#1048</a>
<a href="https://github.com/DCNick3"><code>@​DCNick3</code></a>)</li>
<li>Remove the usage of aio::Connection in tests (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1049">#1049</a>)</li>
<li>Fix new clippy lints (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1052">#1052</a>)</li>
<li>Handle server errors in array response (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1056">#1056</a>)</li>
<li>Appease Clippy (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1061">#1061</a>)</li>
<li>make Pipeline handle returned bulks correctly (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1063">#1063</a>
<a href="https://github.com/framlog"><code>@​framlog</code></a>)</li>
<li>Update mio dependency due to vulnerability (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1064">#1064</a>)</li>
<li>Simplify Sink polling logic (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1065">#1065</a>)</li>
<li>Separate parsing errors from general response errors (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/1069">#1069</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c90a96e9bc"><code>c90a96e</code></a>
Release redis 0.25.0 / redis-test 0.4.0</li>
<li><a
href="38e41795a4"><code>38e4179</code></a>
Separate parsing errors from general response errors.</li>
<li><a
href="069a952780"><code>069a952</code></a>
Create a server error type.</li>
<li><a
href="b0955da868"><code>b0955da</code></a>
Handle server errors in array response.</li>
<li><a
href="4c9924ec3a"><code>4c9924e</code></a>
Fail CI if lock file isn't updated.</li>
<li><a
href="1a5032d327"><code>1a5032d</code></a>
Remove the usage of aio::Connection in tests.</li>
<li><a
href="97b5be1491"><code>97b5be1</code></a>
Simplify Sink polling logic.</li>
<li><a
href="afd0e0dbb3"><code>afd0e0d</code></a>
Update mio dependency due to vulnerability. (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/1064">#1064</a>)</li>
<li><a
href="3867f3f193"><code>3867f3f</code></a>
[fix] make <code>Pipeline</code> handle returned bulks correctly</li>
<li><a
href="78a37b50e8"><code>78a37b5</code></a>
Save reconnected connections during retries.</li>
<li>Additional commits viewable in <a
href="https://github.com/redis-rs/redis-rs/compare/redis-0.24.0...redis-0.25.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=redis&package-manager=cargo&previous-version=0.24.0&new-version=0.25.0)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:32:24 +00:00
dependabot[bot]
e4b74236ef build(deps): Bump ctrlc from 3.4.2 to 3.4.4 in /rust (#4072)
Bumps [ctrlc](https://github.com/Detegr/rust-ctrlc) from 3.4.2 to 3.4.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Detegr/rust-ctrlc/releases">ctrlc's
releases</a>.</em></p>
<blockquote>
<h2>v3.4.4</h2>
<p><code>nix</code> 0.27 -&gt; 0.28
MSRV 1.63.0 -&gt; 1.69.0</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="8ad302d8a1"><code>8ad302d</code></a>
Version 3.4.4</li>
<li><a
href="716787234a"><code>7167872</code></a>
Fix build error on macOS</li>
<li><a
href="ceef26a11a"><code>ceef26a</code></a>
Format with rustfmt</li>
<li><a
href="bd8310ea9b"><code>bd8310e</code></a>
Migrate to GitHub Actions</li>
<li><a
href="4d590bc84f"><code>4d590bc</code></a>
Version 3.4.3</li>
<li><a
href="394fd83b92"><code>394fd83</code></a>
Update nix</li>
<li>See full diff in <a
href="https://github.com/Detegr/rust-ctrlc/compare/3.4.2...3.4.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ctrlc&package-manager=cargo&previous-version=3.4.2&new-version=3.4.4)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-11 10:32:18 +00:00
Thomas Eizinger
424e5ac5b0 chore(connlib): update dependency after merged PR (#4066)
The linked PR got merged, so we can now depend on the upstream
repository.
2024-03-11 04:27:39 +00:00
Thomas Eizinger
51bff720ea fix(connlib): ignore certain multicast addresses (#4062)
Resolves: #3015.
Resolves: #4024.
2024-03-11 04:13:25 +00:00
Thomas Eizinger
d8df8d8b7e chore: bump str0m fork to include recently merged PRs (#4055) 2024-03-11 02:37:12 +00:00
Thomas Eizinger
3d42fa16a5 chore: unbreak CI after force-push (#4063) 2024-03-11 12:29:44 +11:00
Thomas Eizinger
e64189c2de feat(snownet): log duration since intent after WG handshake completes (#3991)
Preceded by some refactoring, this PR adds a log line with a very
important metric: Time since connection intent after WG handshake. This
is the equivalent of time-to-first-byte, i.e. how long the user needs to
wait to actually send their first application data after they've tried
for the firs time (and generated an intent).
2024-03-09 09:42:27 +00:00
Thomas Eizinger
fdb33674cd refactor(connlib): introduce LoginUrl component (#4048)
Currently, we are passing a lot of data into `Session::connect`. Half of
this data is only needed to construct the URL we will use to connect to
the portal. We can simplify this by extracting a dedicated `LoginUrl`
component that captures and validates this data early.

Not only does this reduce the number of parameters we pass to
`Session::connect`, it also reduces the number of failure cases we have
to deal with in `Session::connect`. Any time the session fails, we have
to call `onDisconnected` to inform the client. Thus, we should perform
as much validation as we can early on. In other words, once
`Session::connect` returns, the client should be able to expect that the
tunnel is starting.
2024-03-09 09:35:15 +00:00
Thomas Eizinger
a2f289f0b1 feat(connlib): decrease connection setup latency (#4022)
`snownet` is built in a SANS-IO way, which means it doesn't have
internal timers or IO. It is up to the upper layer to correctly check
`poll_timeout` and call `handle_timeout` as soon as that expires. _When_
we want to be called again (i.e. the result of `poll_timeout`) may
change every time `snownet`s internal state changes. This is especially
critical during the initial setup of a connection.

As we learn about our own candidates and candidates from the other
party, we form new pairs. To actually detect whether the pair is a
viable network path, we need to send a STUN request. When to send STUN
requests is controlled by time. A newly formed pair should send a STUN
request as soon as possible to minimize latency.

Previously, we did not update the timer upon which we "wake" `snownet`
using `handle_timeout`. As such, we waited unnecessarily long before
sending STUN requests to newly formed pairs. With this patch, we check
`poll_timeout` at end of the `Tunnel`'s `poll` function and immediately
call `handle_timeout` in case we need to.

Currently, `str0m` throttles updates to `handle_timeout` in 50ms blocks
which still creates some delay. With that commented out, I observed
improvements of ~0.7s for establishing new connections. Most of the
time, the 2nd ping already goes through!
2024-03-09 09:29:14 +00:00
Thomas Eizinger
ea53ae7a55 feat(snownet): timeout connections if we don't receive a candidate within 10s (#3790)
Previously, we had a dedicated timer for this within the tunnel
implementation. Now that we have control over the internals of our
connection via `snownet`, we can timeout the connection if we don't
receive a candidate from the remote within 10s.
2024-03-09 08:03:57 +00:00
Thomas Eizinger
4339030d03 refactor(phoenix-channel): reduce Error to fatal errors (#4015)
As part of doing https://github.com/firezone/firezone/pull/3682, we
noticed that the handling of errors up to the clients needs to
differentiate between fatal errors that require clearing the token vs
not.

Upon closer inspection of `phoenix_channel::Error`, it becomes obvious
that the current design is not good here. In particular, we handle
certain errors with retries internally but still expose those same
errors.

To make this more obvious, we reduce the public `Error` to the variants
that are actually fatal. Those can really only be three:

- HTTP client errors (those are by definition non-retryable)
- Token expired
- We have reached our max number of retries
2024-03-09 08:03:25 +00:00
Gabi
21fe85048c refactor(connlib): No longer replacing Device in the Tunnel and android fixes to Tun struct (#4012)
This PR does the following:

* Remove `Closeable` struct for andorid's tun file descriptor
* Make `add_route` and `remove_route` mutate tun device so android can
mutate file descriptor and no longer have upper layers replacing
`Device`
* Fix a bug where android closed still used file descriptor if
`add_route` and `remove_route` returned the same
2024-03-08 19:09:36 +00:00
Reactor Scram
7211e88338 feat(linux-client): generate firezone-id (device ID) automatically if it's not provided at launch (#3920)
Closes #3815 

Changes that are breaking (but these aren't in production so it should
be okay)

- Windows, renaming `device_id.json` to `firezone-id.json` to match the
rest of the code
- Linux GUI, storing the firezone-id under `/var/lib` instead of under
`$HOME`
- Linux GUI, bails out if not run with `sudo --preserve-env` by
detecting `$HOME == root` or `$USER != root`

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-08 16:13:59 +00:00
Thomas Eizinger
998bf17891 refactor(connlib): only call onDisconnect for unrecoverable errors (#4014)
Previously, we called `onDisconnect` in two kinds of situations:

- With an error when we wanted the clients to clear the token
- Without an error when the token was still valid (i.e. after a call to
`disconnect` from the clients)

This is unnecessarily redundant. Firezone is designed to **not** have a
state of "signed in but disconnected". Thus, every time connlib calls
`disconnect`, we should clear the token and sign the user out.

At present, we only do this for errors with the control plane. Errors in
the actual tunnel are only logged and we continue trying to use the
tunnel. There are errors in the tunnel where we should also give up
(i.e. TUN device gone, fatal IO error, etc). At present, those are not
yet bubbled up but we will at some point. Once we have
https://github.com/firezone/firezone/pull/3682, it will be much easier
to create a type-safe contract that ensures we only disconnect on fatal
errors.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
Co-authored-by: ReactorScram <ReactorScram@users.noreply.github.com>
2024-03-08 02:22:48 +00:00
Reactor Scram
21d6e4f7d6 fix: let Tauri know about hiDPI icons (#4039)
Untested guess, refs #3999

Looks like we generated a 2x PNG but didn't tell Tauri about it, maybe
it'll know what to do if it's added to tauri.conf.json.
2024-03-07 23:04:29 +00:00
dependabot[bot]
2e2fa100e8 build(deps): Bump chrono from 0.4.34 to 0.4.35 in /rust (#4008)
Bumps [chrono](https://github.com/chronotope/chrono) from 0.4.34 to
0.4.35.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/chronotope/chrono/releases">chrono's
releases</a>.</em></p>
<blockquote>
<h2>v0.4.35</h2>
<p>Most of our efforts have shifted to improving the API for a 0.5
release, for which cleanups and refactorings are landing on the 0.4.x
branch.</p>
<p>The most significant changes in this release are two sets of
deprecations.</p>
<ul>
<li>
<p>We deprecated all timestamp-related methods on
<code>NaiveDateTime</code>. The reason is that a timestamp is defined to
be in UTC. The <code>NaiveDateTime</code> type doesn't know the offset
from UTC, so it was technically wrong to have these methods. The
alternative is to use the similar methods on the
<code>DateTime&lt;Utc&gt;</code> type, or from the <code>TimeZone</code>
trait.</p>
<p>Converting from <code>NaiveDateTime</code> to
<code>DateTime&lt;Utc&gt;</code> is simple with <code>.and_utc()</code>,
and in the other direction with <code>.naive_utc()</code>.</p>
</li>
<li>
<p>The panicking constructors of <code>TimeDelta</code> (the new name of
the <code>Duration</code> type) are deprecated. This was the last part
of chrono that defaulted to panicking on error, dating from before rust
1.0.</p>
</li>
<li>
<p>A nice change is that <code>NaiveDate</code> now includes a niche. So
now <code>Option&lt;NaiveDate&gt;</code>,
<code>Option&lt;NaiveDateTime&gt;</code> and
<code>Option&lt;DateTime&lt;Tz&gt;&gt;</code> are the same size as their
base types.</p>
</li>
<li>
<p><code>format::Numeric</code> and <code>format::Fixed</code> are
marked as <code>non_exhaustive</code>. This will allow us to improve our
formatting and parsing support, and we have reason to believe this
breaking change will have little to no impact on users.</p>
</li>
</ul>
<h1>Additions</h1>
<ul>
<li>Add <code>DateTime::{from_timestamp_micros,
from_timestamp_nanos}</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1234">#1234</a>)</li>
<li>Add getters to <code>Parsed</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1465">#1465</a>)</li>
</ul>
<h1>Deprecations</h1>
<ul>
<li>Deprecate timestamp methods on <code>NaiveDateTime</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1473">#1473</a>)</li>
<li>Deprecate panicking constructors of <code>TimeDelta</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1450">#1450</a>)</li>
</ul>
<h1>Changes/fixes</h1>
<ul>
<li>Use <code>NonZeroI32</code> inside <code>NaiveDate</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1207">#1207</a>)</li>
<li>Mark <code>format::Numeric</code> and <code>format::Fixed</code> as
<code>non_exhaustive</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1430">#1430</a>)</li>
<li><code>Parsed</code> fixes to error values (<a
href="https://redirect.github.com/chronotope/chrono/issues/1439">#1439</a>)</li>
<li>Use <code>overflowing_naive_local</code> in
<code>DateTime::checked_add*</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1333">#1333</a>)</li>
<li>Do complete range checks in <code>Parsed::set_*</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1465">#1465</a>)</li>
</ul>
<h1>Documentation</h1>
<ul>
<li>Rustfmt doctests (<a
href="https://redirect.github.com/chronotope/chrono/issues/1452">#1452</a>)</li>
<li>Improve docs for crate features (<a
href="https://redirect.github.com/chronotope/chrono/issues/1455">#1455</a>,
thanks <a
href="https://github.com/edmorley"><code>@​edmorley</code></a>)</li>
<li>Add more documentation and examples to <code>Parsed</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1439">#1439</a>)</li>
</ul>
<h1>Internal</h1>
<ul>
<li>Refactor <code>internals</code> module (<a
href="https://redirect.github.com/chronotope/chrono/issues/1428">#1428</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1429">#1429</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1431">#1431</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1432">#1432</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1433">#1433</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1438">#1438</a>)</li>
<li>CI: test cross-compiling to <code>x86_64-unknown-illumos</code>
instead of Solaris (<a
href="https://redirect.github.com/chronotope/chrono/issues/1437">#1437</a>)</li>
<li>CI: lint Windows target, fix clippy warning (<a
href="https://redirect.github.com/chronotope/chrono/issues/1441">#1441</a>)</li>
<li>CI: only run <code>cargo hack check</code> on Linux (<a
href="https://redirect.github.com/chronotope/chrono/issues/1442">#1442</a>)</li>
<li>Update windows-bindgen to 0.54 (<a
href="https://redirect.github.com/chronotope/chrono/issues/1462">#1462</a>,
<a
href="https://redirect.github.com/chronotope/chrono/issues/1483">#1483</a>)</li>
<li>Simplify error value of <code>parse_internal</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1459">#1459</a>)</li>
<li>Simplify <code>SerdeError</code> (<a
href="https://redirect.github.com/chronotope/chrono/issues/1458">#1458</a>)</li>
<li>Simplify <code>NaiveDate::from_isoywd</code> a bit (<a
href="https://redirect.github.com/chronotope/chrono/issues/1464">#1464</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9fdb59638e"><code>9fdb596</code></a>
Prepare 0.4.35</li>
<li><a
href="9e667b606e"><code>9e667b6</code></a>
Deprecate panicking <code>TimeDelta</code> constructors</li>
<li><a
href="2c1b0bea94"><code>2c1b0be</code></a>
Tests: replace <code>TimeDelta::milliseconds</code> with
<code>try_milliseconds</code></li>
<li><a
href="2bf3302ce5"><code>2bf3302</code></a>
Tests: replace <code>TimeDelta::seconds</code> with
<code>try_seconds</code></li>
<li><a
href="f93508ffd9"><code>f93508f</code></a>
Tests: replace <code>TimeDelta::minutes</code> with
<code>try_minutes</code></li>
<li><a
href="9fc931a394"><code>9fc931a</code></a>
Tests: replace <code>TimeDelta::hours</code> with
<code>try_hours</code></li>
<li><a
href="9f23c08e10"><code>9f23c08</code></a>
Tests: replace <code>TimeDelta::days</code> with
<code>try_days</code></li>
<li><a
href="e8f9b5e041"><code>e8f9b5e</code></a>
Tests: replace <code>TimeDelta::weeks</code> with
<code>try_weeks</code></li>
<li><a
href="51a1aa27bd"><code>51a1aa2</code></a>
Tests: use <code>Days</code> type when it is more appropriate than
<code>TimeDelta</code></li>
<li><a
href="4251bd1eb1"><code>4251bd1</code></a>
Replace <code>TimeDelta::seconds</code> with
<code>try_seconds</code></li>
<li>Additional commits viewable in <a
href="https://github.com/chronotope/chrono/compare/v0.4.34...v0.4.35">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=chrono&package-manager=cargo&previous-version=0.4.34&new-version=0.4.35)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 22:25:43 +00:00
Reactor Scram
3ee1d101ff docs(windows): notifications don't work on Windows-on-Arm (aarch64) yet (#4037)
Ref #4035
2024-03-07 19:58:09 +00:00
Reactor Scram
e4d828b9b1 ci(docker): bump Rust from 1.74 to 1.76 (#4033)
This was accidentally missed in #3632. Jamil said it may fix
`cargo-chef`'s caching once merged.

Part of #3995
2024-03-07 19:08:23 +00:00
dependabot[bot]
2ee801ad9d build(deps-dev): Bump @types/node from 20.11.15 to 20.11.25 in /rust/gui-client (#4000)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.11.15 to 20.11.25.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.11.15&new-version=20.11.25)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 18:48:04 +00:00
Jamil
c948693655 chore(deps): Fix deprecation error with chrono (#4032)
Fixes the issue in #4008
2024-03-07 18:44:54 +00:00
dependabot[bot]
869bf2407b build(deps): Bump @tauri-apps/cli from 1.5.9 to 1.5.10 in /rust/gui-client (#4004)
Bumps [@tauri-apps/cli](https://github.com/tauri-apps/tauri) from 1.5.9
to 1.5.10.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/tauri/releases"><code>@​tauri-apps/cli</code>'s
releases</a>.</em></p>
<blockquote>
<h2><code>@​tauri-apps/cli</code> v1.5.10</h2>
<h2>[1.5.10]</h2>
<h3>Bug Fixes</h3>
<ul>
<li><a
href="b0f27814b9"><code>b0f27814</code></a>(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/8776">#8776</a>)
Fix <code>fail to rename app</code> when using <code>--profile
dev</code>.</li>
<li><a
href="0bff8c325d"><code>0bff8c32</code></a>(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/8697">#8697</a>)
Fix the built-in dev server failing to serve files when URL had queries
<code>?</code> and other url components.</li>
<li><a
href="67d7877f27"><code>67d7877f</code></a>(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/8520">#8520</a>)
The cli now also watches cargo workspace members if the tauri folder is
the workspace root.</li>
</ul>
<h3>Dependencies</h3>
<ul>
<li>Upgraded to <code>tauri-cli@1.5.10</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b735b6799f"><code>b735b67</code></a>
Apply Version Updates From Current Changes (v1) (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8475">#8475</a>)</li>
<li><a
href="7b5e8712e7"><code>7b5e871</code></a>
ci: update msrv test and cargo.lock</li>
<li><a
href="2421073576"><code>2421073</code></a>
fix(macos): use BTreeMap for windows map to prevent crash on idle (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8117">#8117</a>)</li>
<li><a
href="510b62261c"><code>510b622</code></a>
chore(core): Add missing changefile for <a
href="https://redirect.github.com/tauri-apps/tauri/issues/8546">#8546</a>
(<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8822">#8822</a>)</li>
<li><a
href="b0f27814b9"><code>b0f2781</code></a>
fix(cli): map <code>--profile dev</code> to <code>debug</code> folder
when finding executable (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8776">#8776</a>)</li>
<li><a
href="cc3d8e7731"><code>cc3d8e7</code></a>
fix(core): Command::output suspend while wait for response (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8539">#8539</a>)</li>
<li><a
href="8ce51cec3b"><code>8ce51ce</code></a>
feat: retain cli args when relaunching after update, closes <a
href="https://redirect.github.com/tauri-apps/tauri/issues/7402">#7402</a>
(<a
href="https://redirect.github.com/tauri-apps/tauri/issues/7718">#7718</a>)</li>
<li><a
href="0bff8c325d"><code>0bff8c3</code></a>
fix(cli): Ignore query parameter in dev server (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8697">#8697</a>)</li>
<li><a
href="a9b2c0625c"><code>a9b2c06</code></a>
chore: Commit Cargo.lock (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8586">#8586</a>)</li>
<li><a
href="7aa30dec85"><code>7aa30de</code></a>
feat: Add Section, Priority and Changelog options (<a
href="https://redirect.github.com/tauri-apps/tauri/issues/8620">#8620</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tauri-apps/tauri/compare/@tauri-apps/cli-v1.5.9...@tauri-apps/cli-v1.5.10">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@tauri-apps/cli&package-manager=npm_and_yarn&previous-version=1.5.9&new-version=1.5.10)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 15:03:44 +00:00
dependabot[bot]
510714ddcd build(deps): Bump clap from 4.5.1 to 4.5.2 in /rust (#4009)
Bumps [clap](https://github.com/clap-rs/clap) from 4.5.1 to 4.5.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.5.2</h2>
<h2>[4.5.2] - 2024-03-06</h2>
<h3>Fixes</h3>
<ul>
<li><em>(macros)</em> Silence a warning</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.5.2] - 2024-03-06</h2>
<h3>Fixes</h3>
<ul>
<li><em>(macros)</em> Silence a warning</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f65d421607"><code>f65d421</code></a>
chore: Release</li>
<li><a
href="886b2729e4"><code>886b272</code></a>
docs: Update changelog</li>
<li><a
href="3ba429752f"><code>3ba4297</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5386">#5386</a>
from amaanq/static-var-name</li>
<li><a
href="2aea9504c4"><code>2aea950</code></a>
fix: Use SCREAMING_SNAKE_CASE for static variable
<code>authors</code></li>
<li><a
href="690f5557d7"><code>690f555</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5382">#5382</a>
from clap-rs/renovate/pre-commit-action-3.x</li>
<li><a
href="a2aa644368"><code>a2aa644</code></a>
chore(deps): update compatible (dev) (<a
href="https://redirect.github.com/clap-rs/clap/issues/5381">#5381</a>)</li>
<li><a
href="c233de53c0"><code>c233de5</code></a>
chore(deps): update pre-commit/action action to v3.0.1</li>
<li><a
href="d0028d74b5"><code>d0028d7</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5371">#5371</a>
from BenWiederhake/dev-fix-link-command-trailing_var...</li>
<li><a
href="0076cac7cb"><code>0076cac</code></a>
fix(builder): Don't doc-link to undocumented item</li>
<li>See full diff in <a
href="https://github.com/clap-rs/clap/compare/clap_complete-v4.5.1...v4.5.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=clap&package-manager=cargo&previous-version=4.5.1&new-version=4.5.2)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 04:39:39 +00:00
dependabot[bot]
98779bb84b build(deps-dev): Bump typescript from 5.3.3 to 5.4.2 in /rust/gui-client (#4001)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 5.3.3
to 5.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Microsoft/TypeScript/releases">typescript's
releases</a>.</em></p>
<blockquote>
<h2>TypeScript 5.4</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-4/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.1 (RC)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.2%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.2 (Stable)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
<h2>TypeScript 5.4 RC</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-4-rc/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.0 (Beta)</a>.</li>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.1%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.1 (RC)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
<h2>TypeScript 5.4 Beta</h2>
<p>For release notes, check out the <a
href="https://devblogs.microsoft.com/typescript/announcing-typescript-5-4-beta/">release
announcement</a>.</p>
<p>For the complete list of fixed issues, check out the</p>
<ul>
<li><a
href="https://github.com/Microsoft/TypeScript/issues?utf8=%E2%9C%93&amp;q=milestone%3A%22TypeScript+5.4.0%22+is%3Aclosed+">fixed
issues query for Typescript 5.4.0 (Beta)</a>.</li>
</ul>
<p>Downloads are available on:</p>
<ul>
<li><a href="https://www.npmjs.com/package/typescript">npm</a></li>
<li><a
href="https://www.nuget.org/packages/Microsoft.TypeScript.MSBuild">NuGet
package</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="42bb138173"><code>42bb138</code></a>
Bump version to 5.4.2 and LKG</li>
<li><a
href="992c70519c"><code>992c705</code></a>
Add release pipeline to release-5.4 (<a
href="https://redirect.github.com/Microsoft/TypeScript/issues/57513">#57513</a>)</li>
<li><a
href="db6b2a9802"><code>db6b2a9</code></a>
Bump version to 5.4.1-rc and LKG</li>
<li><a
href="bd4f51c8f0"><code>bd4f51c</code></a>
Update LKG</li>
<li><a
href="8a1f79dca5"><code>8a1f79d</code></a>
Merge remote-tracking branch 'origin/main' into release-5.4</li>
<li><a
href="d04e3489b0"><code>d04e348</code></a>
Improve apparent type of mapped types (<a
href="https://redirect.github.com/Microsoft/TypeScript/issues/57122">#57122</a>)</li>
<li><a
href="86a16636ca"><code>86a1663</code></a>
Update package-lock.json</li>
<li><a
href="feb57c269b"><code>feb57c2</code></a>
Instantiate earlier inferred constraints in conditional types (<a
href="https://redirect.github.com/Microsoft/TypeScript/issues/57362">#57362</a>)</li>
<li><a
href="91e67ffbea"><code>91e67ff</code></a>
fix(57392): using is not suggested as a keyword (<a
href="https://redirect.github.com/Microsoft/TypeScript/issues/57394">#57394</a>)</li>
<li><a
href="29c0024bcf"><code>29c0024</code></a>
Avoid creating rest elements with <code>errorType</code> when
<code>any</code> is spread (<a
href="https://redirect.github.com/Microsoft/TypeScript/issues/57116">#57116</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Microsoft/TypeScript/compare/v5.3.3...v5.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=typescript&package-manager=npm_and_yarn&previous-version=5.3.3&new-version=5.4.2)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-03-07 02:46:06 +00:00
dependabot[bot]
93c54c8445 build(deps): Bump flowbite from 2.2.1 to 2.3.0 in /rust/gui-client (#4003)
Bumps [flowbite](https://github.com/themesberg/flowbite) from 2.2.1 to
2.3.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/themesberg/flowbite/releases">flowbite's
releases</a>.</em></p>
<blockquote>
<h2>v2.3.0</h2>
<ul>
<li>added new <a
href="https://flowbite.com/docs/components/clipboard/">copy to
clipboard</a> component and examples</li>
<li>added new JavaScript tab to the documentation examples</li>
<li>update dependency to Tailwind CSS v3.4.1</li>
<li>fixed carousel component behavior when there’s only one image</li>
<li>added new data attribute to set active and inactive classes for
tabs</li>
<li>Ruby on Rails integration fix for turbo load</li>
<li>minor bug fixes and improvements</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7941f8bb79"><code>7941f8b</code></a>
docs(README): add new clipboard component to readme</li>
<li><a
href="e4f9f16aae"><code>e4f9f16</code></a>
fix(clipboard): target element can be input element too</li>
<li><a
href="5cd600a348"><code>5cd600a</code></a>
feat(changelog): add Ruby on Rails fix mention</li>
<li><a
href="fdf9bfe52a"><code>fdf9bfe</code></a>
chore(versioning): bump all version instances to
<code>v2.3.0</code></li>
<li><a
href="bfbf97db7b"><code>bfbf97d</code></a>
chore(package): update keywords and name</li>
<li><a
href="52ed4101a0"><code>52ed410</code></a>
Merge pull request <a
href="https://redirect.github.com/themesberg/flowbite/issues/804">#804</a>
from themesberg/fix-inconsistencies</li>
<li><a
href="06778c3906"><code>06778c3</code></a>
fix(modals): replace old alternative buttons with the new ones to have
consis...</li>
<li><a
href="bcb1dbf990"><code>bcb1dbf</code></a>
refactor(input fields): add maximum width to search and select
inputs</li>
<li><a
href="03667ef73a"><code>03667ef</code></a>
fix(input-forms): fix bg-color &amp; text-color on:dark for &quot;Form
validation&quot; inp...</li>
<li><a
href="3179d1ffa8"><code>3179d1f</code></a>
fix(forms): toggle switch typo</li>
<li>Additional commits viewable in <a
href="https://github.com/themesberg/flowbite/compare/v2.2.1...v2.3.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=flowbite&package-manager=npm_and_yarn&previous-version=2.2.1&new-version=2.3.0)](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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-03-07 02:31:32 +00:00
Thomas Eizinger
46d60da136 chore(snownet): improve logs in Allocation (#3986)
This adds a few logs that I noticed could be helpful after looking at
some logs shared by a customer. Most importantly, we now log everything
in `handle_timeout` in the scope of the relay's IP, meaning we can
differentiate them from each other.
2024-03-06 19:54:05 +00:00
Thomas Eizinger
0ed2480ac0 refactor(connlib): merge control_protocol::gateway into gateway module (#3984)
This separation doesn't really hold anymore as we already have an `impl
Tunnel` and `impl GatewayState` within `gateway.rs`. It is easier to
maintain if more gateway-specific things are in `gateway.rs`. Plus, once
we integrate the portal connection into the tunnel, we can collapse a
lot of these APIs.
2024-03-06 19:37:09 +00:00
Thomas Eizinger
2f74edd581 feat(snownet): always force a handshake when we change the socket (#3985)
Some local testing identified that we might lose the first packet if we
switch the sockets too quickly, i.e. upgrade from a relayed one to a
direct one initially. To mitigate having to wait for the wireguard
timeout here, let's force a handshake every time we switch to a new
socket.
2024-03-06 19:36:24 +00:00
Thomas Eizinger
ae6c32643f refactor(connlib): fail tunnel in case the device gets closed (#3981)
Currently, we have some duplication between client and gateway in how we
handle a closed TUN device (i.e. reading a 0-length packet). Previously,
we would just deactivate the tunnel as we can't do anything when the
device is gone. I don't think that is actually helpful. Instead, we
should fail the tunnel if the device gets closed, similar to any other
IO error on the device.\

This reduces duplication between the two eventloops.
2024-03-06 19:35:29 +00:00
Thomas Eizinger
784a34faa1 chore(connlib): move wire trace logs to Socket (#3983)
This further improves consistency in when we emit these logs.
Previously, the `wire` trace would also log packets that we failed to
send (so never actually hit the wire) and would omit packets that we
handled internally within `snownet`.

To implement this consistently, I ended up merging the two iterators for
IPv4 and IPv6 packets which is a nice addition because it means we
always empty both sockets and don't prioritize IPv4 over IPv6.
2024-03-06 19:35:09 +00:00