Commit Graph

168 Commits

Author SHA1 Message Date
Reactor Scram
9b93fc2a2c fix(rust/client/windows): set our DNS resolvers on our interface (#6931)
Closes #6777
2024-10-07 15:03:22 +00:00
Reactor Scram
1b59205635 chore(rust/headless-client): deactivate DNS control sooner (#6932)
This matches roughly when the IPC service deactivates DNS control.

I did this because while debugging #6777 I've accidentally trashed my
DNS and then Windows says it has no Internet and so the headless Client
can't connect to the portal until I run the IPC service to deactivate
DNS control.
2024-10-04 14:04:54 +00:00
Thomas Eizinger
be250f1e00 refactor(connlib): repurpose connlib-shared as connlib-model (#6919)
The `connlib-shared` crate has become a bit of a dependency magnet
without a clear purpose. It hosts utilities like `get_user_agent`,
messages for the client and gateway to communicate with the portal and
domain types like `ResourceId`.

To create a better dependency structure in our workspace, we repurpose
`connlib-shared` as a `connlib-model` crate. Its purpose is to host
domain-specific model types that multiple crates may want to use. For
that purpose, we rename the `callbacks::ResourceDescription` type to
`ResourceView`, designating that this is a _view_ onto a resource as
seen by `connlib`. The message types which currently double up as
connlib-internal model thus become an implementation detail of
`firezone-tunnel` and shouldn't be used for anything else.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-10-03 14:47:58 +00:00
Jamil
613127d298 ci: Bump all clients and gateway (#6923)
Main fix: idle connection timing. These have already been released.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-10-03 07:12:52 -07:00
Jamil
a95a2a2760 fix(connlib): also read device_uuid for PC systems (#6921)
Addresses the comment here:
https://github.com/firezone/firezone/pull/6857#issuecomment-2390457560
2024-10-03 04:37:33 +00:00
Gabi
3501d5b287 feat(clients): use hardware id for device verification (#6857)
We want to associate additional device information for the device
verification, these are all parameters that tries to uniquely identify
the hardware.

For that reason we read system information and send it as part of the
query params to the portal, that way the portal can store this when
device is verified and match against that later on.

These are the parameters according to each platform:

|Platform|Query Field|Field Meaning|
|-----|----|-----|
|MacOS|`device_serial`|Hardware's Serial|
|MacOS| `device_uuid`|Hardware's UUID|
|iOS|`identifier_for_vendor`| Identifier for vendor, resets only on
uninstall/install|
|Android|`firebase_installation_id`| Firebase installation ID, resets
only on uninstall/install|
|Windows|`device_serial`|Motherboard's Serial|
|Linux|`device_serial`|Motherboard's Serial|


Fixes #6837
2024-10-02 08:44:26 +00:00
Reactor Scram
05acdd5a03 fix(gui-client): defer GUI exit until tunnel closes (#6874)
Closes #6873

The issue seems to be a race between flushing Sentry in the GUI process
and shutting down Firezone in the tunnel daemon (IPC service).

With this change, the GUI waits to hear `DisconnectedGracefully` from
the tunnel daemon before flushing Sentry, and the issue is prevented.

Adding the new state and new IPC message required small changes in
several places

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-01 16:01:43 +00:00
Reactor Scram
d2a8155ba7 fix(rust/client): set sentry release version and environment correctly (#6855)
Closes #6854 


- Sets release version from the GUI Client / Headless Client version
instead of the `firezone-telemetry` version
- Set environment to "production" and "staging" for well-known API URLs,
and "self-hosted" for others, since environments in Sentry can't have
slashes in them
- Sets API URL as a tag
- Sets release to `unit test` for unit testing `firezone-telemetry`
itself, since it has no good version number

<img width="398" alt="image"
src="https://github.com/user-attachments/assets/86f71193-2511-45c1-8304-413db8e5ef90">
2024-09-30 16:24:39 +00:00
Reactor Scram
05a2b28d9f feat(rust/gui-client): add sentry.io error reporting (#6782)
Refs #6138 

Sentry is always enabled for now. In the near future we'll make it
opt-out per device and opt-in per org (see #6138 for details)

- Replaces the `crash_handling` module
- Catches panics in GUI process, tunnel daemon, and Headless Client
- Added a couple "breadcrumbs" to play with that feature
- User ID is not set yet
- Environment is set to the API URL, e.g. `wss://api.firezone.dev`
- Reports panics from the connlib async task
- Release should be automatically pulled from the Cargo version which we
automatically set in the version Makefile

Example screenshot of sentry.io with a caught panic:

<img width="861" alt="image"
src="https://github.com/user-attachments/assets/c5188d86-10d0-4d94-b503-3fba51a21a90">
2024-09-27 16:34:54 +00:00
Reactor Scram
6e90a7f007 refactor(headless-client): re-arrange main (#6835)
Extracted from #6782 

This moves more of `main` inside the async block, which makes it easier
to set up telemetry in the future.

We also log errors for the DNS notifier, which was overlooked before.
2024-09-27 14:10:48 +00:00
Reactor Scram
d6128db353 chore(rust/gui-client): fix missing favicon and make GUI logs quieter (#6823)
Closes #6821

Before

<img width="570" alt="image"
src="https://github.com/user-attachments/assets/1a86b828-3416-43e9-a70c-dc50d112b2d9">

After

<img width="566" alt="image"
src="https://github.com/user-attachments/assets/9fc6fd66-70aa-4305-8a67-d77517d040ae">
2024-09-26 14:09:15 +00:00
Jamil
c5561163e1 ci: Bump GUI and Headless for DNS ambiguity fix (#6829)
Bump gui/headless clients for #6809
2024-09-26 03:13:55 +00:00
Thomas Eizinger
29bc276bf2 refactor(connlib): parallelise TUN operations (#6673)
Currently, `connlib` is entirely single-threaded. This allows us to
reuse a single buffer for processing IP packets and makes reasoning of
the packet processing code very simple. Being single-threaded also means
we can only make use of a single CPU core and all operations have to be
sequential.

Analyzing `connlib` using `perf` shows that we spend 26% of our CPU time
writing packets to the TUN interface [0]. Because we are
single-threaded, `connlib` cannot do anything else during this time. If
we could offload the writing of these packets to a different thread,
`connlib` could already process the next packet while the current one is
writing.

Packets that we send to the TUN interface arrived as an encrypted WG
packet over UDP and get decrypted into a - currently - shared buffer.
Moving the writing to a different thread implies that we have to have
more of these buffer that the next packet(s) can be decrypted into.

To avoid IP fragmentation, we set the maximum IP MTU to 1280 bytes on
the TUN interface. That actually isn't very big and easily fits into a
stackframe. The default stack size for threads is 2MB [1].

Instead of creating more buffers and cycling through them, we can also
simply stack-allocate our IP packets. This incurs some overhead from
copying packets but it is only ~3.5% [2] (This was measured without a
separate thread). With stack-allocated packets, almost all
lifetime-annotations go away which in itself is already a welcome
ergonomics boost. Stack-allocated packets also means we can simply spawn
a new thread for the packet processing. This thread is connected with
two channel to connlib's main thread. The capacity of 1000 packets will
at most consume an additional 3.5 MB of memory which is fine even on our
most-constrained devices such as iOS.

[0]: https://share.firefox.dev/3z78CzD
[1]: https://doc.rust-lang.org/std/thread/#stack-size
[2]: https://share.firefox.dev/3Bf4zla

Resolves: #6653.
Resolves: #5541.
2024-09-26 03:03:35 +00:00
Jamil
332a9fe352 ci: bump all clients to include fix for #6781 (#6820)
bump all clients to include #6781 fix

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-09-25 19:27:50 +00:00
Reactor Scram
86910f477d fix(rust/gui-client/auth): destroy the connlib session on disconnect (#6795)
Closes #6791

We weren't closing the connlib session immediately when we get
`on_disconnect`, this patch fixes that.

This passes the manual test established in #6792. I also cycled through
sign-in, close, open, sign-out, and it looks fine.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-09-24 14:13:01 +00:00
Reactor Scram
be058fdd96 test(rust/gui-client/auth): manual test for auto-sign-in with invalid token (#6792)
Synthetic replication for #6791.

The diff for the fix will probably be short, so I wanted this diff for
the test to be reviewed separately.

In your normal terminal: `cargo build -p firezone-gui-client -p
gui-smoke-test`

With sudo / admin powers: `./target/debug/gui-smoke-test.exe
--manual-tests`

Some customers _must_ have hit this, it's so easy to trigger.

I can't add it to the CI smoke test because there's no portal in CI
during the smoke test, unless we use Staging.
2024-09-23 14:06:26 +00:00
Reactor Scram
c53d1abab3 fix(client/linux): bump atomicwrites to fix behavior on ZFS (#6780)
Closes #6704
2024-09-20 14:14:14 +00:00
dependabot[bot]
2d7fc8d4b9 build(deps): Bump tokio-stream from 0.1.15 to 0.1.16 in /rust (#6697)
Bumps [tokio-stream](https://github.com/tokio-rs/tokio) from 0.1.15 to
0.1.16.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4ed0fa21e4"><code>4ed0fa2</code></a>
chore: prepare tokio-stream v0.1.16 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6825">#6825</a>)</li>
<li><a
href="12b2567b95"><code>12b2567</code></a>
chore: use <code>poll_fn</code> from std (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6810">#6810</a>)</li>
<li><a
href="35f244ad09"><code>35f244a</code></a>
chore: prepare tokio-util v0.7.12 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6823">#6823</a>)</li>
<li><a
href="1166ecc2ac"><code>1166ecc</code></a>
config: enable full for tokio-util in the playground (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6818">#6818</a>)</li>
<li><a
href="27539ae3bd"><code>27539ae</code></a>
runtime: fix race in yield_defers_until_park test (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6809">#6809</a>)</li>
<li><a
href="ea6d652a10"><code>ea6d652</code></a>
chore: prepare Tokio v1.40.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6806">#6806</a>)</li>
<li><a
href="11f66f43a0"><code>11f66f4</code></a>
chore: replace <code>ready!</code> with <code>std::task::ready!</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6804">#6804</a>)</li>
<li><a
href="479a56a010"><code>479a56a</code></a>
time: eliminate timer wheel allocations (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6779">#6779</a>)</li>
<li><a
href="b37f0de28a"><code>b37f0de</code></a>
runtime: implement initial set of task hooks (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6742">#6742</a>)</li>
<li><a
href="c9fad08466"><code>c9fad08</code></a>
codec: fix typo in the docs for <code>Encoder::Error</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6800">#6800</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-stream-0.1.15...tokio-stream-0.1.16">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-stream&package-manager=cargo&previous-version=0.1.15&new-version=0.1.16)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-09-17 19:10:31 +00:00
Thomas Eizinger
a9f515a453 chore(rust): use #[expect] instead of #[allow] (#6692)
The `expect` attribute is similar to `allow` in that it will silence a
particular lint. In addition to `allow` however, `expect` will fail as
soon as the lint is no longer emitted. This ensures we don't end up with
stale `allow` attributes in our codebase. Additionally, it provides a
way of adding a `reason` to document, why the lint is being suppressed.
2024-09-16 13:51:12 +00:00
dependabot[bot]
94cef31d52 build(deps): Bump known-folders from 1.1.0 to 1.2.0 in /rust (#6641)
Bumps [known-folders](https://github.com/artichoke/known-folders-rs)
from 1.1.0 to 1.2.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/artichoke/known-folders-rs/releases">known-folders's
releases</a>.</em></p>
<blockquote>
<h2>v1.2.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update Ruby and bundler version by <a
href="https://github.com/lopopolo"><code>@​lopopolo</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/32">artichoke/known-folders-rs#32</a></li>
<li>Bump the gha-deps group with 1 update by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/34">artichoke/known-folders-rs#34</a></li>
<li>Bump the bundler-deps group with 1 update by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/33">artichoke/known-folders-rs#33</a></li>
<li>Bump the bundler-deps group with 1 update by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/35">artichoke/known-folders-rs#35</a></li>
<li>Bump the gha-deps group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/36">artichoke/known-folders-rs#36</a></li>
<li>Bump the gha-deps group with 3 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/38">artichoke/known-folders-rs#38</a></li>
<li>Bump the bundler-deps group with 1 update by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/37">artichoke/known-folders-rs#37</a></li>
<li>Bump the bundler-deps group with 1 update by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/40">artichoke/known-folders-rs#40</a></li>
<li>Bump the gha-deps group with 4 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/39">artichoke/known-folders-rs#39</a></li>
<li>Bump the bundler-deps group with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/42">artichoke/known-folders-rs#42</a></li>
<li>Bump the gha-deps group with 5 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/41">artichoke/known-folders-rs#41</a></li>
<li>Bump rexml from 3.2.6 to 3.2.8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/43">artichoke/known-folders-rs#43</a></li>
<li>Bump rubocop from 1.63.4 to 1.64.1 in the bundler-deps group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/45">artichoke/known-folders-rs#45</a></li>
<li>Bump the gha-deps group across 1 directory with 2 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/47">artichoke/known-folders-rs#47</a></li>
<li>Upgrade Ruby and bundler by <a
href="https://github.com/lopopolo"><code>@​lopopolo</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/48">artichoke/known-folders-rs#48</a></li>
<li>Bump rubocop from 1.64.1 to 1.65.1 in the bundler-deps group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/49">artichoke/known-folders-rs#49</a></li>
<li>Update windows-sys requirement from 0.52.0 to 0.59.0 in the
cargo-deps group by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/artichoke/known-folders-rs/pull/50">artichoke/known-folders-rs#50</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/artichoke/known-folders-rs/compare/v1.1.0...v1.2.0">https://github.com/artichoke/known-folders-rs/compare/v1.1.0...v1.2.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="a6d616601e"><code>a6d6166</code></a>
Merge pull request <a
href="https://redirect.github.com/artichoke/known-folders-rs/issues/50">#50</a>
from artichoke/dependabot/cargo/cargo-deps-4df1cbb352</li>
<li><a
href="f309c7f0f9"><code>f309c7f</code></a>
Remove verwsion-sync tests</li>
<li><a
href="0539670756"><code>0539670</code></a>
Update MSRV in CI</li>
<li><a
href="379679cae1"><code>379679c</code></a>
Remove unused import</li>
<li><a
href="287f576c52"><code>287f576</code></a>
Fix compilation errors with windows-sys 0.59.0</li>
<li><a
href="531830d7a6"><code>531830d</code></a>
Merge pull request <a
href="https://redirect.github.com/artichoke/known-folders-rs/issues/49">#49</a>
from artichoke/dependabot/bundler/bundler-deps-df773579f1</li>
<li><a
href="46a18f3a7b"><code>46a18f3</code></a>
Update windows-sys requirement in the cargo-deps group</li>
<li><a
href="92a263af10"><code>92a263a</code></a>
Bump rubocop from 1.64.1 to 1.65.1 in the bundler-deps group</li>
<li><a
href="9696bfd4a8"><code>9696bfd</code></a>
Merge pull request <a
href="https://redirect.github.com/artichoke/known-folders-rs/issues/48">#48</a>
from artichoke/lopopolo/upgrade-ruby</li>
<li><a
href="88557de085"><code>88557de</code></a>
Upgrade Ruby and bundler</li>
<li>Additional commits viewable in <a
href="https://github.com/artichoke/known-folders-rs/compare/v1.1.0...v1.2.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=known-folders&package-manager=cargo&previous-version=1.1.0&new-version=1.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>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 15:46:21 +00:00
dependabot[bot]
9378c8b0ac build(deps): Bump serde from 1.0.209 to 1.0.210 in /rust (#6642)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.209 to
1.0.210.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.210</h2>
<ul>
<li>Support serializing and deserializing <code>IpAddr</code> and
<code>SocketAddr</code> in no-std mode on Rust 1.77+ (<a
href="https://redirect.github.com/serde-rs/serde/issues/2816">#2816</a>,
thanks <a
href="https://github.com/MathiasKoch"><code>@​MathiasKoch</code></a>)</li>
<li>Make <code>serde::ser::StdError</code> and
<code>serde::de::StdError</code> equivalent to
<code>core::error::Error</code> on Rust 1.81+ (<a
href="https://redirect.github.com/serde-rs/serde/issues/2818">#2818</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="89c4b02bf3"><code>89c4b02</code></a>
Release 1.0.210</li>
<li><a
href="eeb8e44cda"><code>eeb8e44</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2818">#2818</a>
from dtolnay/coreerror</li>
<li><a
href="785c2d9605"><code>785c2d9</code></a>
Stabilize no-std StdError trait</li>
<li><a
href="d549f048e1"><code>d549f04</code></a>
Reformat parse_ip_impl definition and calls</li>
<li><a
href="4c0dd63011"><code>4c0dd63</code></a>
Delete attr support from core::net deserialization macros</li>
<li><a
href="26fb134165"><code>26fb134</code></a>
Relocate cfg attrs out of parse_ip_impl and parse_socket_impl</li>
<li><a
href="07e614b52b"><code>07e614b</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2817">#2817</a>
from dtolnay/corenet</li>
<li><a
href="b1f899fbe8"><code>b1f899f</code></a>
Delete doc(cfg) attribute from impls that are supported in no-std</li>
<li><a
href="b4f860e627"><code>b4f860e</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2816">#2816</a>
from MathiasKoch/chore/core-net</li>
<li><a
href="d940fe1b49"><code>d940fe1</code></a>
Reuse existing Buf wrapper as replacement for std::io::Write</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.209...v1.0.210">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.209&new-version=1.0.210)](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-09-09 18:07:22 +00:00
Jamil
ae5613b223 ci: Update changelog for 1.3.1ish clients (#6612)
Bumps internet resource UI.
2024-09-06 00:07:52 +00:00
Reactor Scram
9bc60dc618 refactor(rust/gui-client): close callbacks when closing connlib (#6590)
Closes #6576

This recreates the callback channel on every connect / disconnect cycle,
to prevent this sequence:

1. Start connlib
2. Fail in `make_tun`
3. Spend several seconds doing platform-specific things
4. Stop connlib (since `make_tun` failed)
5. Come back to the main loop to find a bunch of queued-up callbacks
even though connlib is supposed to be stopped.


Instead we get:

5\. Come back to the main loop and we've dropped the callback receiver,
so any callbacks that connlib sent while we were busy are either dropped
or not even sent.
2024-09-04 19:20:45 +00:00
Reactor Scram
afb405ce9f chore(rust/gui-client): log connlib connection errors (#6574)
Old behavior: Connection errors are sent to the GUI but the IPC service
forgets about them.

New behavior: Clone the error and log it on both sides.

Found while debugging a customer issue. This would have made the logs
easier to read.
2024-09-03 19:59:03 +00:00
Reactor Scram
09f4b6e790 chore(rust/gui-client): log the IPC message variant if the service can't handle it (#6571)
This would have helped while debugging a customer issue

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-09-03 19:38:57 +00:00
Reactor Scram
d7810ef9c0 chore(rust/gui-client/windows): update windows to 0.58 (#6565)
Updates `windows` crates to 0.58 without the bug in #6551.

Supersedes #6556.

The bug was calling `try_send()?` on an MPSC channel of capacity 1,
which would bail out of the worker thread if we got 2 DNS change
notifications faster than the controller task / thread could process the
first one.
2024-09-03 04:18:46 +00:00
Reactor Scram
1505b699e5 fix(client/windows): Revert "chore(rust/gui-client/windows): update windows to 0.58 (#6506)" (#6555)
This reverts commit d8f25f9bf8.

#6506 broke the Clients and I guess I didn't do any manual smoke test,
so I didn't catch it.

I have leads for a permanent fix in #6551 but I don't want to leave
`main` broken since it will screw up bisects.
2024-09-02 20:25:10 +00:00
dependabot[bot]
6241cc31fa build(deps): Bump tempfile from 3.10.1 to 3.12.0 in /rust (#6543)
Bumps [tempfile](https://github.com/Stebalien/tempfile) from 3.10.1 to
3.12.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Stebalien/tempfile/blob/master/CHANGELOG.md">tempfile's
changelog</a>.</em></p>
<blockquote>
<h2>3.12.0</h2>
<ul>
<li>Add a <code>keep(keep: bool)</code> function to builder that
suppresses delete-on-drop behavior (thanks to <a
href="https://github.com/RalfJung"><code>@​RalfJung</code></a>).</li>
<li>Update <code>windows-sys</code> from 0.52 to 0.59.</li>
</ul>
<h2>3.11.0</h2>
<ul>
<li>Add the ability to override the default temporary directory. This
API shouldn't be used in general, but there are some cases where it's
unavoidable.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/Stebalien/tempfile/commits">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tempfile&package-manager=cargo&previous-version=3.10.1&new-version=3.12.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 19:37:49 +00:00
Reactor Scram
d8f25f9bf8 chore(rust/gui-client/windows): update windows to 0.58 (#6506)
Supersedes #5913

This required a big refactor because `HANDLE` is no longer `Send` and
was never supposed to be.

So we add a worker thread for listening to DNS changes, since that
requires us to hold a `HANDLE` across `await` points and I couldn't find
any simpler way to do it.

I could add integration tests for this in a future PR that prove the
notifiers work by poking the registry or setting DNS servers and seeing
if we pick up the changes on time. But setting DNS servers without the
tunnel up may be tricky, so I left it out of scope for this PR.

```[tasklist]
- [x] Fix force-kill bug
```
2024-09-02 18:00:45 +00:00
Jamil
c6b0b0a922 ci: Release 1.3.0 for Internet Resource (#6503)
This publishes the 1.3.0 clients and gateways so that Internet Resources
will work.

The feature is still disabled for the Stripe plans until we publish the
launch post. Select customers have the feature enabled.

Closes #2667
2024-08-30 01:21:34 -07:00
Jamil
c66f0c15c0 ci: Draft bump 1.3.0 clients (#6470)
- Internet resources
2024-08-29 23:33:02 -07:00
Reactor Scram
ef75f0fcd9 fix(client/windows): put NRPT rules in a special spot if Group Policy is active (#6472)
Closes #6469

DNS deactivation now also uses the registry instead of PowerShell, but
this may not be faster, since the latency would already be hidden from
users most of the time.
2024-08-28 22:07:27 +00:00
dependabot[bot]
fe952e634a build(deps): Bump serde from 1.0.204 to 1.0.209 in /rust (#6440)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.204 to
1.0.209.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/serde/releases">serde's
releases</a>.</em></p>
<blockquote>
<h2>v1.0.209</h2>
<ul>
<li>Fix deserialization of empty structs and empty tuples inside of
untagged enums (<a
href="https://redirect.github.com/serde-rs/serde/issues/2805">#2805</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
</ul>
<h2>v1.0.208</h2>
<ul>
<li>Support serializing and deserializing unit structs in a
<code>flatten</code> field (<a
href="https://redirect.github.com/serde-rs/serde/issues/2802">#2802</a>,
thanks <a
href="https://github.com/jonhoo"><code>@​jonhoo</code></a>)</li>
</ul>
<h2>v1.0.207</h2>
<ul>
<li>Improve interactions between <code>flatten</code> attribute and
<code>skip_serializing</code>/<code>skip_deserializing</code> (<a
href="https://redirect.github.com/serde-rs/serde/issues/2795">#2795</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
</ul>
<h2>v1.0.206</h2>
<ul>
<li>Improve support for <code>flatten</code> attribute inside of enums
(<a
href="https://redirect.github.com/serde-rs/serde/issues/2567">#2567</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
</ul>
<h2>v1.0.205</h2>
<ul>
<li>Use serialize_entry instead of serialize_key + serialize_value when
serialize flattened newtype enum variants (<a
href="https://redirect.github.com/serde-rs/serde/issues/2785">#2785</a>,
thanks <a
href="https://github.com/Mingun"><code>@​Mingun</code></a>)</li>
<li>Avoid triggering a collection_is_never_read lint in the
deserialization of enums containing flattened fields (<a
href="https://redirect.github.com/serde-rs/serde/issues/2791">#2791</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="30752ac4ff"><code>30752ac</code></a>
Release 1.0.209</li>
<li><a
href="b84e6ca4f5"><code>b84e6ca</code></a>
Improve wording of PR 2805 comments</li>
<li><a
href="87a2fb0f1a"><code>87a2fb0</code></a>
Wrap comments from PR 2805 to 80 columns</li>
<li><a
href="9eaf7b9824"><code>9eaf7b9</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2805">#2805</a>
from Mingun/untagged-tests</li>
<li><a
href="7bde100237"><code>7bde100</code></a>
Replace MapRefDeserializer with value::MapDeserializer</li>
<li><a
href="da7fc795ee"><code>da7fc79</code></a>
Fix deserialization of empty struct variant in untagged enums</li>
<li><a
href="4c5fec1363"><code>4c5fec1</code></a>
Test special cases that reaches SeqRefDeserializer::deserialize_any
len==0 co...</li>
<li><a
href="6588b0ad37"><code>6588b0a</code></a>
Cover Content::Seq case in VariantRefDeserializer::struct_variant</li>
<li><a
href="0093f74cfe"><code>0093f74</code></a>
Split test newtype_enum into four tests for each variant</li>
<li><a
href="171c6da57a"><code>171c6da</code></a>
Complete coverage of
ContentRefDeserializer::deserialize_newtype_struct</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.204...v1.0.209">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde&package-manager=cargo&previous-version=1.0.204&new-version=1.0.209)](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-08-28 14:48:32 +00:00
Reactor Scram
b5a67cd2d7 fix(rust/gui-client): when the Client starts with a token but no Internet, wait for Internet and then connect (#6414)
Closes #6389 

I added a retry button since the network change detection is flaky
inside Parallels. On bare metal Windows it works fine.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-27 20:14:08 +00:00
Reactor Scram
7762741d55 fix(rust/gui-client): ignore network resets before the tunnel is ready (#6458)
Closes #6457

This PR ignores `Session::reset` requests from the GUI while the IPC
service is still raising the tunnel. This removes redundant
reconnections to the Portal and it may improve behavior on some systems.

It's not any faster on my dev laptop.

`set_dns` seemed harmless so I didn't touch that.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-27 19:28:44 +00:00
Reactor Scram
2726e1dc00 fix(rust/gui-client/windows): read DNS servers before starting connlib (#6455)
Closes #6453

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-27 18:49:41 +00:00
Reactor Scram
482ded889e fix(rust/gui-client): throw error when failing to connect to Firezone (#6409)
Refs #6389 

```[tasklist]
- [x] Update changelog
- [x] Update manual test cases
```

This changes the behavior from "fail silently" to "fail loudly" so at
least the user knows something is wrong and they can restart Firezone
after they gain Internet.

<img width="439" alt="image"
src="https://github.com/user-attachments/assets/d5bbac66-9a5f-40a6-8b4c-71d8ab8abd6d">

<img width="554" alt="image"
src="https://github.com/user-attachments/assets/bcee1f87-bd29-4a44-b41f-a01217e3248e">
2024-08-23 15:37:57 +00:00
Jamil
c8eed59387 ci: Release 1.2.0 (#6395)
Releasing 1.2.0 to unblock portal deploy! Some of these have already
been published.
2024-08-22 00:18:27 +00:00
Reactor Scram
332f827cf7 fix(gui-client): reload IPC service log filter when the settings change (#6351)
Closes #6302

Tested with CI-built MSI on x86_64 Windows, and with dev-built
`run-debug` on aarch Linux.
2024-08-19 23:04:59 +00:00
dependabot[bot]
217faeabf0 build(deps): Bump nix from 0.28.0 to 0.29.0 in /rust (#6343)
Bumps [nix](https://github.com/nix-rust/nix) from 0.28.0 to 0.29.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nix-rust/nix/blob/master/CHANGELOG.md">nix's
changelog</a>.</em></p>
<blockquote>
<h2>[0.29.0] - 2024-05-24</h2>
<h3>Added</h3>
<ul>
<li>Add <code>getregset()/setregset()</code> for
Linux/glibc/x86/x86_64/aarch64/riscv64 and
<code>getregs()/setregs()</code> for Linux/glibc/aarch64/riscv64
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2044">#2044</a>)</li>
<li>Add socket option Ipv6Ttl for apple targets.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2287">#2287</a>)</li>
<li>Add socket option UtunIfname.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2325">#2325</a>)</li>
<li>make SigAction repr(transparent) &amp; can be converted to the libc
raw type
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2326">#2326</a>)</li>
<li>Add <code>From</code> trait implementation for conversions between
<code>sockaddr_in</code> and
<code>SockaddrIn</code>, <code>sockaddr_in6</code> and
<code>SockaddrIn6</code>
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2328">#2328</a>)</li>
<li>Add socket option ReusePortLb for FreeBSD.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2332">#2332</a>)</li>
<li>Added support for openat2 on linux.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2339">#2339</a>)</li>
<li>Add if_indextoname function.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2340">#2340</a>)</li>
<li>Add <code>mount</code> and <code>unmount</code> API for apple
targets.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2347">#2347</a>)</li>
<li>Added <code>_PC_MIN_HOLE_SIZE</code> for <code>pathconf</code> and
<code>fpathconf</code>.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2349">#2349</a>)</li>
<li>Added <code>impl AsFd for pty::PtyMaster</code>
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2355">#2355</a>)</li>
<li>Add <code>open</code> flag <code>O_SEARCH</code> to AIX,
Empscripten, FreeBSD, Fuchsia, solarish,
WASI (<a
href="https://redirect.github.com/nix-rust/nix/pull/2374">#2374</a>)</li>
<li>Add prctl function <code>prctl_set_vma_anon_name</code> for
Linux/Android.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2378">#2378</a>)</li>
<li>Add <code>sync(2)</code> for
<code>apple_targets/solarish/haiku/aix/hurd</code>,
<code>syncfs(2)</code> for
<code>hurd</code> and <code>fdatasync(2)</code> for
<code>aix/hurd</code>
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2379">#2379</a>)</li>
<li>Add fdatasync support for Apple targets.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2380">#2380</a>)</li>
<li>Add <code>fcntl::OFlag::O_PATH</code> for FreeBSD and Fuchsia
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2382">#2382</a>)</li>
<li>Added <code>PathconfVar::MIN_HOLE_SIZE</code> for apple_targets.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2388">#2388</a>)</li>
<li>Add <code>open</code> flag <code>O_SEARCH</code> to apple_targets
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2391">#2391</a>)</li>
<li><code>O_DSYNC</code> may now be used with <code>aio_fsync</code> and
<code>fcntl</code> on FreeBSD.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2404">#2404</a>)</li>
<li>Added <code>Flock::relock</code> for upgrading and downgrading
locks.
(<a
href="https://redirect.github.com/nix-rust/nix/pull/2407">#2407</a>)</li>
</ul>
<h3>Changed</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="1dad4d8d04"><code>1dad4d8</code></a>
chore: prepare for 0.29.0</li>
<li><a
href="f7431971b4"><code>f743197</code></a>
fix ControlMessageOwned::UdpGroSegments UDP packets processing type. (<a
href="https://redirect.github.com/nix-rust/nix/issues/2406">#2406</a>)</li>
<li><a
href="208b80b65d"><code>208b80b</code></a>
recvmsg: Check if CMSG buffer was too small and return an error (<a
href="https://redirect.github.com/nix-rust/nix/issues/2413">#2413</a>)</li>
<li><a
href="ecd12a9990"><code>ecd12a9</code></a>
test: remove test of inode count in test_statfs.rs (<a
href="https://redirect.github.com/nix-rust/nix/issues/2414">#2414</a>)</li>
<li><a
href="663506a602"><code>663506a</code></a>
fix: only close <code>fanotify</code> events with a valid fd (<a
href="https://redirect.github.com/nix-rust/nix/issues/2399">#2399</a>)</li>
<li><a
href="1604723757"><code>1604723</code></a>
revert: impl From&lt;sigaction&gt; for SigAction (<a
href="https://redirect.github.com/nix-rust/nix/issues/2410">#2410</a>)</li>
<li><a
href="ec4beb5a22"><code>ec4beb5</code></a>
docs: correct limit value of FAN_UNLIMITED_QUEUE and
FAN_UNLIMITED_MARKS[skip...</li>
<li><a
href="84c0444c3a"><code>84c0444</code></a>
chore: bump libc to 0.2.155 (<a
href="https://redirect.github.com/nix-rust/nix/issues/2409">#2409</a>)</li>
<li><a
href="c5af4adffd"><code>c5af4ad</code></a>
Add Flock::relock (<a
href="https://redirect.github.com/nix-rust/nix/issues/2407">#2407</a>)</li>
<li><a
href="e7acaff07f"><code>e7acaff</code></a>
Enable O_DSYNC on FreeBSD with fcntl and aio_fsync (<a
href="https://redirect.github.com/nix-rust/nix/issues/2404">#2404</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nix-rust/nix/compare/v0.28.0...v0.29.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=nix&package-manager=cargo&previous-version=0.28.0&new-version=0.29.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-19 22:43:45 +00:00
Thomas Eizinger
4c30d78cda fix: refer to correct tag in git-version (#6334)
The output of `git describe` always refers to the last tag that it can
find. This leads to confusing versions being printed such as:

```
2024-08-19T00:24:08.983891Z  INFO firezone_headless_client: arch="x86_64" git_version="gateway-1.1.5-30-gf82fee162-modified"
```

Note that this is code running in the headless-client and it refers to
the gateway tag. Whilst not wrong from git's PoV, it is certainly
confusing.

We can fix this by providing a glob-pattern to `git describe` via
`--match`. This makes git ignore any other tags and print a version
identifier that refers to the current program:

```
2024-08-19T00:39:48.634191Z  INFO firezone_headless_client: arch="x86_64" git_version="headless-client-1.1.7-31-ga08a3411d-modified"
```
2024-08-19 22:42:15 +00:00
dependabot[bot]
81043ea89d build(deps): Bump serde_json from 1.0.117 to 1.0.125 in /rust (#6344)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.117 to
1.0.125.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/serde-rs/json/releases">serde_json's
releases</a>.</em></p>
<blockquote>
<h2>1.0.125</h2>
<ul>
<li>Speed up \uXXXX parsing and improve handling of unpaired surrogates
when deserializing to bytes (<a
href="https://redirect.github.com/serde-rs/json/issues/1172">#1172</a>,
<a
href="https://redirect.github.com/serde-rs/json/issues/1175">#1175</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
<h2>v1.0.124</h2>
<ul>
<li>Fix a bug in processing string escapes in big-endian architectures
(<a
href="https://redirect.github.com/serde-rs/json/issues/1173">#1173</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
<h2>v1.0.123</h2>
<ul>
<li>Optimize string parsing by applying SIMD-within-a-register: 30.3%
improvement on <a
href="https://github.com/miloyip/nativejson-benchmark/blob/v1.0.0/data/twitter.json">twitter.json</a>
from 613 MB/s to 799 MB/s (<a
href="https://redirect.github.com/serde-rs/json/issues/1161">#1161</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
<h2>v1.0.122</h2>
<ul>
<li>Support using <code>json!</code> in no-std crates (<a
href="https://redirect.github.com/serde-rs/json/issues/1166">#1166</a>)</li>
</ul>
<h2>v1.0.121</h2>
<ul>
<li>Optimize position search in error path (<a
href="https://redirect.github.com/serde-rs/json/issues/1160">#1160</a>,
thanks <a
href="https://github.com/purplesyringa"><code>@​purplesyringa</code></a>)</li>
</ul>
<h2>v1.0.120</h2>
<ul>
<li>Correctly specify required version of <code>indexmap</code>
dependency (<a
href="https://redirect.github.com/serde-rs/json/issues/1152">#1152</a>,
thanks <a
href="https://github.com/cforycki"><code>@​cforycki</code></a>)</li>
</ul>
<h2>v1.0.119</h2>
<ul>
<li>Add <code>serde_json::Map::shift_insert</code> (<a
href="https://redirect.github.com/serde-rs/json/issues/1149">#1149</a>,
thanks <a
href="https://github.com/joshka"><code>@​joshka</code></a>)</li>
</ul>
<h2>v1.0.118</h2>
<ul>
<li>Implement Hash for serde_json::Value (<a
href="https://redirect.github.com/serde-rs/json/issues/1127">#1127</a>,
thanks <a
href="https://github.com/edwardycl"><code>@​edwardycl</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6130f9b358"><code>6130f9b</code></a>
Release 1.0.125</li>
<li><a
href="cc7a1608c9"><code>cc7a160</code></a>
Touch up PR 1175</li>
<li><a
href="0f942e5b52"><code>0f942e5</code></a>
Merge pull request 1175 from iex-rs/faster-backslash-u</li>
<li><a
href="d8921cd29b"><code>d8921cd</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1172">#1172</a>
from iex-rs/faster-hex</li>
<li><a
href="b4bc6436ac"><code>b4bc643</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1176">#1176</a>
from dtolnay/miriname</li>
<li><a
href="94a2aad7b7"><code>94a2aad</code></a>
Improve job names for miri jobs</li>
<li><a
href="8073fc16b8"><code>8073fc1</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1174">#1174</a>
from iex-rs/miri-on-ci</li>
<li><a
href="96ae60445d"><code>96ae604</code></a>
Correct WTF-8 parsing</li>
<li><a
href="236cc8247d"><code>236cc82</code></a>
Simplify unicode escape handling</li>
<li><a
href="2f28d106e6"><code>2f28d10</code></a>
Use the same UTF-8/WTF-8 impl for surrogates</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/json/compare/v1.0.117...1.0.125">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=serde_json&package-manager=cargo&previous-version=1.0.117&new-version=1.0.125)](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-08-19 21:06:45 +00:00
Thomas Eizinger
3b56664e02 test(rust): ensure deterministic proptests (#6319)
For quite a while now, we have been making extensive use of
property-based testing to ensure `connlib` works as intended. The idea
of proptests is that - given a certain seed - we deterministically
sample test inputs and assert properties on a given function.

If the test fails, `proptest` prints the seed which can then be added to
a regressions file to iterate on the test case and fix it. It is quite
obvious that non-determinism in how the test input gets generated is no
bueno and reduces the value we get out of these tests a fair bit.

The `HashMap` and `HashSet` data structures are known to be
non-deterministic in their iteration order. This causes non-determinism
during the input generation because we make use of a lot of maps and
sets to gradually build up the test input. We fix all uses of `HashMap`
and `HashSet` by replacing them with `BTreeMap` and `BTreeSet`.

To ensure this doesn't regress, we refactor `tunnel_test` to not make
use of proptest's macros and instead, we initialise and run the test
ourselves. This allows us to dump the sampled state and transitions into
a file per test run. In CI, we then run a 2nd iteration of all
regression tests and compare the sampled state and transitions with the
previous run. They must match byte-for-byte.

Finally, to discourage use of non-deterministic iteration, we ban the
use of the iteration functions on `HashMap` and `HashSet` across the
codebase. This doesn't catch iteration in a `for`-loop but it is better
than not linting against it at all.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-16 23:15:58 +00:00
Thomas Eizinger
c51cf096ae build(rust): avoid unnecessary rebuilds (#6321)
Parsing the current Git version within `firezone-bin-shared` means this
crate (and all its dependents) need to be rebuilt everytime one makes a
commit, even if none of the code actually changes.

To avoid this whilst still allowing `firezone-bin-shared` to export a
useful, shared function, we export a macro instead that can be called
from the respective crates that need the GIT version. This means only
those binaries will be marked as dirty and rebuilds of e.g. unit tests
don't need to rebuild these workspace crates.
2024-08-16 15:30:04 +00:00
Gabi
df4d604ad3 feat(gui-clients): permit resource enable and disable (#6248)
Last PR for #6074

This adds Enable/Disable for tauri clients.

In windows, edge seems to hold on to the sockets for a bit too long
after disabling the resources. This will be solved for the internet
resource probably by modifying the firewall, in another PR.
2024-08-16 03:41:15 +00:00
Reactor Scram
4ddec81f28 fix(gui-client/windows): allow GUI to run as admin again (#6308)
Closes #6305 too

I couldn't find the ticket for this so I'm not sure which customers are
affected.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-08-15 22:36:18 +00:00
Thomas Eizinger
d399e65246 build(deps): bump tokio-tungstenite to 0.23 (#5509)
With the upgrade to 0.23, `tokio-tungstenite` pulls in `rustls` 0.27
which supports multiple crypto providers. By default, this uses the
`aws-lc-crypto` provider. The previous default was `ring`.

This PR bumps the necessary versions and installs the `ring` crypto
provider at the beginning of each application, before connlib starts. We
try and do this as early as possible to make it obvious that it only
needs to happen once per process.

Resolves: #5380.
2024-08-15 06:02:17 +00:00
Thomas Eizinger
7c70850217 feat(connlib): allow glob patterns for matching domain names (#5901)
Currently, `connlib` can only handle "simple" DNS wildcards where `*`
matches any number of subdomains, including zero and `?` matches a
single subdomain.

With this PR, we expand `connlib'`s capabilities to allow for a much
more complex matching of domains that more closely resembles glob
patterns:

- `**` matches any number of subdomains. This supersedes the previous
`*` operator.
- `*` matches a single subdomain. This supersedes the previous `?`
operator.
- `?` matches a single character. This wasn't possible before.
- Additionally, any of these can be combined. Previously, only `*` or
`?` was allowed and they were only accepted at the front of the domain
name pattern.

Resolves: #5056.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2024-08-15 01:30:53 +00:00
Reactor Scram
79c9811a59 fix(gui-client/windows): delete IPC service logs when user clicks "clear logs" (#6280)
Closes #5453 

Tested once on the Windows aarch64 VM. Should always leave 4 files
behind, a `.log` and a `.jsonl` for the GUI and for the IPC service. The
"log directory" is a bit of a lie since it's consistently 2 directories
on both platforms now.

```[tasklist]
- [x] Update changelog
- [x] Make a note to remove the known issue from the website when the next release is cut after this PR merges
```
2024-08-14 15:08:31 +00:00
Jamil
296ca4ad4d ci: Bump Clients and Gateways to fix NAT / allocation issues (#6287)
Bump all Clients and Gateways due to #6265 being fixed.

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-08-13 21:58:12 +00:00