Commit Graph

3671 Commits

Author SHA1 Message Date
Reactor Scram
bb4a170ca5 fix: Slow DNS lookups on (at least) Windows by updating to main of Hickory (#3799)
```[tasklist]
- [x] Maybe pick a rev for Hickory so even if Cargo.lock is rebuilt we don't advance unless we want to
- [ ] Maybe ask them politely to cut a release with this patch since it helps us
```

Tested on my Windows laptop and it reduces `nslookup` times for
resources and non-resources (can't remember which way was which) from
something like 10 and 2 seconds to 0.25 and 0.33 seconds, which is
great.

Hickory's patch got merged into main around Jan 5th but they haven't cut
a release since then, so this PR changes us to use Hickory's main branch
instead of crates.io:
https://github.com/hickory-dns/hickory-dns/issues/2081
2024-02-28 19:35:07 +00:00
Gabi
2f72e225f8 fix(connlib): update resource list on resource removal (#3796)
oops
2024-02-28 17:34:39 +00:00
Andrew Dryga
9e11ddb1cd Do not crash on disconnect messages in LV (#3795)
This message is sent by the some of the broadcasters and it was
resulting in a process crash (on a socket that will be disconnected
anyways), but this triggered our logging alerts anyways. So we will
simply ignore them globally to suppres the noise.
2024-02-28 11:42:07 -06:00
Thomas Eizinger
8809c0872e feat(snownet): only keep the best possible candidate pair alive (#3792)
This took me a while to figure out but I think the solution is quite
neat. We are using ICE trickle which means there could be new candidates
at any point in time. Thus, there really is never a good time to say
"ICE is finished" and clean-up all other candidates (that is what
non-trickle ICE would want you to do:
https://datatracker.ietf.org/doc/html/rfc8445#section-8.3). But what we
can do is, upon each nomination, look at our local candidates and
invalidate all that are of the same priority or less.

For example, if we start with a connection via a relay, discard all
other relay candidates but keep the host and server-reflexive ones. If
the ICE agent then figures out a better path, it will give us a new
nomination and we can discard even more candidates.

On the other hand, if hole-punching fails, str0m will eventually give up
on certain candidate pairs because it is not receiving replies and
consider them failed.

Thus, the behaviour that we are getting with this PR is: Try all
possible candidate pairs but settle on the best possible one.

What is kind of neat is that, because we are still in ICE trickle mode,
receiving a new candidate could still upgrade existing relayed
connections to direct ones if the new candidate allows it.

The other side of this coin is that we won't have a fallback any more to
other pairs if the current one fails. In that case, we will consider the
entire connection failed, remove it and create a new one on the next
connection intent.

Resolves: #3789.
2024-02-28 16:37:16 +00:00
Andrew Dryga
1216d108d6 Supress expired ssh key errors from triggering application alerts 2024-02-28 10:32:52 -06:00
Thomas Eizinger
001fc806b5 refactor(connlib): replace intent timer with explicit throttling (#3778)
The reference that is specified as part of the connection intent
fulfills one particular purpose: To avoid accepting connection details
for a "stale" intent, i.e. a previous one that we sent for the same
resource.

With the move to `phoenix-channel` in #3682, we can no longer specify
the reference explicitly. Instead, sending a message to the portal gives
us an `OutboundRequestId`.

To make the transition in #3682 easier, we emulate this behaviour here
temporarily in the `ControlPlane` of the clients.
2024-02-28 01:51:51 +00:00
dependabot[bot]
51254850e1 build(deps): Bump socket2 from 0.5.5 to 0.5.6 in /rust (#3766)
Bumps [socket2](https://github.com/rust-lang/socket2) from 0.5.5 to
0.5.6.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/socket2/blob/master/CHANGELOG.md">socket2's
changelog</a>.</em></p>
<blockquote>
<h1>0.5.6</h1>
<ul>
<li>Add <code>Socket::(set_)multicast_all_v{4,6}</code>
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/485">rust-lang/socket2#485</a>
and
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/486">rust-lang/socket2#486</a>).</li>
<li>Add support for GNU/Hurd
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/474">rust-lang/socket2#474</a>).</li>
<li>Fix compilation on Haiku
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/479">rust-lang/socket2#479</a>
and
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/482">rust-lang/socket2#482</a>).</li>
<li>Fix compilation on OpenHarmony
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/491">rust-lang/socket2#491</a>).</li>
<li>Update to window-sys v0.52
(<a
href="https://redirect.github.com/rust-lang/socket2/pull/480">rust-lang/socket2#480</a>).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="faa59e9745"><code>faa59e9</code></a>
Release v0.5.6</li>
<li><a
href="f5367ea25d"><code>f5367ea</code></a>
Update to FreeBSD 13.2 on Cirrus CI</li>
<li><a
href="d11936fbc9"><code>d11936f</code></a>
Fix compilation with target_env=ohos</li>
<li><a
href="76cbffb8ad"><code>76cbffb</code></a>
Update actions/checkout action to v4 (<a
href="https://redirect.github.com/rust-lang/socket2/issues/488">#488</a>)</li>
<li><a
href="272c6cf2a5"><code>272c6cf</code></a>
Add tests for Socket::(set_)multicast_all_v{4,6}</li>
<li><a
href="d83cf0408e"><code>d83cf04</code></a>
Add Socket::(set_)multicast_all_v{4,6}</li>
<li><a
href="9ab8109bc8"><code>9ab8109</code></a>
Improve support for haiku</li>
<li><a
href="03dc9e84be"><code>03dc9e8</code></a>
Update windows-sys to v0.52</li>
<li><a
href="3beceb29ae"><code>3beceb2</code></a>
Add GNU/Hurd support</li>
<li><a
href="5c8bf8c07b"><code>5c8bf8c</code></a>
Haiku fixes for IP_RECVTOS and IP_TOS</li>
<li>See full diff in <a
href="https://github.com/rust-lang/socket2/compare/v0.5.5...v0.5.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=socket2&package-manager=cargo&previous-version=0.5.5&new-version=0.5.6)](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-02-28 01:17:27 +00:00
Thomas Eizinger
ca0839d072 feat(snownet): reduce connection setup latency (#3772)
Previously, we pretty much always lost the wireguard handshake packet,
causing us to wait for the rekey-timeout before we try again.

We can fix this by first checking that we actually have a socket that we
can send the encapsulated packet on. Additionally, we can directly force
a wireguard handshake as soon as we discover the first socket to the
remote.

This reduces the setup latency to ~3 seconds in my testing.

Resolves: #3779.
2024-02-28 00:15:17 +00:00
dependabot[bot]
beb5c3834d build(deps): Bump anyhow from 1.0.79 to 1.0.80 in /rust (#3765)
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.79 to 1.0.80.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/anyhow/releases">anyhow's
releases</a>.</em></p>
<blockquote>
<h2>1.0.80</h2>
<ul>
<li>Fix unused_imports warnings when compiled by rustc 1.78</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="54437197ee"><code>5443719</code></a>
Release 1.0.80</li>
<li><a
href="dfc7bc07d4"><code>dfc7bc0</code></a>
Work around prelude redundant import warnings</li>
<li><a
href="6e4f86b48b"><code>6e4f86b</code></a>
Import from alloc not std, where possible</li>
<li><a
href="f885a133ed"><code>f885a13</code></a>
Ignore incompatible_msrv clippy false positives in test</li>
<li><a
href="fefbcbcb0b"><code>fefbcbc</code></a>
Ignore incompatible_msrv clippy lint</li>
<li><a
href="78f2d81cc7"><code>78f2d81</code></a>
Update ui test suite to nightly-2024-02-08</li>
<li><a
href="edd88d3a43"><code>edd88d3</code></a>
Update ui test suite to nightly-2024-01-31</li>
<li>See full diff in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.79...1.0.80">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=anyhow&package-manager=cargo&previous-version=1.0.79&new-version=1.0.80)](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-02-27 23:57:18 +00:00
Thomas Eizinger
8d652cb96c chore: add nix scripts (#3771)
Some recent changes to the Rust part of the codebase made it quite
difficult to locally build the project due to tauri's heavy dependencies
on WebKitGTK and other native libraries.

I tried working around this on my local (nix) machine and found it quite
difficult. The cleanest way here is to make use of what Nix calls
"devshells" which give you an environment specifically for hacking on
your project.

Unfortunately, these files need to be tracked in version control and
cannot be ignored (at least I've not found a way to do that). Given that
we already have a lot of clutter in our repository, I put them under
`scripts/nix`.

They are generally useful. I also added a `.envrc` file which
automatically launches the dev-shell. As a result, you have a shell
ready to go with all your dependencies as soon as you `cd` into our
repository (assuming you use `direnv` and it is hooked up with your
shell).

I didn't really want to have any of my local setup leak into the repo
because I think apart from me and @conectado, nobody is using nix, thus
I hope this minimal footprint is an okay compromise.
2024-02-27 23:56:46 +00:00
Jamil
2ed6b3d07f chore(connlib): Tune log filters to enable debug in dev and info for gateway deployments (#3788)
Refs #3618

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-27 23:35:08 +00:00
Thomas Eizinger
e015d51c70 chore(snownet): reduce log levels (#3777)
Both of these happen quite often and aren't really of concern for
day-to-day operation. Binding a new channel is still a state change but
after using the clients for a bit, it seems that it is not an important
enough state change to actually tell the user about (which I assume will
likely log on `INFO`).

Similarly, dropping a packet because we don't have a channel happens
more often now because we've optimised, which addresses we bind channels
to.
2024-02-27 20:42:50 +00:00
Jamil
17692ecf4d fix(portal|website): Fix favicons for dark mode (#3785) 2024-02-27 18:57:37 +00:00
Jamil
6a896af638 chore(repo): Move other dotfiles to reduce directory size of root (#3780)
Brings README content further up for our repo visitors.
2024-02-27 17:23:17 +00:00
Jason Elie Bou Kheir
7c296494bd feat(android): add settings button to the session view (#3755)
Adds a `Settings` button similar to the sign in view:

![Screenshot_20240224_120508](https://github.com/firezone/firezone/assets/5115126/12826481-0013-4d46-9d65-b48d22fa859e)

Then, while signed in, there is a warning dialog when the user attempts
to "save" their settings:

![Screenshot_20240224_120724](https://github.com/firezone/firezone/assets/5115126/c4b8b2b0-2b0d-4175-9e00-c4aafa9a3ef0)
2024-02-27 07:00:57 +00:00
Gabi
77b00b3be9 feat(connlib): support resource updates from the portal (#3754)
This PR doesn't yet provide support for the update of upstream DNS but
it does provide support for all the other resources update messages.

Should comply with the description of issue #2022 but it doesn't respond
to DNS upstream updates which is imply it should on the issue title

---------

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-02-27 03:24:14 +00:00
Thomas Eizinger
67aeb009e9 chore: move markdown files into docs/ directory (#3773)
Apart from the LICENSE, GitHub supports detecting all of these files
also within a `docs/` directory. This includes the README!
2024-02-27 01:12:57 +00:00
Thomas Eizinger
2891481662 refactor(connlib): unify handling of IP packets (#3762)
Instead of converting back and forth between buffers,
`device_channel::Packet` and `IpPacket`, we now use the same `IpPacket`
type everywhere.
2024-02-27 01:08:35 +00:00
Thomas Eizinger
3d7866bdc8 chore: remove markdownlint config files (#3774)
I couldn't find any mention of a `markdownlint` tool anywhere in our
repository via `rg --hidden markdownlint`. It doesn't seem to run in CI.
2024-02-27 00:48:14 +00:00
Reactor Scram
e66d9c4345 fix(gui-client): fix some papercuts (#3769)
Fixes various small issues, including some of the issues in #3768:

- Clicking "About" or "Settings" no longer toggles a window between
visible and hidden, it always shows and un-minimizes the window. So if
it's minimized, it won't vanish, it will appear
- Log message for vt100 failure is clearer
- The "cancel sign-in" race was coincidentally already working as
intended, but the code and comments are clarified.
- Fix the asset name used to check for auto-updates (this cannot be
end-to-end tested until we cut a new release of the clients on Github,
not just a draft release)
- Fix README to include Ubuntu instructions
2024-02-27 00:17:20 +00:00
Jason Elie Bou Kheir
c6ff8858fb feat(android): use Android ShareSheet for sharing logs (#3756)
Fixes #3545 


![sharesheet](https://github.com/firezone/firezone/assets/5115126/dce8cbea-14c4-4feb-8cda-7ed4c0de20b5)
2024-02-26 17:55:29 +00:00
dependabot[bot]
639440520e build(deps): Bump minidumper from 0.8.1 to 0.8.2 in /rust (#3764)
Bumps [minidumper](https://github.com/EmbarkStudios/crash-handling) from
0.8.1 to 0.8.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/EmbarkStudios/crash-handling/releases">minidumper's
releases</a>.</em></p>
<blockquote>
<h2>minidumper-0.8.2</h2>
<h3>Changed</h3>
<ul>
<li><a
href="https://redirect.github.com/EmbarkStudios/crash-handling/pull/83">PR#83</a>
updated <code>scroll</code> to 0.12.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="065f3dd9c1"><code>065f3dd</code></a>
chore: Release</li>
<li><a
href="37e56acd3f"><code>37e56ac</code></a>
Update (<a
href="https://redirect.github.com/EmbarkStudios/crash-handling/issues/83">#83</a>)</li>
<li>See full diff in <a
href="https://github.com/EmbarkStudios/crash-handling/compare/minidumper-0.8.1...minidumper-0.8.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=minidumper&package-manager=cargo&previous-version=0.8.1&new-version=0.8.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-02-26 17:51:42 +00:00
dependabot[bot]
9e7f71f874 build(deps): Bump tauri-utils from 1.5.2 to 1.5.3 in /rust (#3767)
Bumps [tauri-utils](https://github.com/tauri-apps/tauri) from 1.5.2 to
1.5.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/tauri/releases">tauri-utils's
releases</a>.</em></p>
<blockquote>
<h2>tauri-utils v1.5.3</h2>
<p>Updating crates.io index</p>
<!-- raw HTML omitted -->
<pre><code>Fetching advisory database from
`https://github.com/RustSec/advisory-db.git`
Loaded 603 security advisories (from /home/runner/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (581 crate dependencies)
Crate:     atty
Version:   0.2.14
Warning:   unsound
Title:     Potential unaligned read
Date:      2021-07-04
ID:        RUSTSEC-2021-0145
URL:       https://rustsec.org/advisories/RUSTSEC-2021-0145
Dependency tree:
atty 0.2.14
└── clap 3.2.25
    └── tauri 1.6.0
        ├── tauri 1.6.0
        ├── restart 0.1.0
        └── app-updater 0.1.0
<p>warning: 1 allowed warning found
</code></pre></p>
<!-- raw HTML omitted -->
<h2>[1.5.3]</h2>
<h3>New features</h3>
<ul>
<li><a
href="7aa30dec85"><code>7aa30dec</code></a>(<a
href="https://redirect.github.com/tauri-apps/tauri/pull/8620">#8620</a>)
Add <code>priority</code>, <code>section</code> and
<code>changelog</code> options in Debian config.</li>
</ul>
<!-- raw HTML omitted -->
<pre><code>Updating crates.io index
Packaging tauri-utils v1.5.3
(/home/runner/work/tauri/tauri/core/tauri-utils)
Verifying tauri-utils v1.5.3
(/home/runner/work/tauri/tauri/core/tauri-utils)
    Updating crates.io index
 Downloading crates ...
  Downloaded phf_codegen v0.8.0
  Downloaded phf v0.8.0
  Downloaded nodrop v0.1.14
  Downloaded phf_generator v0.11.2
  Downloaded itoa v0.4.8
&lt;/tr&gt;&lt;/table&gt; 
</code></pre>
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a4b82d9dba"><code>a4b82d9</code></a>
chore: bump tauri-utils</li>
<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>Additional commits viewable in <a
href="https://github.com/tauri-apps/tauri/compare/tauri-utils-v1.5.2...tauri-utils-v1.5.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tauri-utils&package-manager=cargo&previous-version=1.5.2&new-version=1.5.3)](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-02-26 17:50:43 +00:00
Jason Elie Bou Kheir
0ec1b93b11 fix(android): delete log zip on finish and on create (#3757)
When deleting the log zip on resume, the file can be deleted before the
email client has a chance to attach it. This causes a race condition
where the attachment will sometimes fail to attach when sharing.
2024-02-26 17:49:46 +00:00
Gabi
5edd195320 refactor(connlib): unify peer storage (#3738)
Now that we have `&mut` access everywhere in the tunnel, the remaining
shared-memory and locks are in how we store peers. To resolve this, we
introduce a new `PeerStore` that allows us to look up peers by IP and by
ID.
2024-02-26 16:07:38 +00:00
Thomas Eizinger
220c9ee1e1 fix(connlib): correctly handle GRO (#3732)
With the use of `quinn-udp`, we are actually already using GRO for
reading packets from the UDP socket. Especially during a test like
iperf, it is thus very likely to read multiple packets from the same
peer in a single syscall. In that case, `stride` tells us how they are
split.

Without handling `stride` correctly, we would be feeding multiple
packets at once to boringtun which would (obviously) choke on it because
its checksum verification fails.

It turns out we can actually handle this quite nicely by returning an
`Iterator<Item = Received>` and decapsulating them one-by-one.
2024-02-26 03:40:09 +00:00
Thomas Eizinger
0ded6ad79d refactor(snownet): be more explicit about dispatching messages (#3741)
As part of handling an incoming packet, `snownet` has to go through
several steps:

1. The packet might be a control message from a STUN server, we handle
that first.
2. The packet might from a TURN server, which could either be a control
message or a channel-data message.
The former should be handled directly where as the latter needs to
unpacked and passed along further.
3. Once potentially unpacked, the packet could be a STUN message for an
ICE agent of one of our connections.
4. Lastly, the packet might be a wireguard payload from one of our
connections.

Previously, we handled all of that in one big function which resulted in
us sometimes "falling through" to the next branch when we didn't want
that. For example, if a message is from a TURN server's address, it MUST
be a control or channel data message but it can never be a wireguard
packet. In certain circumstances, we don't detect that though. For
example, if a channel is not yet bound, we refuse to decapsulate the
message which results in us incorrectly passing on the message to later
stages.

We refactor the handling into individual functions and explicitly signal
to the upper layer using `ControlFlow`, whether we should continue or
abort.

As an added benefit, this allows us to remove the "memory" of timed-out
control messages in `StunBinding` and `Allocation`.
2024-02-23 21:26:11 +00:00
Reactor Scram
5375415959 build: enable Tauri dep for Linux and alphabetize deps (#3742)
Waiting on #3735 
I think this change is what triggers `cargo chef` to get confused
(#3740)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 20:22:45 +00:00
Gabi
03ea93d0bd fix(ci): phoenix channel tests not running (#3749)
Similar to #3747
2024-02-23 20:15:31 +00:00
Reactor Scram
da242e0bef fix(gui-client): remove duplicated script (#3745)
This was moved up to the main `/scripts/tests` dir and combined with
some other automated tests, so this is redundant now. Due to a merge
conflict or some small oversight I accidentally left the original file
in place too.
2024-02-23 20:11:50 +00:00
Gabi
f26f202b4e fix(ci): run relay tests (#3747)
builds on top of #3746 since it is needed to pass
2024-02-23 18:26:11 +00:00
Gabi
4c0c8391d5 fix(relay): update tests for current values (#3746)
In #3726 this value was increased but the test didn't reflect that.

I've not the slightest idea how this is passing on CI. It isn't locally.

Now I have an Idea, relay tests aren't run on CI.
2024-02-23 18:02:47 +00:00
Reactor Scram
fd31152106 refactor(ci): enable Linux do-nothing GUI builds (but not tests) in CI/CD, extract scripts for that (#3735)
Builds a do-nothing `return 0` Linux client to make sure the CI/CD
scripts are set up and producing AppImage / deb bundles as expected.


![image](https://github.com/firezone/firezone/assets/13400041/7d2d8f02-adde-4b1b-89ec-02aaf112ac48)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 17:57:39 +00:00
Reactor Scram
7825710a69 refactor(GUI clients): extract known_dirs module (#3734)
The CI tests aren't running for Linux just yet.
This organizes the well-known directories used on Linux and Windows for
logs, config, etc., and adds them to the (unused) Linux smoke test

Waiting on #3727

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 17:31:35 +00:00
Reactor Scram
90b2bdb9b1 test(windows): make sure files are written to the right paths during smoke tests (#3727)
I will need to set up the same paths for Linux, (#3734) and I want an
automated test to make sure everything gets into the right directories.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 16:14:20 +00:00
Reactor Scram
4ecdde3653 ci: change cargo chef call so it will ignore the GUI client (#3740)
I don't know much about `cargo chef` so I gave this its own PR in case
I'm doing something that'll subtly break it
I've run into this problem on some branches and not others, where it's
trying to build all the Tauri / glib stuff even though the Docker image
won't need it:
https://github.com/firezone/firezone/actions/runs/8012206575/job/21887478015#step:7:1175
2024-02-23 16:08:21 +00:00
Gabi
d16fb616d3 connlib: remove tun mutex (#3743)
extracted from #3738
2024-02-23 15:48:27 +00:00
Jamil
56e9e5e68a feat(ci): Test that relay restarts don't break existing connected entities (#3671)
~~Highlights the issue hypothesized in #3666~~

This tests that restarting a Relay won't cause sustained downtime.

Sleeps have been removed as they shouldn't necessary -- removing them
will better catch race conditions.
2024-02-23 01:06:54 +00:00
Gabi
781810f918 feat(dev): add dev yml for rust development (#3670)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-23 00:25:25 +00:00
Reactor Scram
835cd548ef chore: make rtnetlink versions explicit (#3736)
If I do `rm Cargo.lock && cargo check --all` then I get errors about
rtnetlink.


![image](https://github.com/firezone/firezone/assets/13400041/c1eeff84-d65c-403d-9b33-24e00168ba36)

Dependabot tried to update these a couple weeks ago in #3558 and it had
some conflicts, so I'm just making the old versions explicit so that
redoing the lockfile won't break anything.

This is because I got into a weird state with the new `dirs` dependency
for Linux where I removed it from Cargo.toml, but it was still in the
lockfile or something, so the program built even though it should not
have. And then when I tried to rebuild Cargo.lock I got these errors
about rtnetlink.
2024-02-22 22:32:34 +00:00
Thomas Eizinger
2264eeebc3 chore(snownet): reuse RingBuffer (#3725)
Previously, we eagerly created a channel bind message and then buffered
it if we didn't have an allocation. That resulted in some duplicated
checks once we did end up sending the message.

To avoid this, we remove the dedicated `BufferedChannelBindings` struct
and instead use the newly added `RingBuffer`. Whilst we are at it, we
also increase the number of buffered messages to avoid dropping them too
early.
2024-02-22 21:26:41 +00:00
Reactor Scram
c09ba0889d refactor(ci): extract scripts for GUI client smoke tests (#3724)
(Waiting on #3721)
Ubuntu is headless by default and needs `xvfb` to run Tauri in CI, hence
the difference.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-22 21:15:59 +00:00
Reactor Scram
4106419ef1 refactor: rename windows-client to gui-client (#3721)
This may cause conflicts with all my other PRs but it has to happen.

```[tasklist]
- [ ] Update test names in branch protection (I don't think I have perms for this)
```
2024-02-22 20:21:27 +00:00
Jamil
3bd7dc504e fix(ci): Fix flaky iperf3 "Bad file descriptor" (#3731)
- Lower UDP bandwidth to 50M -- this fixes intermittent file descriptor
issues because we overload iperf3 for more than 5 seconds
- Simplify iperf3 to the minimum set that makes tests reliable
2024-02-22 19:57:22 +00:00
Brian Manifold
088cbbd3c4 Remove assertions in sign-in success acceptance tests (#3733)
Why:

* The extra assertions added to the sign-in success acceptance tests do
not behave as reliably as needed. The assertions being removed were
checking an intermediate step of the sign-in success redirect process,
so the test should not be fundamentally changed by removing them. We'll
just be checking the final state rather than the intermediate state and
the final state. The previous commit removing these assertions was only
done on the email signin tests. This commit updates the userpass and
openid_connect tests
2024-02-22 18:23:23 +00:00
Reactor Scram
6925af88ea test: add mock token storage for CI tests on Ubuntu (#3720)
Setting up gnome-keyring in CI is tricky. I'll fix it later. For now,
this allows other tests to pass in CI on Ubuntu.
2024-02-22 16:04:16 +00:00
Brian Manifold
3ce4c31dea refactor(portal): Remove assertions in sign-in success acceptance tests (#3730)
Why:

* The extra assertions added to the sign-in success acceptance tests do
not behave as reliably as needed. The assertions being removed were
checking an intermediate step of the sign-in success redirect process,
so the test should not be fundamentally changed by removing them. We'll
just be checking the final state rather than the intermediate state and
the final state.
2024-02-22 02:21:00 +00:00
Reactor Scram
bee2dabf4c refactor(ci): extract setup-tauri action and generalize Windows builds (#3702)
This prevents duplication for different Tauri jobs like building the
release packages vs testing a debug build with mock keyring.

```[tasklist]
- [ ] Fix branch protection rules for changed tests
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-02-22 01:59:47 +00:00
Thomas Eizinger
c85348a25f fix(snownet): don't log addresses twice (#3711)
The `from` address is already logged as part of the `decapsulate` span
in the `Node`. The `local` address isn't that interesting thus noise
most of the time.
2024-02-22 01:10:27 +00:00
Thomas Eizinger
b545a36ae7 feat(relay): increase number of allowed requests per nonce (#3726)
In the relay's authentication scheme, each nonce is only valid for a
certain number of requests. This guards against replay attacks.

Currently, this is set to 10 which means all requests after 10 will
receive a "stale nonce" error. 10 turns out to be way to low and greatly
delays the setup of channels and allocations which is always a burst of
messages that end up incurring additional round trips because they all
need to be re-sent with a new nonce.
2024-02-22 01:09:55 +00:00