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).
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.
`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!
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.
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
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
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>
Previousy, tapping on a resource list item in iOS copied the resource
address.
In this PR, tapping on a resource list item in iOS shows a menu with
"Copy Address", tapping on which copies the resource address.
Fixes#3998.
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>
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.
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<Utc></code> type, or from the <code>TimeZone</code>
trait.</p>
<p>Converting from <code>NaiveDateTime</code> to
<code>DateTime<Utc></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<NaiveDate></code>,
<code>Option<NaiveDateTime></code> and
<code>Option<DateTime<Tz>></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 />
[](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>
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 />
[](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>
Bumps
[@types/react](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react)
from 18.2.63 to 18.2.64.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore 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>
Bumps
[@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom)
from 18.2.19 to 18.2.21.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore 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>
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 />
[](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>
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.11.24 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 />
[](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>
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 & text-color on:dark for "Form
validation" 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 />
[](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>
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.
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.
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.
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.
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.
Refs #3230
It looks like we need to sign the internal exe before it gets bundled
too. We can use `beforeBundleCommand` to do so.
Soon, Tauri should have native support for this exact scenario:
https://github.com/tauri-apps/tauri/pull/8718
The span around the `init` function doesn't actually add anything
useful. We always use the `PhoenixChannel` only in a particular
component, e.g. the relay will always log in using the `relay` topic
etc. Thus, when looking at the relay's logs, this `login_topic` will
simply say "relay" which is something we know by looking at the source
code.
Additionally, the "Connected to portal, waiting for `init` message" line
is no longer true. Connecting to the portal has been moved into the
internal state machine, which now causes two similar logs to be printed:
```
gateway-1 | 2024-03-05T04:45:29.671736Z INFO init{user_agent="Alpine Linux/3.19.1 (x86_64;6.6.16;) connlib/1.0.0" login_topic="gateway"}: phoenix_channel: Connected to portal, waiting for `init` message
gateway-1 | 2024-03-05T04:45:29.685338Z INFO init{user_agent="Alpine Linux/3.19.1 (x86_64;6.6.16;) connlib/1.0.0" login_topic="gateway"}: phoenix_channel: Connected to portal host=api
```
Note that the first one is lying because we simply constructed the state
machine but haven't connected to anything yet.
Bumps [base64](https://github.com/marshallpierce/rust-base64) from
0.21.7 to 0.22.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md">base64's
changelog</a>.</em></p>
<blockquote>
<h1>0.22.0</h1>
<ul>
<li><code>DecodeSliceError::OutputSliceTooSmall</code> is now
conservative rather than precise. That is, the error will only occur if
the decoded output <em>cannot</em> fit, meaning that
<code>Engine::decode_slice</code> can now be used with exactly-sized
output slices. As part of this, <code>Engine::internal_decode</code> now
returns <code>DecodeSliceError</code> instead of
<code>DecodeError</code>, but that is not expected to affect any
external callers.</li>
<li><code>DecodeError::InvalidLength</code> now refers specifically to
the <em>number of valid symbols</em> being invalid (i.e. <code>len % 4
== 1</code>), rather than just the number of input bytes. This avoids
confusing scenarios when based on interpretation you could make a case
for either <code>InvalidLength</code> or <code>InvalidByte</code> being
appropriate.</li>
<li>Decoding is somewhat faster (5-10%)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5d70ba7576"><code>5d70ba7</code></a>
Merge pull request <a
href="https://redirect.github.com/marshallpierce/rust-base64/issues/269">#269</a>
from marshallpierce/mp/decode-precisely</li>
<li><a
href="efb6c006c7"><code>efb6c00</code></a>
Release notes</li>
<li><a
href="2b91084a31"><code>2b91084</code></a>
Add some tests to boost coverage</li>
<li><a
href="9e9c7abe65"><code>9e9c7ab</code></a>
Engine::internal_decode now returns DecodeSliceError</li>
<li><a
href="a8a60f43c5"><code>a8a60f4</code></a>
Decode main loop improvements</li>
<li><a
href="a25be0667c"><code>a25be06</code></a>
Simplify leftover output writes</li>
<li><a
href="9979cc33bb"><code>9979cc3</code></a>
Keep morsels as separate bytes</li>
<li><a
href="37670c5ec2"><code>37670c5</code></a>
Bump dev toolchain version (<a
href="https://redirect.github.com/marshallpierce/rust-base64/issues/268">#268</a>)</li>
<li>See full diff in <a
href="https://github.com/marshallpierce/rust-base64/compare/v0.21.7...v0.22.0">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore 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: Thomas Eizinger <thomas@eizinger.io>