320 Commits

Author SHA1 Message Date
Jamil
25b6528942 chore: Bump versions and update changelog (#5636)
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-06-29 09:06:10 -07:00
Jamil
b5de55ac26 chore: Bump clients to 1.1.0, Gateway to 1.1.1 (#5591) 2024-06-27 02:43:48 -07:00
Reactor Scram
f80e550c77 refactor(headless-client): extract ipc_service module (#5546)
Move almost half the lines of code into `ipc_service` so that it's
separate from the headless Client code
Moves the standalone / headless Client code into `standalone`
2024-06-26 14:14:04 +00:00
Thomas Eizinger
6c842de83c refactor(connlib): don't re-initialise Tun on config updates (#5392)
Currently, connlib re-initialises the TUN device on Linux every time its
configuration gets updated such as when roaming from one network to
another. This is unnecessary. Instead, we can adopt the same approach as
already used on MacOS, iOS and Windows and only initialise it if it
doesn't exist yet.

Doing so surfaces an interesting bug. Currently, attempting to
re-initialise the TUN device fails with a warning:

> connlib_client_shared::eventloop: Failed to set interface on tunnel:
Resource busy (os error 16)

See
https://github.com/firezone/firezone/actions/runs/9656570163/job/26634409346#step:7:103
for an example. As a consequence, we never actually trigger the
`on_set_interface_config` callback and thus never actually set the new
IPs on the TUN device.

Now that we _are_ calling this callback, we execute
`TunDeviceManager::set_ips` which first clears all IPs from the device
and then attaches the new ones. A consequence of this is that the Linux
kernel will clear all routes associated with the device. This clashes
with an optimisation we have in `TunDeviceManager` where we remember the
previously set routes and don't set new ones if they are the same.

This `HashSet` needs to be cleared upon setting new IPs in order to
actually set the new routes correctly afterwards. Without that, we stop
receiving traffic on the TUN device.
2024-06-25 22:30:31 +00:00
Reactor Scram
144418f47c chore(gui-client): show an error dialog if the IPC service isn't running (#5454)
Closes #5377 

Windows
<img width="445" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/d557cce1-e6c6-4a47-8645-777d1aa04f33">

KDE
<img width="521" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/48b9d97a-e479-4d21-b717-230b0e27214e">

```[tasklist]
### Tasks
- [x] Fix broken smoke tests #5464
- [x] Linux manual sign-in
- [x] Linux auto sign-in
- [x] Windows manual sign-in
- [x] Window auto sign-in
- [x] Open for review
- [ ] Apply feedback
- [ ] Merge
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-25 21:07:43 +00:00
Reactor Scram
058b04178a fix(gui-client): keep the IPC service running even if the GUI quits during sign-in (#5451)
Closes #5450

Now the entire `Handler::run` function is allowed to fail, similar to a
web request handler failing in a web server.
Previously we only allowed the Handler to fail if it was idle, waiting
on incoming IPC requests. Now it can fail even if it's working with
connlib and about to send over IPC.

I replicated this on my Windows 11 VM in Parallels and the fix works
fine there. Should be the same bug and same fix in Linux.
2024-06-24 23:00:45 +00:00
Reactor Scram
28378fe24e refactor(headless-client): remove FIREZONE_PACKAGE_VERSION (#5487)
Closes #5481 

With this, I can connect to the staging portal without a build.rs or any
extra env var setup

<img width="387" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/9c080b36-3a76-49c7-b706-20723697edc7">


```[tasklist]
### Next steps
- [x] Split out a refactor PR for `ConnectArgs` (#5488)
- [x] Try doing this for other Clients
- [x] Check Gateway
- [x] Check Tauri Client
- [x] Change to `app_version`
- [x] Open for review
- [ ] Use `option_env` so that `FIREZONE_PACKAGE_VERSION` can still override the Cargo.toml version for local testing
- [ ] Check Android Client
- [ ] Check Apple Client
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-21 23:06:41 +00:00
Reactor Scram
48960d3728 test(gui-client): refactor and test IPC code (#5426)
Closes #5022 
Improves test coverage of platform-specific I/O code

```[tasklist]
### Before opening for review
- [x] Add https://github.com/firezone/firezone/pull/5428#discussion_r1646374873 as a comment
- [x] Wait for Windows issues 5441 through 5450 to settle
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-21 22:59:24 +00:00
Reactor Scram
15ad02e45f refactor(connlib): extract ConnectArgs (#5488)
This is extracted from #5487 since I needed to add an 8th parameter and
Clippy said 8 is too many.

Refs #2986 
Stepping stone towards using the Builder pattern. There's only a few
Clients so this has 80% of the advantage for 20% of the effort
2024-06-21 20:58:47 +00:00
Jamil
b4cde74bee chore: Bump client next versions to 1.1.0 (#5485) 2024-06-21 16:31:43 +00:00
Reactor Scram
559a54d061 refactor(gui-client): clean up a few things around IPC (#5428)
Extracted from https://github.com/firezone/firezone/pull/5426
- Replace `new` and `new_for_test` for IPC servers with `enum ServiceId`
- Rename `debug_command_setup` to `setup_stdout_logging`

It turned out there is no clever way to hide other platforms from
`cargo-mutants`, I thought I had such a way
2024-06-19 15:18:43 +00:00
Jamil
a45acc04db fix(connlib): set default firezone_tunnel log level from trace to debug for development and some ci (#5411)
"Encapsulated packet" is now spamming dev clients, so this level is
changed to `debug` by default in dev builds.

```
2024-06-17 14:04:15.419  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.419  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.420  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.421  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.421  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.422  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
2024-06-17 14:04:15.423  6911-7520  connlib                 dev.firezone.android                 V  firezone_tunnel::client: s0_name: encapsulates0_target=firezone_tunnel::clients0_file=connlib/tunnel/src/client.rss0_line=441s0_dst=fd00:2021:1111:8000::2Encapsulated packet
```
2024-06-18 04:48:52 +00:00
Jamil
21585cb2b0 ci: bump Gateway / headless to 1.0.8 (#5409) 2024-06-17 13:36:37 -07:00
Reactor Scram
e76301067b chore(headless-client/windows): fix cargo test -p firezone-headless-client on Windows (#5406)
This is a funny one. `cargo test -p firezone-headless-client -p
firezone-gui-client` actually passes, because the GUI client uses the
pipes feature, and Cargo apparently just does one build for both
packages. But if you build the headless Client by itself, it fails to
build.

I think this caused `cargo-mutants` to consider all its headless Client
mutants to be unviable, and so it didn't show coverage for that package.
2024-06-17 19:15:16 +00:00
Reactor Scram
a9a0a6c450 refactor(headless-client): rewrite the IPC service main loop so we can time the Client startup (#5376)
Part of a yak shave to profile startup time for reducing it on Windows
#5026

Median of 3 runs:

- Windows 11 aarch64 Parallels VM - 4.8 s
- Windows 11 x86_64 laptop - 3.1 s (I thought it used to be slower)
- Windows Server 2022 VM - 22.2 s

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-06-17 16:57:43 +00:00
Reactor Scram
6e5b351277 fix(gui-client): let the GUI set the log filter for the IPC service (#5292)
Closes #5042 

Smoke test plan:
- Install on a before-Firezone VM
- Confirm logs default to `str0m=warn,info`
- Set log filter to `debug` in GUI
- Restart IPC service
- Confirm logs are `debug`
- Clear settings back to default
- Restart IPC service
- Confirm logs are `str0m=warn,info`

Directions to apply new log level:
1. Put the new log filter in
2. Click "Apply"
3. Quit Firezone Client
4. Right-click on the Start Menu and click "Terminal (Admin)" to open a
Powershell prompt
5. Run `Restart-Service -Name FirezoneClientIpcService` (on Linux, `sudo
systemctl restart firezone-client-ipc.service`)
6. Re-open Firezone Client

```[tasklist]
- [x] Log the log filter maybe
- [x] Use `atomicwrites` to write the file
- [x] (cancelled) ~~Make the GUI write the file on boot if it's not there (saves a step when upgrading from older versions)~~
- [x] Windows smoke test
- [x] Fix permissions on `/var/lib/dev.firezone.client/config`
- [x] Fix Linux IPC service not loading the log filter file
- [x] Linux smoke test
- [ ] Make sure it's okay that users in `firezone-client` can change the device ID
- [ ] Update user guides to include restarting the computer or IPC service after updating the log level?
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-14 21:35:11 +00:00
Reactor Scram
6c83f76a1f refactor(headless-client): move IPC servers into their own module (#5360)
Makes #5357 easier by freeing up space in the catch-all `platform` mod
2024-06-14 15:40:32 +00:00
Jamil
05a046ac1d ci: Bump versions for published releases (#5351) 2024-06-12 22:11:30 -07:00
Jamil
8700a680d5 chore: Bump versions to point to new artifacts (#5337)
Currently dl links are broken due to the updated format.
2024-06-12 00:01:59 -07:00
dependabot[bot]
9a01745a1d build(deps): Bump the windows group in /rust with 2 updates (#5288)
Bumps the windows group in /rust with 2 updates:
[windows](https://github.com/microsoft/windows-rs) and
[windows-implement](https://github.com/microsoft/windows-rs).

Updates `windows` from 0.56.0 to 0.57.0
<details>
<summary>Commits</summary>
<ul>
<li><a
href="15947886be"><code>1594788</code></a>
Release 0.57.0 (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3081">#3081</a>)</li>
<li><a
href="21d17ab998"><code>21d17ab</code></a>
Add WinRT <code>noexcept</code> support (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3070">#3070</a>)</li>
<li><a
href="7d94387a7c"><code>7d94387</code></a>
Optimize <code>IUnknown</code> identity checks (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3073">#3073</a>)</li>
<li><a
href="4572dcd6ae"><code>4572dcd</code></a>
Remove <code>unused_qualifications</code> (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3078">#3078</a>)</li>
<li><a
href="a623c3f27f"><code>a623c3f</code></a>
Fix warnings from Rust 1.80.0 nightly (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3074">#3074</a>)</li>
<li><a
href="0940e1f635"><code>0940e1f</code></a>
Check for null pointers in core <code>IInspectable</code> implementation
(<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3057">#3057</a>)</li>
<li><a
href="8b4a185e56"><code>8b4a185</code></a>
Use default rustfmt config for most crates (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3064">#3064</a>)</li>
<li><a
href="b8586add80"><code>b8586ad</code></a>
Fix Debug impls for COM interfaces (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3066">#3066</a>)</li>
<li><a
href="dbc3932513"><code>dbc3932</code></a>
Fix bug in COM interface chain support (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3060">#3060</a>)</li>
<li><a
href="71f8c2a4d9"><code>71f8c2a</code></a>
Fix handling of COM interfaces with same method name (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3059">#3059</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/windows-rs/compare/0.56.0...0.57.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `windows-implement` from 0.56.0 to 0.57.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/microsoft/windows-rs/releases">windows-implement's
releases</a>.</em></p>
<blockquote>
<h2>0.57.0</h2>
<p>This release includes updates to a number of crates.</p>
<p>It includes major updates to the following:</p>
<ul>
<li><code>riddle</code> 0.57.0</li>
<li><code>windows</code> 0.57.0</li>
<li><code>windows-bindgen</code> 0.57.0</li>
<li><code>windows-core</code> 0.57.0</li>
<li><code>windows-implement</code> 0.57.0</li>
<li><code>windows-interface</code> 0.57.0</li>
<li><code>windows-metadata</code> 0.57.0</li>
</ul>
<p>It also includes minor updates to the following:</p>
<ul>
<li><code>windows-result</code> 0.1.2</li>
<li><code>windows-registry</code> 0.1.2</li>
</ul>
<p>This includes various improvements and fixes to code generation,
compliance with new Rust warnings, COM authoring support helpers, and
more.</p>
<p>This release also includes the first published version of the
<code>cppwinrt</code> crate.</p>
<h2>What's Changed</h2>
<ul>
<li>Workflow improvements by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/2994">microsoft/windows-rs#2994</a></li>
<li>Workflow improvements 2 by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/2998">microsoft/windows-rs#2998</a></li>
<li>Workflow improvements 3 by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3000">microsoft/windows-rs#3000</a></li>
<li>Workflow improvements 4 by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3001">microsoft/windows-rs#3001</a></li>
<li>Add <code>as_raw</code> to <code>windows-registry</code> by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3003">microsoft/windows-rs#3003</a></li>
<li>Add Linux smoke test by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3005">microsoft/windows-rs#3005</a></li>
<li>Add non-windows support for PWSTR and PCWSTR by <a
href="https://github.com/tyilo"><code>@​tyilo</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3004">microsoft/windows-rs#3004</a></li>
<li>Use generated <code>E_POINTER</code> constant in
<code>windows-core</code> by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3008">microsoft/windows-rs#3008</a></li>
<li>Use prebuilt gnullvm target by <a
href="https://github.com/mati865"><code>@​mati865</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3007">microsoft/windows-rs#3007</a></li>
<li>Eliminate default features for JSON samples by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3012">microsoft/windows-rs#3012</a></li>
<li>Add support for freeing handles automatically by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3013">microsoft/windows-rs#3013</a></li>
<li>Addressing feedback on handle ownership by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3014">microsoft/windows-rs#3014</a></li>
<li>Bump ejs from 3.1.9 to 3.1.10 in /web/features by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3017">microsoft/windows-rs#3017</a></li>
<li>Reconfigure environment for GNU toolchain by <a
href="https://github.com/riverar"><code>@​riverar</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3019">microsoft/windows-rs#3019</a></li>
<li>Remove workaround for empty structs by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3016">microsoft/windows-rs#3016</a></li>
<li>Derive <code>Copy</code>, <code>Clone</code>, and <code>Debug</code>
for handles by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3015">microsoft/windows-rs#3015</a></li>
<li>Fix for Clippy <code>HSTRING</code> interior mutability warnings in
nightly by <a
href="https://github.com/riverar"><code>@​riverar</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3021">microsoft/windows-rs#3021</a></li>
<li>Handle new <code>unexpected_cfgs</code> warnings by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3022">microsoft/windows-rs#3022</a></li>
<li>Update jsonschema requirement from 0.17 to 0.18 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3023">microsoft/windows-rs#3023</a></li>
<li>Add <code>Ref</code> and <code>OutRef</code> to enhance COM
authoring support by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3025">microsoft/windows-rs#3025</a></li>
<li>Simplify derefencing <code>Ref</code> interface parameters by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3027">microsoft/windows-rs#3027</a></li>
<li>Add <code>from_raw</code> to <code>windows-registry</code> by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3034">microsoft/windows-rs#3034</a></li>
<li>Simplify <code>windows-registry</code> readme by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3035">microsoft/windows-rs#3035</a></li>
<li>Type name deferral in <code>windows-metadata</code> and
<code>windows-bindgen</code> by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3039">microsoft/windows-rs#3039</a></li>
<li>Streamline <code>TypeName</code> to support pattern matching by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3040">microsoft/windows-rs#3040</a></li>
<li>Derive standard traits for structs by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3041">microsoft/windows-rs#3041</a></li>
<li>Add missing MSRV workflows for newer lib crates by <a
href="https://github.com/kennykerr"><code>@​kennykerr</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3042">microsoft/windows-rs#3042</a></li>
<li>Provide an explicit <code>ComObject&lt;T&gt;</code> type that
represents a heap-allocated COM object by <a
href="https://github.com/sivadeilra"><code>@​sivadeilra</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3043">microsoft/windows-rs#3043</a></li>
<li>bindgen/default: Improve formatting of the readme by <a
href="https://github.com/MarijnS95"><code>@​MarijnS95</code></a> in <a
href="https://redirect.github.com/microsoft/windows-rs/pull/3045">microsoft/windows-rs#3045</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="15947886be"><code>1594788</code></a>
Release 0.57.0 (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3081">#3081</a>)</li>
<li><a
href="21d17ab998"><code>21d17ab</code></a>
Add WinRT <code>noexcept</code> support (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3070">#3070</a>)</li>
<li><a
href="7d94387a7c"><code>7d94387</code></a>
Optimize <code>IUnknown</code> identity checks (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3073">#3073</a>)</li>
<li><a
href="4572dcd6ae"><code>4572dcd</code></a>
Remove <code>unused_qualifications</code> (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3078">#3078</a>)</li>
<li><a
href="a623c3f27f"><code>a623c3f</code></a>
Fix warnings from Rust 1.80.0 nightly (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3074">#3074</a>)</li>
<li><a
href="0940e1f635"><code>0940e1f</code></a>
Check for null pointers in core <code>IInspectable</code> implementation
(<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3057">#3057</a>)</li>
<li><a
href="8b4a185e56"><code>8b4a185</code></a>
Use default rustfmt config for most crates (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3064">#3064</a>)</li>
<li><a
href="b8586add80"><code>b8586ad</code></a>
Fix Debug impls for COM interfaces (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3066">#3066</a>)</li>
<li><a
href="dbc3932513"><code>dbc3932</code></a>
Fix bug in COM interface chain support (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3060">#3060</a>)</li>
<li><a
href="71f8c2a4d9"><code>71f8c2a</code></a>
Fix handling of COM interfaces with same method name (<a
href="https://redirect.github.com/microsoft/windows-rs/issues/3059">#3059</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/microsoft/windows-rs/compare/0.56.0...0.57.0">compare
view</a></li>
</ul>
</details>
<br />


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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-11 18:01:35 +00:00
Jamil
7e533c42f8 refactor: Split releases for Clients and Gateways (#5287)
- Removes version numbers from infra components (elixir/relay)
- Removes version bumping from Rust workspace members that don't get
published
- Splits release publishing into `gateway-`, `headless-client-`, and
`gui-client-`
- Removes auto-deploying new infrastructure when a release is published.
Use the Deploy Production workflow instead.

Fixes #4397
2024-06-10 16:47:49 +00:00
Reactor Scram
609ba73f84 chore(gui-client): improve logging around Client startup and IPC connections (#5216)
Closes #3567 (again)
Closes #5214

Ready for review

```[tasklist]
### Before merging
- [x] The IPC service should report system uptime when it starts. This will tell us whether the computer was rebooted or just the IPC service itself was upgraded / rebooted.
- [x] The IPC service should report the PID of itself and the GUI if possible
- [x] The GUI should report the PID of the IPC service if possible
- [x] Extra logging between `GIT_VERSION = ` and the token loading log line, especially right before and right after the critical Tauri launching step
- [x] If a 2nd GUI or IPC service runs and exits due to single-instance, it must log that
- [x] Remove redundant DNS deactivation when IPC service starts (I think conectado noticed this in another PR)
- [x] Manually test that the GUI logs something on clean shutdown
- [x] Logarithmic heartbeat?
- [x] If possible, log monotonic time somewhere so NTP syncs don't make the logs unreadable (uptime in the heartbeat should be monotonic, mostly)
- [x] Apply the same logging fix to the IPC service
- [x] Ensure log zips include GUI crash dumps
- [x] ~~Fix #5042~~ (that's a separate issue, I don't want to drag this PR out)
- [x] Test IPC service restart (logs as a stop event)
- [x] Test IPC service stop
- [x] Test IPC service logs during system suspend (Not logged, maybe because we aren't subscribed to power events)
- [x] Test IPC service logs during system reboot (Logged as shutdown, we exit gracefully)
- [x] Test IPC service logs during system shut down (Logged as a suspend)
- [x] Test IPC service upgrade (Logged as a stop)
- [x] Log unhandled events from the Windows service controller (Power events like suspend and resume are logged and not handled)
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-06-06 22:10:03 +00:00
Reactor Scram
f161fd290e fix(tauri_client/windows): close and re-open the named pipe properly, and back off if needed (#5156)
Closes #5143 

The initial half-second backoff should typically be enough, and if the
user is manually re-opening the GUI after a GUI crash, I don't think
they'll notice. If they do, they can open the GUI again and it should
all work.
2024-06-05 20:32:00 +00:00
Reactor Scram
d561e0ee0d test: fix 21 mutants from cargo-mutants (#5170)
Most of these were in `known_dirs.rs` because it's platform-specific and
`cargo-mutants` wasn't ignoring other platforms correctly.

Using `cargo mutants -p firezone-gui-client -p firezone-headless-client`

176 / 236 mutants missed before

155 / 206 mutants missed after
2024-06-05 15:59:06 +00:00
dependabot[bot]
dfbfbbe8c9 build(deps): Bump tokio from 1.37.0 to 1.38.0 in /rust (#5193)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.37.0 to 1.38.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/tokio/releases">tokio's
releases</a>.</em></p>
<blockquote>
<h2>Tokio v1.38.0</h2>
<p>This release marks the beginning of stabilization for runtime
metrics. It
stabilizes <code>RuntimeMetrics::worker_count</code>. Future releases
will continue to
stabilize more metrics.</p>
<h3>Added</h3>
<ul>
<li>fs: add <code>File::create_new</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6573">#6573</a>)</li>
<li>io: add <code>copy_bidirectional_with_sizes</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6500">#6500</a>)</li>
<li>io: implement <code>AsyncBufRead</code> for <code>Join</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6449">#6449</a>)</li>
<li>net: add Apple visionOS support (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6465">#6465</a>)</li>
<li>net: implement <code>Clone</code> for <code>NamedPipeInfo</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6586">#6586</a>)</li>
<li>net: support QNX OS (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6421">#6421</a>)</li>
<li>sync: add <code>Notify::notify_last</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6520">#6520</a>)</li>
<li>sync: add <code>mpsc::Receiver::{capacity,max_capacity}</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6511">#6511</a>)</li>
<li>sync: add <code>split</code> method to the semaphore permit (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6472">#6472</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6478">#6478</a>)</li>
<li>task: add
<code>tokio::task::join_set::Builder::spawn_blocking</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6578">#6578</a>)</li>
<li>wasm: support rt-multi-thread with wasm32-wasi-preview1-threads (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6510">#6510</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>macros: make <code>#[tokio::test]</code> append <code>#[test]</code>
at the end of the attribute list (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6497">#6497</a>)</li>
<li>metrics: fix <code>blocking_threads</code> count (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6551">#6551</a>)</li>
<li>metrics: stabilize <code>RuntimeMetrics::worker_count</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6556">#6556</a>)</li>
<li>runtime: move task out of the <code>lifo_slot</code> in
<code>block_in_place</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6596">#6596</a>)</li>
<li>runtime: panic if <code>global_queue_interval</code> is zero (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6445">#6445</a>)</li>
<li>sync: always drop message in destructor for oneshot receiver (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6558">#6558</a>)</li>
<li>sync: instrument <code>Semaphore</code> for task dumps (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6499">#6499</a>)</li>
<li>sync: use FIFO ordering when waking batches of wakers (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6521">#6521</a>)</li>
<li>task: make <code>LocalKey::get</code> work with Clone types (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6433">#6433</a>)</li>
<li>tests: update nix and mio-aio dev-dependencies (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6552">#6552</a>)</li>
<li>time: clean up implementation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6517">#6517</a>)</li>
<li>time: lazily init timers on first poll (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6512">#6512</a>)</li>
<li>time: remove the <code>true_when</code> field in
<code>TimerShared</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6563">#6563</a>)</li>
<li>time: use sharding for timer implementation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6534">#6534</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>taskdump: allow building taskdump docs on non-unix machines (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6564">#6564</a>)</li>
<li>time: check for overflow in <code>Interval::poll_tick</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6487">#6487</a>)</li>
<li>sync: fix incorrect <code>is_empty</code> on mpsc block boundaries
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6603">#6603</a>)</li>
</ul>
<h3>Documented</h3>
<ul>
<li>fs: rewrite file system docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6467">#6467</a>)</li>
<li>io: fix <code>stdin</code> documentation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6581">#6581</a>)</li>
<li>io: fix obsolete reference in <code>ReadHalf::unsplit()</code>
documentation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6498">#6498</a>)</li>
<li>macros: render more comprehensible documentation for
<code>select!</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6468">#6468</a>)</li>
<li>net: add missing types to module docs (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6482">#6482</a>)</li>
<li>net: fix misleading <code>NamedPipeServer</code> example (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6590">#6590</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="14c17fc096"><code>14c17fc</code></a>
chore: prepare Tokio v1.38.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6601">#6601</a>)</li>
<li><a
href="65cbf730de"><code>65cbf73</code></a>
chore: prepare tokio-macros v2.3.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6600">#6600</a>)</li>
<li><a
href="dbf93c7184"><code>dbf93c7</code></a>
sync: fix incorrect is_empty on mpsc block boundaries (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6603">#6603</a>)</li>
<li><a
href="873cb8ae2f"><code>873cb8a</code></a>
runtime: move task out of the <code>lifo_slot</code> in
<code>block_in_place</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6596">#6596</a>)</li>
<li><a
href="97bb47b480"><code>97bb47b</code></a>
task: fix a typo in doc of <code>LocalSet::run_until</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6599">#6599</a>)</li>
<li><a
href="86658bd87d"><code>86658bd</code></a>
metrics: stabilize <code>RuntimeMetrics::worker_count</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6556">#6556</a>)</li>
<li><a
href="9e00b266e0"><code>9e00b26</code></a>
sync: add <code>Notify::notify_last</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6520">#6520</a>)</li>
<li><a
href="6c42d286b3"><code>6c42d28</code></a>
net: fix misleading <code>NamedPipeServer</code> example (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6590">#6590</a>)</li>
<li><a
href="3a6fdc0568"><code>3a6fdc0</code></a>
license: fix formatting and remove year in licenses (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6451">#6451</a>)</li>
<li><a
href="2890d0c3db"><code>2890d0c</code></a>
metrics: fix blocking_threads count (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6551">#6551</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.37.0...tokio-1.38.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio&package-manager=cargo&previous-version=1.37.0&new-version=1.38.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-06-05 07:45:38 +00:00
Reactor Scram
deefabd8f8 refactor(firezone-tunnel): move routes and DNS control out of connlib and up to the Client (#5111)
Refs #3636 (This pays down some of the technical debt from Linux DNS)
Refs #4473 (This partially fulfills it)
Refs #5068 (This is needed to make `FIREZONE_DNS_CONTROL` mandatory)

As of dd6421:

- On both Linux and Windows, DNS control and IP setting (i.e.
`on_set_interface_config`) both move to the Client
- On Windows, route setting stays in `tun_windows.rs`. Route setting in
Windows requires us to know the interface index, which we don't know in
the Client code. If we could pass opaque platform-specific data between
the tunnel and the Client it would be easy.
- On Linux, route setting moves to the Client and Gateway, which
completely removes the `worker` task in `tun_linux.rs`
- Notifying systemd that we're ready moves up to the headless Client /
IPC service

```[tasklist]
### Before merging / notes
- [x] Does DNS roaming work on Linux on `main`? I don't see where it hooks up. I think I only set up DNS in `Tun::new` (Yes, the `Tun` gets recreated every time we reconfigure the device)
- [x] Fix Windows Clients
- [x] Fix Gateway
- [x] Make sure connlib doesn't get the DNS control method from the env var (will be fixed in #5068)
- [x] De-dupe consts
- [ ] ~~Add DNS control test~~ (failed)
- [ ] Smoke test Linux
- [ ] Smoke test Windows
```
2024-06-03 14:32:08 +00:00
Reactor Scram
94cb494e0a refactor(gui-client): finish refactors from #4978 (#5158)
```[tasklist]
### Before opening for review
- [ ] ~~Wait for some other refactors to merge~~
- [x] Test Windows
- [x] Test Linux
```
2024-05-31 18:21:57 +00:00
dependabot[bot]
d52d519e7d build(deps): Bump serde_json from 1.0.116 to 1.0.117 in /rust (#5136)
Bumps [serde_json](https://github.com/serde-rs/json) from 1.0.116 to
1.0.117.
<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>v1.0.117</h2>
<ul>
<li>Resolve unexpected_cfgs warning (<a
href="https://redirect.github.com/serde-rs/json/issues/1130">#1130</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0ae247ca63"><code>0ae247c</code></a>
Release 1.0.117</li>
<li><a
href="4517c7a2d9"><code>4517c7a</code></a>
PartialEq is not implemented between Value and 128-bit ints</li>
<li><a
href="fdf99c7c38"><code>fdf99c7</code></a>
Combine number PartialEq tests</li>
<li><a
href="b4fc2451d7"><code>b4fc245</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/json/issues/1130">#1130</a>
from serde-rs/checkcfg</li>
<li><a
href="98f1a247de"><code>98f1a24</code></a>
Resolve unexpected_cfgs warning</li>
<li>See full diff in <a
href="https://github.com/serde-rs/json/compare/v1.0.116...v1.0.117">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.116&new-version=1.0.117)](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-05-29 22:28:25 +00:00
Reactor Scram
6408131809 chore(gui-client): Bubble up connlib panics as error dialogs in the GUI (#5098)
Closes #5046 

<img width="486" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/303a1307-5e37-4fce-886c-2deb5bd36ba0">

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-05-28 16:16:20 +00:00
Reactor Scram
bfffcedf47 refactor(gui-client): de-dupe IPC server code, enable debug IPC service for Linux (#5074)
Refs #5022

The debug IPC service has been useful on Windows, and since there is
more refactoring to do, I want it on Linux too.

With this you can just do `sudo -E target/debug/firezone-client-ipc
debug-ipc-service` and it will launch an IPC service without messing
with systemd or installing anything. (Assuming the directory for the
socket is created)

```[tasklist]
### Before merging
- [ ] Check for regressions in Windows
- [ ] Check for regressions in Linux
```
2024-05-28 14:37:03 +00:00
dependabot[bot]
c7b95b8fc0 build(deps): Bump serde from 1.0.197 to 1.0.203 in /rust (#5135)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.197 to
1.0.203.
<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.203</h2>
<ul>
<li>Documentation improvements (<a
href="https://redirect.github.com/serde-rs/serde/issues/2747">#2747</a>)</li>
</ul>
<h2>v1.0.202</h2>
<ul>
<li>Provide public access to RenameAllRules in serde_derive_internals
(<a
href="https://redirect.github.com/serde-rs/serde/issues/2743">#2743</a>)</li>
</ul>
<h2>v1.0.201</h2>
<ul>
<li>Resolve unexpected_cfgs warning (<a
href="https://redirect.github.com/serde-rs/serde/issues/2737">#2737</a>)</li>
</ul>
<h2>v1.0.200</h2>
<ul>
<li>Fix formatting of &quot;invalid type&quot; and &quot;invalid
value&quot; deserialization error messages containing NaN or infinite
floats (<a
href="https://redirect.github.com/serde-rs/serde/issues/2733">#2733</a>,
thanks <a
href="https://github.com/jamessan"><code>@​jamessan</code></a>)</li>
</ul>
<h2>v1.0.199</h2>
<ul>
<li>Fix ambiguous associated item when
<code>forward_to_deserialize_any!</code> is used on an enum with
<code>Error</code> variant (<a
href="https://redirect.github.com/serde-rs/serde/issues/2732">#2732</a>,
thanks <a
href="https://github.com/aatifsyed"><code>@​aatifsyed</code></a>)</li>
</ul>
<h2>v1.0.198</h2>
<ul>
<li>Support serializing and deserializing
<code>Saturating&lt;T&gt;</code> (<a
href="https://redirect.github.com/serde-rs/serde/issues/2709">#2709</a>,
thanks <a
href="https://github.com/jbethune"><code>@​jbethune</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d5bc546ca5"><code>d5bc546</code></a>
Release 1.0.203</li>
<li><a
href="45ae217728"><code>45ae217</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2747">#2747</a>
from dtolnay/variadic</li>
<li><a
href="b7b97dda73"><code>b7b97dd</code></a>
Unindent implementation inside tuple_impl_body macro</li>
<li><a
href="5d3c563d46"><code>5d3c563</code></a>
Document tuple impls as fake variadic</li>
<li><a
href="376185458b"><code>3761854</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2745">#2745</a>
from dtolnay/docsrs</li>
<li><a
href="a8f14840ab"><code>a8f1484</code></a>
Rely on docs.rs to define --cfg=docsrs by default</li>
<li><a
href="9e32a40b1c"><code>9e32a40</code></a>
Release 1.0.202</li>
<li><a
href="87f635e54d"><code>87f635e</code></a>
Release serde_derive_internals 0.29.1</li>
<li><a
href="d4b2dfbde2"><code>d4b2dfb</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2743">#2743</a>
from dtolnay/renameallrules</li>
<li><a
href="f6ab0bc56f"><code>f6ab0bc</code></a>
Provide public access to RenameAllRules in serde_derive_internals</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.197...v1.0.203">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.197&new-version=1.0.203)](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-05-27 21:16:16 +00:00
Reactor Scram
2416d4f45c docs(client): update Linux and Windows Client docs (#5007)
Closes #4995
Closes #4925
Closes #4997
Closes #5047 
Supersedes #4965 and #5004.

NOT changing:

- Page description for other Clients. That is still "Firezone
Documentation"

Need these Clients:

- Windows GUI
- Linux headless 
- Linux GUI

to have these things documented: (with exact terms)

- Prerequisites
- Installation
- Usage
  - Signing in
  - Accessing a Resource
  - Signing out
  - Quitting
- Upgrading
- Diagnostic logs
- Uninstalling
- Troubleshooting
  - DNS not reverted after exit
  - DNS Resource not accessible
- Known issues

```[tasklist]
### Before merging
- [x] Test Windows GUI instructions
- [x] Add troubleshooting for #5027
- [x] Fill in troubleshooting sections
- [x] Test Linux GUI instructions
- [x] Linux headless - Make sure SIGTERM or Ctrl+C or whatever reverts resolv.conf
- [x] Test Linux Headless instructions
- [x] Page descriptions should be "How to install and use the Firezone $OS $UI client."
- [x] ~~Linux headless - Confirm behaviors and default values of all env vars~~ (skipping - The ones that are used are exercised)
- [x] Grep for TODOs
- [x] Change "un-install" to "uninstall"
- [x] Capitalize "Client" where needed
- [x] Change "IPC service" to "Tunnel service" or something
- [x] Change "SplitDNS" to "Split DNS"
- [ ] Wait for next Client release to be cut
```

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-05-22 20:22:46 +00:00
Jamil
7c5669ef51 chore: bump version to 1.0.5 for linux/windows (#5093)
Just need a rubberstamp. This was generated with `make -f
scripts/Makefile version`
2024-05-22 18:25:12 +00:00
Reactor Scram
1ef775dee1 feat(windows-client): run the GUI and tunnel in separate processes (#4978)
Ready for review.

Closes #3712.
Supersedes #4940.
Refs #4963.

I haven't figured out if it needs any new automated tests (unit,
integration, etc.) but the code itself is ready for review. There is
more refactoring that could be done, or could be left for later.

```[tasklist]
- [x] Move wintun setup from GUI to IPC service / headless client
- [x] Make sure the device ID is in a sensible place
- [x] Export IPC service logs in the zips
- [x] Test GUI + SC IPC service on Windows (f4db808919a passed)
- [x] Make sure IPC service does not busy-loop
- [x] Test un-install checklist for Windows
- [x] Test upgrade checklist for Windows
- [x] Test GUI + systemd IPC service on Linux (c4ab7e7 passed)
- [x] Test upgrade checklist for Linux
- [x] Test un-install checklist for Linux
- [x] Make sure the IPC service logs out and deactivates DNS control if the GUI crashes
- [x] Test network changing
- [x] (it's intended behavior) ~~Look into spurious `on_update_resources` (fad86babd7)~~
- [x] ~~Test max partition time on offline laptop~~ (I ended up just setting a 30-day default in the code)
- [x] Make sure headless Client does not busy-loop
- [x] Test standalone headless on Linux
- [ ] Add unit / integration tests
- [ ] Think about security a bit #3971
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-05-20 21:37:29 +00:00
Reactor Scram
1bf42a0a8d chore(gui-client): log connlib on_disconnect errors in the IPC service (#5045)
Refs #5027, this will get a little more information about that issue
2024-05-20 20:11:55 +00:00
Gabi
a7d35cd5f1 feat(connlib): report resource status to client (#4931)
This PR introduces site's `Status`. That's used to report to the client
the status, either, unknown, online or offline, mostly as a hint to
users as what's wrong with a connection.

This are the criteria for an online or offline resource

* If all sites related to a resource are offline the resource is
considered offline, since there's no gateway that can respond to that
resource's connection
* If any site is online the resource is online, since that same peer can
be used to reach that resource
* Any other case is unknown

Right now resources are single site so it doesn't matter too much but
tracking online/offline per-site instead of per-gateway or resource
seems like the better long-term solution.

The way to "find out" the site's status is:

* If a response to a connection details is offline, all sites related to
that resource must be offline otherwise there would've been a gateway in
the response
* At the point we connect to a gateway, the site that corresponds to
that gateway must be online
* When a connection to a peer stops it's considered unknown again

Fixes #4738
2024-05-15 15:33:04 +00:00
Jamil
e50b3bd865 chore: bump versions for 1.0.4 release (#4985)
Update download links etc for the 1.0.4 release
2024-05-14 16:11:12 +00:00
Reactor Scram
b444dee1c9 refactor(headless-client): deprecate subcommands for now (#4953)
Closes #4907

They're still accepted, but the binary entirely determines the behavior.
This makes the code for CLI parsing and token handling simpler with
fewer branches, so it's easier to be sure it's correct.

Replaces #4942 which isn't doing what I intended anymore.
2024-05-13 16:05:44 +00:00
Reactor Scram
ca0de26c75 chore(ipc-service/linux): fix incorrect error message (#4976)
closes #4952

Forgot to use `format!` here
2024-05-13 15:59:14 +00:00
dependabot[bot]
26b181ef53 build(deps): Bump tokio-util from 0.7.10 to 0.7.11 in /rust (#4971)
Bumps [tokio-util](https://github.com/tokio-rs/tokio) from 0.7.10 to
0.7.11.
<details>
<summary>Commits</summary>
<ul>
<li><a
href="cdf9d997dc"><code>cdf9d99</code></a>
chore: prepare tokio-util v0.7.11 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6535">#6535</a>)</li>
<li><a
href="f6eb1ee196"><code>f6eb1ee</code></a>
time: lazily init timers on first poll (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6512">#6512</a>)</li>
<li><a
href="b7d4fba707"><code>b7d4fba</code></a>
sync: add <code>mpsc::Receiver::{capacity,max_capacity}</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6511">#6511</a>)</li>
<li><a
href="3c8d8e60ca"><code>3c8d8e6</code></a>
chore: fix latest rust-1.78.0 warnings (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6528">#6528</a>)</li>
<li><a
href="e971a5e7d7"><code>e971a5e</code></a>
util: use FIFO ordering in <code>WakeList</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6521">#6521</a>)</li>
<li><a
href="28439e2269"><code>28439e2</code></a>
time: clean up implementation (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6517">#6517</a>)</li>
<li><a
href="d33fdd86a3"><code>d33fdd8</code></a>
time: check for overflow in <code>Interval::poll_tick</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6487">#6487</a>)</li>
<li><a
href="731dde21dc"><code>731dde2</code></a>
runtime: clarify misleading use of <code>UnsafeCell::with_mut</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6513">#6513</a>)</li>
<li><a
href="9ed595767d"><code>9ed5957</code></a>
wasm: support rt-multi-thread with wasm32-wasi-preview1-threads (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6510">#6510</a>)</li>
<li><a
href="a73d6bf33a"><code>a73d6bf</code></a>
macros: <code>#[cfg(not(test))]</code> is no longer necessary for main
macros (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6508">#6508</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-util-0.7.10...tokio-util-0.7.11">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-05-13 14:53:29 +00:00
Reactor Scram
dadaeb072a fix(windows-client): clear Firezone-specific DNS rules at startup (#4918)
Closes #4899

This has a known gap where theoretically the GUI could sign in while the
service is hung in startup, and then the service would wipe out the
GUI's DNS rules.

The workaround for that would be to restart the GUI, but in practice I
think the gap will not be hit, and it will go away once #3712 is done
anyway.

I tested it manually once using the reproduction steps from #4899 and it
worked.
2024-05-13 14:51:14 +00:00
Reactor Scram
5814efc036 chore(windows-client): proof of concept for installing a system service with WiX (#4903)
```[tasklist]
### Before merging
- [x] Make sure the service auto-starts
- [x] Make the process idle and report its status to Windows properly using https://github.com/mullvad/windows-service-rs
- [x] DRY log dir code
- [x] Figure out where service logs will go and how the GUI will zip them
- [x] Make sure the service gets a shut down signal from Windows (this is hard to catch in the Tauri GUI)
- [x] Make sure the service restarts when Firezone is updated
- [x] Make sure the service is stopped and un-installed when Firezone is un-installed
- [x] Add test to install the MSI and check that the service runs
- [x] (will move to another PR) ~~Clean up function names~~
- [x] Make sure the Linux GUI was not broken by refactoring
```
2024-05-13 14:08:21 +00:00
Reactor Scram
0ad72f00d1 refactor(headless-client): remove "linux-client" alias (#4933)
Is this worth it?

```[tasklist]
### Before merging
- [x] Double-check docs and ask Jamil to review
- [x] Would need Brian to review the terraform thing
- [x] Make sure Docker compat isn't broken for existing users (shouldn't be, the image is still just `client`)
- [x] Decide whether compatibility tests need to pass (if something breaks after merge we can revert this)
```
2024-05-10 15:43:02 +00:00
Jamil
1be77d4e2d chore: Bump versions to link 1.0.3 packages (#4924)
Link to latest binaries

Generated with `make -f scripts/Makefile`.

Just need a rubber-stamp, changes should be GTG
2024-05-08 21:09:50 +00:00
Reactor Scram
da85408e27 refactor(gui-client): move known_dirs module into headless-client (#4908)
This should make it easier for the IPC services on both Linux and
Windows to write logs to well-known dirs that the GUI can read for
exporting zips.
2024-05-08 20:26:02 +00:00
Reactor Scram
cdebfa6901 chore(gui-client/linux): fix group name, firezone should be firezone-client (#4889)
Also improved the manual testing checklist a little
2024-05-06 14:09:30 +00:00
Reactor Scram
e8b1736cb0 chore(gui-client/linux): show an error if the user doesn't belong to the firezone group (#4822)
Ran into this during testing. For some reason Ubuntu 20.04, maybe
others, requires a reboot to add the desktop user to a group. I thought
logging out and back in should be enough but it's not.

<img width="527" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/4f7c2551-c7aa-4ecc-be55-66c6e6ac32a0">

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-05-03 14:04:21 +00:00
Reactor Scram
438469f3ac chore(linux-client): make headless client / IPC service logs group-readable (#4825)
```[tasklist]
# Before merging
- [x] Add CI test to check that the Unix domain socket is owned by `root:firezone` (#4832 will do this)
```

This allows the GUI (running as a normal user who belongs to the
`firezone` group) to read back the connlib logs and export them in the
zip file.

<img width="716" alt="image"
src="https://github.com/firezone/firezone/assets/13400041/59cb7cc5-fd6a-4b27-a311-1b9c56b7b23e">
2024-05-01 15:06:25 +00:00
Jamil
4dc656c90a chore(ci): bump versions (#4840) 2024-04-30 16:31:20 -07:00
Jamil
b79ce96bc6 chore(website): Bump versions (#4821)
- Bump versions to point to latest binaries
- Stage versions for next release
2024-04-29 22:06:00 +00:00