Commit Graph

4012 Commits

Author SHA1 Message Date
Andrew Dryga
35d0cd7701 chore(portal): Update Gateways deploy UI (#4352)
Closes #4019

<img width="1728" alt="Screenshot 2024-03-27 at 14 53 30"
src="https://github.com/firezone/firezone/assets/1877644/a2b8850e-49b7-4379-9851-5cb5453018d5">

<img width="1728" alt="Screenshot 2024-03-27 at 14 53 32"
src="https://github.com/firezone/firezone/assets/1877644/5b35c045-6db8-4522-bba8-794d68eae879">
2024-03-28 11:59:09 -06:00
Reactor Scram
6aec8ce287 test(firezone-tunnel): create a tunnel device in unit tests during CI (#4254)
This catches two of the mutants, according to `cargo-mutants`.

~~Unfortunately since `cargo test` runs in one process, it's
all-or-nothing for sudo, this will run all unit tests as sudo.~~
(This explanation is not exactly correct, `cargo test` does run _a_
subprocess, but still, there is no way to request sudo or non-sudo
runners for specific tests, since it's just an environment variable, and
since many tests run in parallel in different threads of the same
process.)

Here it is passing in Linux:
https://github.com/firezone/firezone/actions/runs/8382799272/job/22957555987#step:5:3160

And Windows:
https://github.com/firezone/firezone/actions/runs/8382799272/job/22957558003#step:5:1006

```[tasklist]
### Before merging
- [x] Try `#[ignore]` attribute
- [x] Fail gracefully if `sudo` isn't available
```
2024-03-28 17:03:32 +00:00
Reactor Scram
2293aa76d0 chore(firezone-tunnel): allow cargo-mutants to see Tun impls (#4253)
Refs #3776 

I think `Tun` could use some automated coverage, so here's the baseline
if this PR goes in:

For `cargo mutants -p firezone-tunnel -p firezone-gui-client --file
connlib/tunnel/src/client.rs --file
connlib/tunnel/src/device_channel/tun_windows.rs`, 113 mutants tested,
68 missed

For `tun_linux.rs`, 128 tested, 76 missed

This is only counting the unit tests, not integration tests or anything,
but it's nice if we can cover some I/O stuff like `wintun` in unit tests
locally.
2024-03-28 14:08:11 +00:00
Thomas Eizinger
30f6628ce6 chore(phoenix-channel): reset heartbeat on reconnect (#4361)
Looking through the logs of
https://github.com/firezone/firezone/issues/4348, I noticed that we
would instantly reconnect to the portal due to a "missed heartbeat" if
the connection was reset for any other error. That happens because the
timer within `Heartbeat` was still active and would immediately fire was
soon as we are connected.

To fix this, we introduce a `reset` method that gets called every time
we establish a connection to the portal.
2024-03-28 06:54:12 +00:00
Thomas Eizinger
fb7f7c0b9a chore: apply lints consistently across workspace (#4357)
Motivated by: #4340.

I also activated
[`clippy::unnnecessary_wraps`](https://rust-lang.github.io/rust-clippy/master/#/unnecessary_wraps)
which does create some false-positives for the platform-specific code
but is IMO overall a net-positive. With the amount of Rust code and
crates increasing, it is good to have tools point out simplifications
like these as they are otherwise hard to spot, especially across crate
boundaries.
2024-03-28 06:09:22 +00:00
Gabi
ee34621ee8 chore(connlib): unit tests for additional fields in messages (#4337)
Fixes #4308
2024-03-28 02:14:02 +00:00
Gabi
f879b430e4 feat(connlib): react to config updates (#4322)
* Move the resource changes to `ClientState` to unit test easier
* Add unit tests
* Set new config on update from portal
* Set parameters as told by portal on re-init

Fixes: #2728
2024-03-28 01:28:11 +00:00
Andrew Dryga
fab95483e8 hotfix: reload dns config before sending it 2024-03-27 18:48:41 -06:00
Andrew Dryga
7e73039710 hotfix: slug extraction from not formatted hubspot website url 2024-03-27 18:48:40 -06:00
Reactor Scram
07ab2f1624 chore(phoenix-channel): remove stray dbg (#4340)
This was introduced in #4296 and I'm guessing it shouldn't be there
because we are standardized on `tracing::*` and this goes straight to
stderr, can't be filtered out, etc.
2024-03-27 22:54:03 +00:00
Reactor Scram
26c78cdb07 fix(apple client): sign in crash, closes #4350 (#4353) 2024-03-27 21:29:14 +00:00
Andrew Dryga
6f376eb6a6 chore(portal): Temporarily hide address description (#4351)
Closes #4250
2024-03-27 15:09:41 -06:00
Andrew Dryga
e9ad85e939 chore(portal): Encode client reply pid and socket ref instead of storing it (#4349) 2024-03-27 14:08:42 -06:00
Brian Manifold
ab35a5ea76 fix(portal): Fix bug in actor edit page preventing updates (#4347)
Why:

* A bug was present in the actor edit page that prevented updating an
actor due to managed and synced groups being sent as part of the form
submission. Along with that, if a user manually removed the managed
group(s) from the form submission, the actor being edited would be
removed from the managed group, which should not be allowed.

* There was also another small bug which prevent an admin actor from
being updated at all if they were the only admin in the account.
2024-03-27 13:20:13 -06:00
Andrew Dryga
55935428b3 fix(portal): Allow deleting synced actors after all identities are removed (#4346) 2024-03-27 13:18:03 -06:00
Andrew Dryga
21d2ca358b fix(portal): Fix pagination issues with flows and activities, improve error handling around live tables (#4330)
Fixes issues from logs.
Closes #4274 and similar issues for activities.
Simplifies error handling for live tables (we just reset filters with a
message when they are invalid because just showing an error 422 is not
actionable).
2024-03-27 13:03:19 -06:00
Jamil
62e4a1419f chore(apple): Fix tunnelStore state bug = .invalid (#4343)
Fixes an issue caused by the order of PRs getting merged...


I would prefer keeping the number of PRs lower for Apple until we can
get some tests in to prevent semantic/developer bugs.
2024-03-27 18:26:06 +00:00
Jamil
2e35fe8f3b fix(apple): sync tunnel configuration after saving (#4338)
Fixes #4321 
Fixes #4339
2024-03-27 17:21:09 +00:00
Gabi
f57f834b3c fix(connlib): only update the interface when setting dns if the effective dns changed (#4327)
Supersedes #4320, closes #4318

Updates the interface if effective dns have changed.

Fixes a bug where we could set upstream_dns to have sentinel dns

Adds corresponding unit tests.

---------

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-27 17:07:44 +00:00
Andrew Dryga
5d6e5051b1 Deploy more relays
Closes #4043
2024-03-27 11:11:45 -06:00
Jamil
13c5b18bca chore(gui-client): Remove unused Tauri app icons (#4304)
Not sure if this will fix #3999 but the ~~colors for the existing icon
are wrong, so we need to fix them anyway.~~

Removes unused Tauri app icons.

Refs #3999
2024-03-27 16:50:39 +00:00
Jamil
2ee5508ec2 fix(apple): Use keychain from the tunnel process *only* (#4335)
This fixes another long-standing bug with the Apple client: Keychain
groups.

Apple's Keychain docs are woefully unclear and lacking on the Keychain.

These are the main takeaways:

- Apple wants you to use the "[Data protection
keychain](https://developer.apple.com/documentation/security/ksecusedataprotectionkeychain)"
on macOS which allows it to behave like an iOS keychain. That opens up
the door for possible to sync to iCloud (which we don't use).
- Data protection keychain items, [it
appears](https://forums.developer.apple.com/forums/thread/710758),
cannot be created by Network Extensions.
- However, we _can_ save to the regular keychain (by default the system
keychain for root procs like us), which is file-based.
- Keychain items can be shared (both read/write) between apps, but **not
between users**. The tunnel process and gui process run as different
users. The only way for this to happen is to use the old file-based
Keychain and use [very
deprecated](https://developer.apple.com/documentation/technotes/tn3137-on-mac-keychains)
APIs to allow both "users" access, which is what we were doing before.
- To fix this, we limit all keychain operations to the tunnel proc only.
The GUI passes the auth token in during the `startTunnel` call, which
the system then passes to our `PacketTunnelProvider` class.

This uses the file-based Keychain, but since we need to use that
keychain as the root tunnel proc, we don't have much choice. The "Allow
access" dialog bug on macOS 12 is fixed by the fact that we are only
accessing it from the same user (tunnel proc) that created it now.
2024-03-27 16:14:30 +00:00
Jamil
6d290d8da6 fix(apple): Avoid getting stuck at the "load resources" view (#4336)
This was a race condition that was covered up by the long connecting
time of the old tunnel, and is now more prevalent because we connect
much more quickly.

The issue was that we respond to changes in the tunnel's status and
resource list separately, which can cause an issue where the view moved
to the `connected` state before the resource list is initialized. Since
those vars don't get updated after that, the view gets stuck in that
state.

This PR fixes that by combining those handlers into a single one that
responds to either so we'll end up at a view that's populated and
connected.
2024-03-27 14:53:32 +00:00
Jamil
6e7f2c98cd fix(apple): Debounce sign in button (#4334)
The handler for opening the webview can sometimes take a few seconds, so
this is to prevent users from accidentally double-tapping the sign in
button.
2024-03-27 14:37:30 +00:00
Reactor Scram
28bb826eca feat(linux-client): load token from /etc/dev.firezone.client ... (#4328)
If it's not in CLI / env var

This is more convenient for development, and it's a step towards getting
the systemd service to work.

The token:
- Can't go in `/usr/lib/systemd/system/firezone-client.service` because
that file is updated by `dpkg`
- Probably shouldn't be in the CLI because CLI args can be seen by other
processes
- Could go in env vars, but those can also be snooped in theory

It has to be stored on disk somewhere for headless operation, so we can
just read it directly from disk.
2024-03-27 14:31:47 +00:00
Reactor Scram
9dcccbbc76 chore(windows-client): change "About" to "About Firezone" to match macOS Client (#4326)
Closes #4325 

Also extracted string constants for some of the system tray menu stuff.
2024-03-27 14:29:45 +00:00
Jamil
ab598eff91 feat(apple): Handle network changes reliably on macOS and iOS (#4133)
Tried to organize this PR into commits so that it's a bit easier to
review.

1. Involves simplifying the logic in Adapter.swift so that us mortals
can maintain it confidently:
- The `.stoppingTunnel`, `.stoppedTunnelTemporarily`, and
`.stoppingTunnelTemporarily` states have been removed.
- I also removed the `self.` prefix from local vars when it's not
necessary to use it, to be more consistent.
- `onTunnelReady` and `getSystemDefaultResolvers` has been removed, and
`onUpdateRoutes` wired up, along with cleanup necessary to support that.
2. Involves adding the `reconnect` and `set_dns` stubs in the FFI and
fixing the log filter so that we can log them (see #4182 )
3. Involves getting the path update handler working well on macOS using
`SystemConfiguration` to read DNS servers.
4. Involves getting the path update handler working well on iOS by
employing careful trickery to prevent path update cycles by detecting if
`path.gateways` has changed, and avoid setting new DNS if it hasn't.

Refs #4028 
Fixes #4297
Fixes #3565 
Fixes #3429 
Fixes #4175 
Fixes #4176 
Fixes #4309

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-27 03:00:22 +00:00
Gabi
24e0641871 chore: set rust log level to info for gateways and client (#4319)
- [x] Updated log level string for client and gateways to info or higher
- [x] Update logs to hide DNS information

I also removed `hickory_resolve` errors which could contain sensitive
info from our general error and hide the logs that specifically relates
to them.

@bmanifold double checking that the log levels in the gateway's `*.tf`
files are just used for our own gateways.

Also, the relays still have `debug`, since only we see that I think that
makes sense but double checking with @jamilbk

Fixes: #3618.

---------

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-27 01:39:12 +00:00
dependabot[bot]
1cb4f64430 build(deps): Bump axum from 0.7.4 to 0.7.5 in /rust (#4298)
Bumps [axum](https://github.com/tokio-rs/axum) from 0.7.4 to 0.7.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/axum/releases">axum's
releases</a>.</em></p>
<blockquote>
<h2>axum-extra - v0.7.5</h2>
<ul>
<li><strong>fixed:</strong> Remove explicit auto deref from
<code>PrivateCookieJar</code> example (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2028">#2028</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/2028">#2028</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2028">tokio-rs/axum#2028</a></p>
<h2>axum - v0.7.5</h2>
<ul>
<li><strong>fixed:</strong> Fixed layers being cloned when calling
<code>axum::serve</code> directly with
a <code>Router</code> or <code>MethodRouter</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2586">#2586</a>)</li>
<li><strong>fixed:</strong> <code>h2</code> is no longer pulled as a
dependency unless the <code>http2</code> feature
is enabled (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2605">#2605</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/2586">#2586</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2586">tokio-rs/axum#2586</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2605">#2605</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2605">tokio-rs/axum#2605</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ef8a9e812c"><code>ef8a9e8</code></a>
Release axum and axum-extra (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2676">#2676</a>)</li>
<li><a
href="c6fd852844"><code>c6fd852</code></a>
Update <code>sync_wrapper</code> to 1.0.0 from 0.1.1</li>
<li><a
href="2ec68d6c4d"><code>2ec68d6</code></a>
Add rejection tracing to all extractors (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2584">#2584</a>)</li>
<li><a
href="2ce382f0ab"><code>2ce382f</code></a>
Remove h2 from dependencies when http2 feature is off (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2605">#2605</a>)</li>
<li><a
href="8b13d4cf3c"><code>8b13d4c</code></a>
Add axum-typed-routing to ECOSYSTEM.md (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2608">#2608</a>)</li>
<li><a
href="19f6f7900f"><code>19f6f79</code></a>
Fix layers being cloned for each request (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2586">#2586</a>)</li>
<li><a
href="3569950a2e"><code>3569950</code></a>
Make nightly_error_messages feature compatible with latest nightly</li>
<li><a
href="b6b203b306"><code>b6b203b</code></a>
fix typo in prometheus_metrics_example (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2627">#2627</a>)</li>
<li><a
href="b03f6c1184"><code>b03f6c1</code></a>
Fix typo in CONTRIBUTING.md (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2612">#2612</a>)</li>
<li><a
href="4d65ba0215"><code>4d65ba0</code></a>
ci: Unbreak cargo-deny action (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2613">#2613</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/axum/compare/axum-v0.7.4...axum-v0.7.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axum&package-manager=cargo&previous-version=0.7.4&new-version=0.7.5)](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-26 22:22:50 +00:00
Reactor Scram
84938379ac chore(gui-client): update process split doc (#4269)
On ice until after GA

```[tasklist]
# Before merging
- [x] Re-frame it as upgrading the Linux CLI to add IPC / systemd autostart support instead of replacing the CLI (thanks Thomas)
```
2024-03-26 21:48:31 +00:00
Gabi
a7cf3669b1 chore(android): remove onTunnelReady callback (#4315)
Fixes #4223
2024-03-26 17:32:11 +00:00
dependabot[bot]
0ceb6b59a5 build(deps): Bump async-trait from 0.1.78 to 0.1.79 in /rust (#4301)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.78
to 0.1.79.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/async-trait/releases">async-trait's
releases</a>.</em></p>
<blockquote>
<h2>0.1.79</h2>
<ul>
<li>Clean up some dead code</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1eb21ed8bd"><code>1eb21ed</code></a>
Release 0.1.79</li>
<li><a
href="82cb95c484"><code>82cb95c</code></a>
Resolve unused field of ReplaceSelf syntax tree visitor</li>
<li><a
href="cd8286bfac"><code>cd8286b</code></a>
Update ui test suite to nightly-2024-03-22</li>
<li>See full diff in <a
href="https://github.com/dtolnay/async-trait/compare/0.1.78...0.1.79">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=async-trait&package-manager=cargo&previous-version=0.1.78&new-version=0.1.79)](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-26 17:03:35 +00:00
dependabot[bot]
74187ba977 build(deps): Bump reqwest from 0.11.27 to 0.12.1 in /rust (#4299)
Bumps [reqwest](https://github.com/seanmonstar/reqwest) from 0.11.27 to
0.12.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/seanmonstar/reqwest/releases">reqwest's
releases</a>.</em></p>
<blockquote>
<h2>v0.12.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix <code>ClientBuilder::interface()</code> when no TLS is
enabled.</li>
<li>Fix <code>TlsInfo::peer_certificate()</code> being truncated with
rustls.</li>
<li>Fix panic if <code>http2</code> feature disabled but TLS negotiated
h2 in ALPN.</li>
<li>Fix <code>Display</code> for <code>Error</code> to not include its
source error.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/atouchet"><code>@​atouchet</code></a>
made their first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2193">seanmonstar/reqwest#2193</a></li>
<li><a href="https://github.com/mbme"><code>@​mbme</code></a> made their
first contribution in <a
href="https://redirect.github.com/seanmonstar/reqwest/pull/2195">seanmonstar/reqwest#2195</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/seanmonstar/reqwest/compare/v0.12.0...v0.12.1">https://github.com/seanmonstar/reqwest/compare/v0.12.0...v0.12.1</a></p>
<h2>v0.12.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Upgrade to <code>hyper</code>, <code>http</code>, and
<code>http-body</code> v1.</li>
<li>Add better support for converting to and from
<code>http::Request</code> and <code>http::Response</code>.</li>
<li>Add <code>http2</code> optional cargo feature, default on.</li>
<li>Add <code>charset</code> optional cargo feature, default on.</li>
<li>Add <code>macos-system-configuration</code> cargo feature, default
on.</li>
<li>Change all optional dependencies to no longer be exposed as implicit
features.</li>
<li>Add <code>ClientBuilder::interface(str)</code> to specify the local
interface to bind to.</li>
<li>Experimental: disables the <code>http3</code> feature
temporarily.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/seanmonstar/reqwest/compare/v0.11.27...v0.12.0">https://github.com/seanmonstar/reqwest/compare/v0.11.27...v0.12.0</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.12.1</h2>
<ul>
<li>Fix <code>ClientBuilder::interface()</code> when no TLS is
enabled.</li>
<li>Fix <code>TlsInfo::peer_certificate()</code> being truncated with
rustls.</li>
<li>Fix panic if <code>http2</code> feature disabled but TLS negotiated
h2 in ALPN.</li>
<li>Fix <code>Display</code> for <code>Error</code> to not include its
source error.</li>
</ul>
<h1>v0.12.0</h1>
<ul>
<li>Upgrade to <code>hyper</code>, <code>http</code>, and
<code>http-body</code> v1.</li>
<li>Add better support for converting to and from
<code>http::Request</code> and <code>http::Response</code>.</li>
<li>Add <code>http2</code> optional cargo feature, default on.</li>
<li>Add <code>charset</code> optional cargo feature, default on.</li>
<li>Add <code>macos-system-configuration</code> cargo feature, default
on.</li>
<li>Change all optional dependencies to no longer be exposed as implicit
features.</li>
<li>Add <code>ClientBuilder::interface(str)</code> to specify the local
interface to bind to.</li>
<li>Experimental: disables the <code>http3</code> feature
temporarily.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e0ea15bd65"><code>e0ea15b</code></a>
v0.12.1</li>
<li><a
href="3d78fcbbb5"><code>3d78fcb</code></a>
fix: Display for Error shouldn't include source (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2199">#2199</a>)</li>
<li><a
href="c53572410d"><code>c535724</code></a>
Fix binding interface when no TLS is used (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2200">#2200</a>)</li>
<li><a
href="d5adcba6a2"><code>d5adcba</code></a>
fix: rustls extraction of <code>TlsInfo::peer_certificate()</code> being
truncated (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2195">#2195</a>)</li>
<li><a
href="7a5df21260"><code>7a5df21</code></a>
fix: could panic if http2 disabled but TLS negotiated h2 (<a
href="https://redirect.github.com/seanmonstar/reqwest/issues/2194">#2194</a>)</li>
<li><a
href="d5051f9bee"><code>d5051f9</code></a>
Update version number in Readme</li>
<li><a
href="92aa28caab"><code>92aa28c</code></a>
v0.12.0</li>
<li><a
href="6c6170b1a7"><code>6c6170b</code></a>
feat: Make encoding_rs an optional dependency called
<code>charset</code></li>
<li><a
href="d1022b3b9f"><code>d1022b3</code></a>
Support conversion to http::Response</li>
<li><a
href="a29c7f9011"><code>a29c7f9</code></a>
Add macos-system-configuration feature flag</li>
<li>Additional commits viewable in <a
href="https://github.com/seanmonstar/reqwest/compare/v0.11.27...v0.12.1">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.27&new-version=0.12.1)](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-26 17:03:23 +00:00
Thomas Eizinger
18033eafec ci: ensure roaming between networks doesn't abort file download (#4213)
This adds an integration test that downloads a 10MB file from a server
and simulates the client roaming to another network while the download
is active.

We use a DNS resource for this to ensure it also doesn't take too long
in that case. DNS resources are what most users will be using and we
clear some internal DNS caches on connection failures. Hence, using a
DNS resource here is a somewhat roundabout way to test that we aren't
failing and re-establishing the connection but migrate it to a new
network path.
2024-03-26 05:44:59 +00:00
Thomas Eizinger
ecce0244dc feat(phoenix-channel): fail on missing heartbeat after 5s (#4296)
This PR fixes a bug and adds a missing feature to `phoenix-channel`.

1. Previously, we used to erroneously reset the heartbeat state on all
sorts of empty replies, not just the specific one from the heartbeat.
2. We only failed on missing heartbeats when it was time to send the
next one.

With this PR, we correct the first bug and add a dedicated timeout of 5s
for the heartbeat reply.
2024-03-25 23:11:02 +00:00
Gabi
b113a7c519 chore: set same eol for all platforms (#4316)
Kotlin's `spottlessApply` uses the EOL in this file, so it messes up all
line endings if running it from windows without this change.

I don't see a down-side on standardizing this to something fixed for all
platforms and since we're already using LF everywhere I think keeping it
seems like the best.
2024-03-25 23:05:23 +00:00
Jamil
228389882e refactor(connlib): delay initialization of Sockets until we have a tokio runtime (#4286)
Our sockets need to be initialized within a tokio runtime context. To
achieve this, we don't actually initialize anything on `Sockets::new`.
Instead, we call `rebind` within the constructor of `Tunnel` which
already runs in a tokio context.

Fixes: #4282

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-03-25 22:51:35 +00:00
dependabot[bot]
cfc1fb0488 build(deps): Bump tauri-winrt-notification from 0.1.3 to 0.2.0 in /rust (#4300)
```[tasklist]
### Before merging
- [x] Manual test of MSI from CI
```

Bumps
[tauri-winrt-notification](https://github.com/tauri-apps/winrt-notification)
from 0.1.3 to 0.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/winrt-notification/releases">tauri-winrt-notification's
releases</a>.</em></p>
<blockquote>
<h2>tauri-winrt-notification v0.2.0</h2>
<p>Updating crates.io index</p>
<!-- raw HTML omitted -->
<pre><code>Fetching advisory database from
`https://github.com/RustSec/advisory-db.git`
Loaded 613 security advisories (from /home/runner/.cargo/advisory-db)
    Updating crates.io index
    Scanning Cargo.lock for vulnerabilities (15 crate dependencies)
</code></pre>
<!-- raw HTML omitted -->
<h2>[0.2.0]</h2>
<ul>
<li><a
href="1427bbfadc"><code>1427bbf</code></a>(<a
href="https://redirect.github.com/tauri-apps/winrt-notification/pull/18">#18</a>)
Update MSRV to <code>1.62</code></li>
<li><a
href="1427bbfadc"><code>1427bbf</code></a>(<a
href="https://redirect.github.com/tauri-apps/winrt-notification/pull/18">#18</a>)
Update <code>windows</code> crate to <code>0.54</code></li>
</ul>
<!-- raw HTML omitted -->
<pre><code>`\`\`
Updating crates.io index
Packaging tauri-winrt-notification v0.2.0
(/home/runner/work/winrt-notification/winrt-notification)
    Updating crates.io index
    Packaged 29 files, 82.9KiB (40.8KiB compressed)
Uploading tauri-winrt-notification v0.2.0
(/home/runner/work/winrt-notification/winrt-notification)
    Uploaded tauri-winrt-notification v0.2.0 to registry `crates-io`
note: Waiting for `tauri-winrt-notification v0.2.0` to be available at
registry `crates-io`.
You may press ctrl-c to skip waiting; the crate should be available
shortly.
   Published tauri-winrt-notification v0.2.0 at registry `crates-io`
</code></pre>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tauri-apps/winrt-notification/blob/dev/CHANGELOG.md">tauri-winrt-notification's
changelog</a>.</em></p>
<blockquote>
<h2>[0.2.0]</h2>
<ul>
<li><a
href="1427bbfadc"><code>1427bbf</code></a>(<a
href="https://redirect.github.com/tauri-apps/winrt-notification/pull/18">#18</a>)
Update MSRV to <code>1.62</code></li>
<li><a
href="1427bbfadc"><code>1427bbf</code></a>(<a
href="https://redirect.github.com/tauri-apps/winrt-notification/pull/18">#18</a>)
Update <code>windows</code> crate to <code>0.54</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="e43754023c"><code>e437540</code></a>
Publish New Versions (<a
href="https://redirect.github.com/tauri-apps/winrt-notification/issues/19">#19</a>)</li>
<li><a
href="1427bbfadc"><code>1427bbf</code></a>
chore(deps): update <code>windows</code> crate to 0.54 (<a
href="https://redirect.github.com/tauri-apps/winrt-notification/issues/18">#18</a>)</li>
<li>See full diff in <a
href="https://github.com/tauri-apps/winrt-notification/compare/tauri-winrt-notification-v0.1.3...tauri-winrt-notification-v0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tauri-winrt-notification&package-manager=cargo&previous-version=0.1.3&new-version=0.2.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>
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: ReactorScram <ReactorScram@users.noreply.github.com>
2024-03-25 21:51:56 +00:00
Reactor Scram
70c0dc1c97 feat(windows): listen for DNS change events (#4198)
```[tasklist]
- [x] Ensure whatever method we use to read the DNS servers actually works here, and doesn't have a strange memory ordering problem. If it does, read them from the registry by hand.
- [x] Graceful exit
- [x] Error handling
- [x] Clean it up and integrate it with the Tauri client
- [x] Replace `Notify` with channel of size one
- [x] Remove `Arc`
- [x] Replace `close` with panics
- [x] Remove `Pin`
- [x] Unit-test what happens if we register with RegNotify, close the handle, then modify our key
- [x] Merge with main and call `set_dns`
```
2024-03-25 21:18:57 +00:00
Reactor Scram
9c039a449d chore(gui-client): fix doc comment (#4313)
The Tauri client is for both Windows and Linux, though it's not released
on Linux yet.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-03-25 21:10:49 +00:00
Thomas Eizinger
8f37abb292 chore(connlib): improve wire logs for packets read from and written to device (#4292) 2024-03-25 20:03:28 +00:00
Thomas Eizinger
3f1412cbb8 chore(phoenix-channel): delete stale code (#4295) 2024-03-25 20:00:33 +00:00
Thomas Eizinger
7e68dff5b5 fix(phoenix-channel): re-queue message upon send failure (#4294)
Previously, we would lose one message to the portal upon failing to send
it. We now mitigate this in two ways:

1. We also check the error from `poll_ready` and don't even pop a
message off from our buffer.
2. If sending still fails, we re-queue it to the front of the buffer.

In certain scenarios as discovered in logs from #4058, this might have
caused a loss of the "answer" message from a gateway to the client,
resulting in a state mismatch where the gateway thinks the connection is
established and the client times out on waiting for the answer.
2024-03-25 20:00:18 +00:00
Jamil
cd5cde6ce1 chore(repo): Fix whitespace in MAINTAINERS (#4311) 2024-03-25 13:01:50 -07:00
Andrew Dryga
4844422a31 Fix online status on clients page (#4307)
Closes #4271
2024-03-25 14:00:42 -06:00
Jamil
d4ba178515 Update MAINTAINERS.md
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-03-25 10:35:53 -07:00
Andrew Dryga
1cb6ab6dc4 chore(Portal): Remove simple forms, change navbar links, fix form styles (#4239)
Closes #4237
Closes #2015

There are new links in the navbar and the floating status badge is
replaced with a link in the burger menu too:


https://github.com/firezone/firezone/assets/1877644/2d72f6d7-a14a-4e56-808d-2e703eca158a
2024-03-25 10:24:24 -06:00
Jamil
486ba52eaf chore(relay): Remove redundant logfilters (#4285)
Addressing feedback from #4280
2024-03-24 13:24:51 +00:00
Jamil
8a09a6f1c8 chore(connlib): Update quinn to pull in iOS fix (#4284)
Reverts https://github.com/firezone/firezone/pull/4279
2024-03-23 18:32:00 -07:00
Gabi
74fc939a3e fix(connlib): use quinn fork for quinn to work on ios (#4279)
Fixes #4276 
WIP
2024-03-23 17:48:24 +00:00