Commit Graph

1351 Commits

Author SHA1 Message Date
Thomas Eizinger
fe0807af37 ci: fix flaky integration test (#6245)
My attempts at fixing the flaky integration test with #6200 failed.
Unfortunately, we need to go back to a fork of str0m to fix this. I am
in discussion with the other maintainers on whether or not we can land
this patch.

Diff to upstream `str0m`:
https://github.com/algesten/str0m/compare/main...firezone:str0m:main
Example of a flaky test run:
https://github.com/firezone/firezone/actions/runs/10328744448/job/28595705615?pr=6237

Related: https://github.com/algesten/str0m/pull/489.
2024-08-12 17:05:36 +00:00
Thomas Eizinger
0abbf6bba9 refactor(rust): inline http-health-check crate into bin-shared (#6258)
Now that we have the `bin-shared` crate, it is easy to move the
health-check functionality into there. That allows us to get rid of a
crate which makes navigating the workspace a bit easier.
2024-08-12 16:44:52 +00:00
Thomas Eizinger
c94ae7b95b chore(connlib): better logging of resource activation (#6254)
Currently, the logging for which resources get activated and
de-activated is spread between the `dns` and `client` module. It also
doesn't include the sites that the resource is defined in.

The name of a resource alone is not enough to unique identify it. To fix
both of these papercuts, we move the logging to the `client` module and
include the sites in the log message.

The log messages now read like this:

```
2024-08-12T02:26:01.477844Z  INFO firezone_tunnel::client: Activating resource name=IPerf3 address=10.0.32.101/32 sites=AWS Dev (Gateways track `main`)
2024-08-12T02:26:01.477904Z  INFO firezone_tunnel::client: Activating resource name=*.slack.com address=*.slack.com sites=Vultr Stable (Latest Release Gateways)
2024-08-12T02:26:01.477942Z  INFO firezone_tunnel::client: Activating resource name=*.slack-edge.com address=*.slack-edge.com sites=Vultr Stable (Latest Release Gateways)
2024-08-12T02:26:01.477984Z  INFO firezone_tunnel::client: Activating resource name=*.spotify.com address=*.spotify.com sites=AWS Dev (Gateways track `main`)
```
2024-08-12 16:42:38 +00:00
Reactor Scram
e0d7bdcb43 fix(gui-client): opening a window twice brings it to the foreground (#6239)
Closes #6231

Tested manually in Linux and Windows aarch64 VMs, works fine

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-12 14:09:13 +00:00
Jamil
e7f8a4e4bf ci: bump apple / android versions (#6251)
These were approved and published so the versions need bumping.
2024-08-10 13:04:26 -07:00
Thomas Eizinger
93d678aaea feat(relay): set OTEL metadata for metrics and traces (#6249)
I recently discovered that the metrics reporting to Google Cloud Metrics
for the relays is actually working. Unfortunately, they are all bucketed
together because we don't set the metadata correctly.

This PR aims to fix that be setting some useful default metadata for
traces and metrics and additionally, discoveres instance ID and name
from GCE metadata.

Related: #2033.
2024-08-10 16:32:01 +00:00
Thomas Eizinger
bed625a312 chore(rust): make logging more ergonomic (#6237)
Setting up a logger is something that pretty much every entrypoint needs
to do, be it a test, a shared library embedded in another app or a
standalone application. Thus, it makes sense to introduce a dedicated
crate that allows us to bundle all the things together, how we want to
do logging.

This allows us to introduce convenience functions like
`firezone_logging::test` which allow you to construct a logger for a
test as a one-liner.

Crucially though, introducing `firezone-logging` gives us a place to
store a default log directive that silences very noisy crates. When
looking into a problem, it is common to start by simply setting the
log-filter to `debug`. Without further action, this floods the output
with logs from crates like `netlink_proto` on Linux. It is very unlikely
that those are the logs that you want to see. Without a preset filter,
the only alternative here is to explicitly turn off the log filter for
`netlink_proto` by typing something like
`RUST_LOG=netlink_proto=off,debug`. Especially when debugging issues
with customers, this is annoying.

Log filters can be overridden, i.e. a 2nd filter that matches the exact
same scope overrides a previous one. Thus, with this design it is still
possible to activate certain logs at runtime, even if they have silenced
by default.

I'd expect `firezone-logging` to attract more functionality in the
future. For example, we want to support re-loading of log-filters on
other platforms. Additionally, where logs get stored could also be
defined in this crate.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-10 05:17:03 +00:00
Gabi
db655dd171 feat(apple): permit resources to be disabled (#6215)
Work for #6074 equivalent to #6166 for MacOS

MacOs view:

<img width="547" alt="image"
src="https://github.com/user-attachments/assets/f465183e-247b-49b5-a916-3ecc5f0a02f4">


iOS(ipad) view:


![image](https://github.com/user-attachments/assets/e64da75a-c69f-4e6a-aeeb-739958c3b046)

Other than implementing the resource disabling, this PR also refactor
the IPC between the network extension and the app so that it's some form
of structured IPC instead of relying on it being deserializable to
string to match the message.

One big difference with Android is that we don't introduce the concept
of a `ResourceView` for swift, the main reason for this is that on iOS
the resources are bound to the view instead of just being a parameter
for creating the view. So if we modify the `disabled` property it'd
update the UI unnecessarily, also it'd update the `Store` value for the
resource and then we need to copy that over again to the view. Making it
easier to go out of sync.
2024-08-10 04:20:14 +00:00
Reactor Scram
a52f459da6 test(gui-client): add unit test for the elevation check (#6238)
This will always be elevated in CI, so just check that it doesn't crash.

This came up during debugging while I was offline, and I just want to
make CI check for regressions, since there's a lot of `unsafe` code in
the Windows impl
2024-08-10 04:18:05 +00:00
Thomas Eizinger
a87728b791 chore: remove connlib-shared dependency from bin-shared (#6229)
The `firezone-bin-shared` crate is meant to house non-tunnel related
things. That allows it to compile in parallel to everything else. It
currently only depends on `connlib-shared` to access the `DEFAULT_MTU`
constant. We can remove that by requiring the MTU as a ctor parameter of
`TunDeviceManager`.

A longer write-up of the intended dependency structure is in #4470.
2024-08-10 03:58:10 +00:00
Reactor Scram
68d934ee59 refactor(headless-client): remove unnecessary layering (#6211)
Refs #5754

The IPC service is still layered, but moving it around is more difficult
than moving the headless Client.
2024-08-09 14:10:21 +00:00
Thomas Eizinger
47a447c65a chore: prepare hotfix release for Tauri & headless clients (#6235) 2024-08-09 08:28:25 +00:00
Thomas Eizinger
4ae64f0257 fix(connlib): index forwarded DNS queries by ID + socket (#6233)
When forwarding DNS queries, we need to remember the original source
socket in order to send the response back. Previously, this mapping was
indexed by the DNS query ID. As it turns out, at least Windows doesn't
have a global DNS query ID counter and may reuse them across different
DNS servers. If that happens and two of these queries overlap, then we
match the wrong responses together.

In the best case, this produces bad DNS results on the client. In the
worst case, those queries were for DNS servers with different IP
versions in which case we triggered a panic in connlib further down the
stack where we created the IP packet for the response.

To fix this, we first and foremost remove the explicit `panic!` from the
`make::` functions in `ip-packet`. Originally, these functions were only
used in tests but we started to use them in production code too and
unfortunately forgot about this panic. By introducing a `Result`, all
call-sites are made aware that this can fail.

Second, we fix the actual indexing into the data structure for forwarded
DNS queries to also include the DNS server's socket. This ensures we
don't treat the DNS query IDs as globally unique.

Third, we replace the panicking path in
`try_handle_forwarded_dns_response` with a log statement, meaning if the
above assumption turns out wrong for some reason, we still don't panic
and simply don't handle the packet.
2024-08-09 07:01:57 +00:00
Jamil
67ae8ff380 ci: publish Gateway 1.1.4 (#6228)
Publishes the `ENABLE_MASQUERADE` removal.
2024-08-09 03:45:26 +00:00
Thomas Eizinger
bc1ab58c93 test(connlib): assign at least one gateway to each site (#6201)
I believe this is the cause of some flakiness in the proptests.
Sometimes, we would end up with a site that did not have any gateways
assigned.

Example of a failing test:
https://github.com/firezone/firezone/actions/runs/10280367072/job/28447560561?pr=6200.
2024-08-09 02:16:04 +00:00
Thomas Eizinger
da296038b9 fix(connlib): emit candidates in reverse-priority order (#6200)
I noticed we sometimes have a flaky integration test with an ICE timeout
in its logs. For example:
https://github.com/firezone/firezone/actions/runs/10278933741/job/28443578376

Analyzing this one more closely turned out to be caused by a race
condition between client and gateway, when they exchange their ICE
candidates.

We send ICE candidates in batches but because they are serialized to
strings early, their ordering actually depends on the so-called
"foundation" of the ICE candidates. that one is simply a hash of several
components. As a result, the ordering of these candidates can vary
between test runs.

We should try ICE candidates in order of their reverse-priority (i.e.
best first). By introducing a helper-collection, we can enforce this
ordering before sending ICE candidates across.
2024-08-09 01:29:38 +00:00
Jamil
a6ba9868dd ci: Revert bumps to 1.2 (#6227)
We need these at 1.1 until ready to release.
2024-08-08 18:34:39 -07:00
Thomas Eizinger
d315b14b2f fix(linux): disable LLMNR on TUN interface (#6219)
LLMNR is a deprecated [0] protocol and we shouldn't advertise it on our
TUN interface. With LLMNR, name resolutions for hosts (i.e. single-label
domains) that are not found via search domains on other interfaces (like
a WiFI or Ethernet adapter) end up failing with "refused" instead of the
appropriate NXDOMAIN.

For example, my WiFi card has the `fritz.box` search domain assigned via
DHCP. This allows me to lookup hosts on my local network. Searching for
a host `foo` that doesn't exist currently fails with "refused":

```
❯ host foo
Host foo not found: 5(REFUSED)
```

By disabling LLMNR, we get the expected "nxdomain":

```
❯ host foo
Host foo not found: 3(NXDOMAIN)
```

To make configuring things via `resolvectl` more ergonomic, I extracted
out a helper function.

Related: #6218.

[0]:
https://techcommunity.microsoft.com/t5/networking-blog/aligning-on-mdns-ramping-down-netbios-name-resolution-and-llmnr/ba-p/3290816
2024-08-08 20:40:36 +00:00
Jamil
096ddfe7c5 ci: bump gui/headless to 1.1.10 (#6221)
To publish the mpsc channel fix.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-08 16:20:20 +00:00
Thomas Eizinger
128d0eb407 feat(connlib): transparently forward non-resources DNS queries (#6181)
Currently, `connlib` depends on `hickory-resolver` to perform DNS
queries for non-resources. This is unnecessary. Instead of buffering the
original UDP DNS query, consulting hickory to resolve the name and
mapping the response back, we can simply take the UDP payload and send
it via our protected socket directly to the original upstream DNS
server.

This ensures `connlib` is as transparent as possible for DNS queries for
non-resources. Additionally, it removes a lot of error handling and
other cruft that we currently have to perform because we are using
hickory. For example, hickory will automatically retry a DNS query after
a certain timeout. However, the OS / client talking to `connlib` will
also retry after a certain timeout because it is making DNS queries over
an unreliable transport (UDP). It is thus unnecessary for us to do that
internally.

To correctly test this change, our test-suite needed some refactoring.
Specifically, DNS servers are now modelled as dedicated `Host`s that can
receive (UDP) traffic.

Lastly, we can remove our dependency on `hickory-proto` and
`hickory-resolver` everywhere and only use `domain` for parsing DNS
messages.

Resolves: #6141.
Related: #6033.
Related: #4800. (Impossible to happen with this design)
2024-08-07 08:54:49 +00:00
Thomas Eizinger
376900ca4e refactor(connlib): simplify sampling of initial state (#6194)
Instead of having one giant, composed strategy, we introduce a dedicated
`stub_portal` strategy. That one samples what is defined in the portal
in production: sites, gateways and resources.

Based on a sampled portal, we can then sample gateways, a client and DNS
records for our resources.
2024-08-07 06:07:39 +00:00
Thomas Eizinger
423d70854b chore(connlib): fix clippy warnings (#6190) 2024-08-07 05:46:11 +00:00
Thomas Eizinger
a282208f0b chore(connlib): minimize debug print of DnsServer (#6191)
The `DnsServer` struct is quite nested. All it really contains
(currently) is a `SocketAddr`. To make logs containing this structure
easier to use, only print the inner address on debug.
2024-08-07 05:46:04 +00:00
Thomas Eizinger
dda6adecf2 chore(connlib): log when we are updating DNS servers (#6192) 2024-08-07 04:27:35 +00:00
Thomas Eizinger
a81f5128e5 refactor(connlib): don't manually build DNS responses (#6193)
Resolves: #5540.
2024-08-07 04:27:27 +00:00
Thomas Eizinger
622fa63535 fix(ci): always install curl (#6189)
CI on `main` runs against the `release` images which had `curl` removed
in #6169.
2024-08-07 04:15:30 +00:00
Thomas Eizinger
94527f9fa1 fix(gateway): always masquerade for docker-deployed gateways (#6169)
Without masquerading, packets sent by the gateway through the TUN
interface use the wrong source address (the TUN device's address)
instead of the gateway's actual network interface.

We set this env variable in all our uses of the gateway, thus we might
as well remove it and always perform unconditionally.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-07 03:00:50 +00:00
Reactor Scram
0cb96d5e37 chore(gui-client/windows): throw an error if the GUI runs as admin (#6176)
Closes #5878

It won't work properly as admin (deep links will all fail), and this
improves UX by making it obvious that admin powers are no longer needed
for the GUI.

```[tasklist]
- [x] Write up `SAFETY` comments
```
2024-08-07 01:22:59 +00:00
Reactor Scram
5b75e8714a feat(client/tauri): allow users to favorite specific Resources and hide the rest (#5923)
Refs #5123

Looking at a Resource when nothing is favorited
<img width="504" alt="image"
src="https://github.com/user-attachments/assets/4c3bc1da-4645-40c1-84a4-3e3425a0fea3">

Looking at a favorited Resource
<img width="515" alt="image"
src="https://github.com/user-attachments/assets/22140f81-5453-41fd-9071-9c999b3151b1">

Looking at a non-favorited Resource
<img width="497" alt="image"
src="https://github.com/user-attachments/assets/84deddb1-8a05-4b78-9dfa-a8a60ca86831">


```[tasklist]
- [x] Double-check that the Resources are sorted alphabetically (or whatever) and leave a comment where they're sorted
- [x] String changes
- [x] Move "Add" and "Remove" down to a different section
- [x] Fix empty favorites menu
- [ ] Wait for other Clients to sync
- [ ] Merge
```

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-06 22:36:52 +00:00
Shantanu Gadgil
22c7414cd1 environmentfile optional to suppress warning in logs (#6151)
environmentfile optional to suppress warning in logs

---------

Signed-off-by: Shantanu Gadgil <shantanugadgil@users.noreply.github.com>
2024-08-06 12:55:51 -07:00
Reactor Scram
5eb2bba47b feat(headless-client): use systemd-resolved DNS control by default (#6163)
Closes #5063, supersedes #5850 

Other refactors and changes made as part of this:

- Adds the ability to disable DNS control on Windows
- Removes the spooky-action-at-a-distance `from_env` functions that used
to be buried in `tunnel`
- `FIREZONE_DNS_CONTROL` is now a regular `clap` argument again

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-06 18:16:51 +00:00
Reactor Scram
30622da24f fix(client): increase mpsc channel size (#6184)
Mitigates #5880.

This should fix the issue for all practical purposes, but we don't need
a channel there, so it does not close the ticket. A more permanent fix
would involve factoring out the callbacks or cheating and using a Mutex
inside the callbacks to do a swap-and-notify thing.

This affects both the Headless Client and the GUI Client's IPC service,
on both Linux and Windows.
2024-08-06 17:18:37 +00:00
Gabi
a2d849087a feat(android): add setDisabledResources FFI (#6166)
Builds on top of  #6164

Part of the effor towards
https://github.com/firezone/firezone/issues/6074

Prepares connlib to call `setDisableResource` from android.

Furthermore, we add a `disablable` parameter for resources which default
to false for now, in the future the portal will set it for the internet
resource, and further in the future it may be used for other resources.

The `disablable` parameter only affect UI.
2024-08-05 22:43:27 +00:00
dependabot[bot]
f4429cf6ec build(deps): Bump domain from 0.10.0 to 0.10.1 in /rust (#6080)
Bumps [domain](https://github.com/nlnetlabs/domain) from 0.10.0 to
0.10.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/nlnetlabs/domain/releases">domain's
releases</a>.</em></p>
<blockquote>
<h2>0.10.1</h2>
<p>New</p>
<ul>
<li>Allow AllRecordData’s parsing impls to accept an unsized [u8] as the
source octets. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Made <code>sign::records::FamilyName</code> public. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/312">#312</a>
by [<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Added an impl of <code>FromStr</code> for <code>Question</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/317">#317</a>)</li>
</ul>
<p>Bug fixes</p>
<ul>
<li>Accept an empty record type bitmap when scanning NSEC/NSEC3 data.
(<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Fix serialization of ProtoRrsig to conform with RFC 4034. ([#313 by
[<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Add <code>?Sized</code> bounds to <code>Message::is_answer</code>
and <code>ParsedRecord::to_record</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a href="https://github.com/xofyarg"><code>@​xofyarg</code></a>], <a
href="https://redirect.github.com/nlnetlabs/domain/issues/325">#325</a>
by [<a href="https://github.com/hunts"><code>@​hunts</code></a>])</li>
<li>Bring back <code>MessageBuilder::as_target</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Bring back <code>impl FreezeBuilder for StaticCompressor</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li><code>sign::records::RecordsIter::skip_before</code> now stops at
the first name in zone even if the apex itself doesn’t appear. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/314">#314</a>
by [<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Fix a counting error in <code>SliceLabelsIter::next</code> that
broke compression via <code>StaticCompressor</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/321">#321</a>
by [<a href="https://github.com/hunts"><code>@​hunts</code></a>])</li>
</ul>
<p>Unstable features</p>
<ul>
<li>New unstable feature <code>unstable-stelline</code> for the Stelline
testing framework as a “normal” module of <em>domain.</em> (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/315">#315</a>)</li>
<li>Renamed the domain name types in <code>zonetree</code> from
<code>Dname</code> to <code>Name</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/308">#308</a>)</li>
</ul>
<p>Other changes</p>
<ul>
<li>The minimum Rust version is now 1.78. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/320">#320</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/nlnetlabs/domain/issues/308">#308</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/308">NLnetLabs/domain#308</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/310">NLnetLabs/domain#310</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/312">#312</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/312">NLnetLabs/domain#312</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/314">#314</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/314">NLnetLabs/domain#314</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/315">#315</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/315">NLnetLabs/domain#315</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/317">#317</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/317">NLnetLabs/domain#317</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/318">NLnetLabs/domain#318</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/320">#320</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/320">NLnetLabs/domain#320</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/321">#321</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/321">NLnetLabs/domain#321</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/325">#325</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/325">NLnetLabs/domain#325</a>
[<a href="https://github.com/achow101"><code>@​achow101</code></a>]: <a
href="https://github.com/achow101">https://github.com/achow101</a>
[<a href="https://github.com/hunts"><code>@​hunts</code></a>]: <a
href="https://github.com/hunts">https://github.com/hunts</a>
[<a href="https://github.com/xofyarg"><code>@​xofyarg</code></a>]: <a
href="https://github.com/xofyarg">https://github.com/xofyarg</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/NLnetLabs/domain/blob/main/Changelog.md">domain's
changelog</a>.</em></p>
<blockquote>
<h2>0.10.1</h2>
<p>Release 2024-06-03.</p>
<p>New</p>
<ul>
<li>Allow AllRecordData’s parsing impls to accept an unsized [u8] as the
source octets. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Made <code>sign::records::FamilyName</code> public. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/312">#312</a>
by [<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Added an impl of <code>FromStr</code> for <code>Question</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/317">#317</a>)</li>
</ul>
<p>Bug fixes</p>
<ul>
<li>Accept an empty record type bitmap when scanning NSEC/NSEC3 data.
(<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Fix serialization of ProtoRrsig to conform with RFC 4034. ([#313 by
[<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Add <code>?Sized</code> bounds to <code>Message::is_answer</code>
and <code>ParsedRecord::to_record</code>.
(<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a href="https://github.com/xofyarg"><code>@​xofyarg</code></a>], <a
href="https://redirect.github.com/nlnetlabs/domain/issues/325">#325</a>
by [<a href="https://github.com/hunts"><code>@​hunts</code></a>])</li>
<li>Bring back <code>MessageBuilder::as_target</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li>Bring back <code>impl FreezeBuilder for StaticCompressor</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>
by [<a
href="https://github.com/xofyarg"><code>@​xofyarg</code></a>])</li>
<li><code>sign::records::RecordsIter::skip_before</code> now stops at
the first name in
zone even if the apex itself doesn’t appear. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/314">#314</a>
by [<a
href="https://github.com/achow101"><code>@​achow101</code></a>])</li>
<li>Fix a counting error in <code>SliceLabelsIter::next</code> that
broke compression
via <code>StaticCompressor</code>. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/321">#321</a>
by [<a href="https://github.com/hunts"><code>@​hunts</code></a>])</li>
</ul>
<p>Unstable features</p>
<ul>
<li>New unstable feature <code>unstable-stelline</code> for the Stelline
testing
framework as a “normal” module of <em>domain.</em> (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/315">#315</a>)</li>
<li>Renamed the domain name types in <code>zonetree</code> from
<code>Dname</code> to <code>Name</code>.
(<a
href="https://redirect.github.com/nlnetlabs/domain/issues/308">#308</a>)</li>
</ul>
<p>Other changes</p>
<ul>
<li>The minimum Rust version is now 1.78. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/320">#320</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/nlnetlabs/domain/issues/308">#308</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/308">NLnetLabs/domain#308</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/310">#310</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/310">NLnetLabs/domain#310</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/312">#312</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/312">NLnetLabs/domain#312</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/314">#314</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/314">NLnetLabs/domain#314</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/315">#315</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/315">NLnetLabs/domain#315</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/317">#317</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/317">NLnetLabs/domain#317</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/318">NLnetLabs/domain#318</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/320">#320</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/320">NLnetLabs/domain#320</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/321">#321</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/321">NLnetLabs/domain#321</a>
<a
href="https://redirect.github.com/nlnetlabs/domain/issues/325">#325</a>:
<a
href="https://redirect.github.com/NLnetLabs/domain/pull/325">NLnetLabs/domain#325</a>
[<a href="https://github.com/achow101"><code>@​achow101</code></a>]: <a
href="https://github.com/achow101">https://github.com/achow101</a>
[<a href="https://github.com/hunts"><code>@​hunts</code></a>]: <a
href="https://github.com/hunts">https://github.com/hunts</a>
[<a href="https://github.com/xofyarg"><code>@​xofyarg</code></a>]: <a
href="https://github.com/xofyarg">https://github.com/xofyarg</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b65cc98d7f"><code>b65cc98</code></a>
Release 0.10.1. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/326">#326</a>)</li>
<li><a
href="161339b76f"><code>161339b</code></a>
Update README (a bit).</li>
<li><a
href="5f96282389"><code>5f96282</code></a>
Update changelog.</li>
<li><a
href="dab2a90563"><code>dab2a90</code></a>
Refactor pointer casts to transmutes and annotate with repr(transparent)
(<a
href="https://redirect.github.com/nlnetlabs/domain/issues/324">#324</a>)</li>
<li><a
href="d4f120a205"><code>d4f120a</code></a>
allow create real resource record from unsized data (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/325">#325</a>)</li>
<li><a
href="ac63ab239b"><code>ac63ab2</code></a>
Impl FromStr for Question and use it in Stelline. (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/317">#317</a>)</li>
<li><a
href="c72f07eb47"><code>c72f07e</code></a>
Remove (direct) dependency on <code>hex</code> and
<code>pin-project-lite</code> (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/323">#323</a>)</li>
<li><a
href="7c399fcb56"><code>7c399fc</code></a>
Update changelog.</li>
<li><a
href="42c0d4495e"><code>42c0d44</code></a>
Don't skip children of apex in SortedRecords (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/314">#314</a>)</li>
<li><a
href="57f3475b3f"><code>57f3475</code></a>
add some missing methods/trait bounds (<a
href="https://redirect.github.com/nlnetlabs/domain/issues/318">#318</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/nlnetlabs/domain/compare/v0.10.0...v0.10.1">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-05 22:40:49 +00:00
Gabi
181b81d24a feat(connlib): allow users to disable resources (#6164)
This is just the API part for #6074

We expose a new API `set_disabled_resources` which given a set of
resource ids it does the following:
* Disconnect any active connection depending only on this resource
* Prevent any new connection with that resource id being established

The `set_disabled_resources` API is purposely not stateful. In other
words, resources cannot be incrementally enabled or disabled. Instead,
clients always need to send the latest state, i.e. all resources that
should be disabled. `connlib` will figure out the diff and correctly
enable / disable resources as necessary. Thus, enabling a resource is
done by calling `set_disabled_resources` without the previously disabled
resource ID.

Initially, this will only be used for the internet resource but the use
can be expanded for any other resource.
2024-08-05 21:13:04 +00:00
dependabot[bot]
8352255499 build(deps): Bump serde from 1.0.203 to 1.0.204 in /rust (#6173)
Bumps [serde](https://github.com/serde-rs/serde) from 1.0.203 to
1.0.204.
<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.204</h2>
<ul>
<li>Apply #[diagnostic::on_unimplemented] attribute on Rust 1.78+ to
suggest adding serde derive or enabling a &quot;serde&quot; feature flag
in dependencies (<a
href="https://redirect.github.com/serde-rs/serde/issues/2767">#2767</a>,
thanks <a
href="https://github.com/weiznich"><code>@​weiznich</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="18dcae0a77"><code>18dcae0</code></a>
Release 1.0.204</li>
<li><a
href="58c307f9cc"><code>58c307f</code></a>
Alphabetize list of rustc-check-cfg</li>
<li><a
href="8cc4809414"><code>8cc4809</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2769">#2769</a>
from dtolnay/onunimpl</li>
<li><a
href="1179158def"><code>1179158</code></a>
Update ui test with diagnostic::on_unimplemented from PR 2767</li>
<li><a
href="91aa40e749"><code>91aa40e</code></a>
Add ui test of unsatisfied serde trait bound</li>
<li><a
href="595019e979"><code>595019e</code></a>
Cut test_suite from workspace members in old toolchain CI jobs</li>
<li><a
href="b0d7917f88"><code>b0d7917</code></a>
Pull in trybuild 'following types implement trait' fix</li>
<li><a
href="8e6637a1e4"><code>8e6637a</code></a>
Merge pull request <a
href="https://redirect.github.com/serde-rs/serde/issues/2767">#2767</a>
from weiznich/feature/diagnostic_on_unimplemented</li>
<li><a
href="694fe05953"><code>694fe05</code></a>
Use the <code>#[diagnostic::on_unimplemented]</code> attribute when
possible</li>
<li><a
href="f3dfd2a237"><code>f3dfd2a</code></a>
Suppress dead code warning in test of unit struct remote derive</li>
<li>Additional commits viewable in <a
href="https://github.com/serde-rs/serde/compare/v1.0.203...v1.0.204">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.203&new-version=1.0.204)](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-05 11:05:11 +00:00
Thomas Eizinger
aea399de14 build(deps): use upstream str0m (#5745)
With the adoption of #5080, connlib is now resilient against temporarily
failed connections as they'll be immediately re-established. Thus, we no
longer need any of the patches that we are currently maintaining in our
str0m fork.

The only difference is an adjustment of the ICE timeout parameters but
those can be made configurable in str0m.

Related: https://github.com/algesten/str0m/pull/537.
2024-08-02 22:42:58 +00:00
Reactor Scram
2ee64b782e chore(gui-client): reduce "building tray menu" logs to DEBUG (#6150)
I don't remember why I had this at INFO but with the new status stuff it
results in a lot of noise in the logs.
2024-08-02 20:43:35 +00:00
Jamil
51e0b61c9c chore: Bump all clients and gateway versions (#6149)
Includes major fixes https://github.com/firezone/firezone/pull/6143 and
https://github.com/firezone/firezone/pull/6117
2024-08-02 01:12:49 -07:00
Gabi
abfd378fe9 fix(connlib): Disable hickory cache (#6143)
This seems to fix #6033 

What **seems** to be happening is that sometimes responses are delayed
and hickory cache the negative response.

We disable the cache, and the multiple attempts to be as transparent as
possible until #6141 is implemented.

Furthermore, the lack of recursion available in responses can cause
issues in some clients and enabling it shouldn't cause any problems.
2024-08-01 23:59:24 -07:00
Thomas Eizinger
226389a25a fix(connlib): be resilient against network-partitioned relays (#6117)
When a relay disconnects from the portal, either during deployment or
because of a network partition, the portal sends us a `relays_presence`
event. This allows us to discontinue use of a relay. Any connections
that currently use that relay get cut and the next packet reestablishes
a new one.

In the case of relays being re-deployed, their state is gone entirely
and we will receive new relays to use. In the case of a network
partition, the relay would have retained its state but we have already
discarded ours locally. Only one allocation per client (identified by
its 3-tuple) is allowed, so making a new allocation on that relay would
fail.

In order to sync up this inconsistency, we delete our current allocation
and make a new one if we detect this case. To test this, we introduce a
new state transition to `tunnel_test` that simulates such a network
partition.

In addition, we also remove the "upsert" behaviour of relays. The
credentials of a relay can only change if it reboots. Rebooting would
trigger a `relays_presence` event and tell us to disconnect from that
relay. Thus, receiving a relay that we already know is guaranteed to use
the same credentials.

Removal of this upserting behaviour is essentially the fix for #6067.
Due to a portal bug (#6099), we may receive a relay as connected that is
in fact shutting down. In case a channel needs to be refreshed on
exactly that relay - whilst we are trying to refresh the allocation it
as part of upserting - causes a busy loop of attempting to queue a
message but failing to do so because we haven't chosen an
`active_socket` yet for that relay.

Fixes: #6067.
2024-08-02 05:21:37 +00:00
Reactor Scram
23161ec840 chore(gui-client): release 1.1.8 (#6136)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-01 21:58:18 +00:00
dependabot[bot]
8f17ef933b build(deps-dev): Bump tailwindcss from 3.4.6 to 3.4.7 in /rust/gui-client (#6125)
Bumps [tailwindcss](https://github.com/tailwindlabs/tailwindcss) from
3.4.6 to 3.4.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/tailwindcss/releases">tailwindcss's
releases</a>.</em></p>
<blockquote>
<h2>v3.4.7</h2>
<h3>Fixed</h3>
<ul>
<li>Fix class detection in Slim templates with attached attributes and
ID (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/14019">#14019</a>)</li>
<li>Ensure attribute values in <code>data-*</code> and
<code>aria-*</code> modifiers are always quoted in the generated CSS (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/14037">#14037</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tailwindlabs/tailwindcss/blob/v3.4.7/CHANGELOG.md">tailwindcss's
changelog</a>.</em></p>
<blockquote>
<h2>[3.4.7] - 2024-07-25</h2>
<h3>Fixed</h3>
<ul>
<li>Fix class detection in Slim templates with attached attributes and
ID (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/14019">#14019</a>)</li>
<li>Ensure attribute values in <code>data-*</code> and
<code>aria-*</code> modifiers are always quoted in the generated CSS (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/pull/14037">#14037</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9824cb64a0"><code>9824cb6</code></a>
Update version in package.json</li>
<li><a
href="aa6c10f67f"><code>aa6c10f</code></a>
Add missing heading to changelog</li>
<li><a
href="245058c7fd"><code>245058c</code></a>
Update changelog for v3.4.7</li>
<li><a
href="605d8cd5eb"><code>605d8cd</code></a>
Update CHANGELOG.md</li>
<li><a
href="680c55c11c"><code>680c55c</code></a>
Normalize attribute selector for <code>data-*</code> and
<code>aria-*</code> modifiers (<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/issues/14037">#14037</a>)</li>
<li><a
href="866860e6a6"><code>866860e</code></a>
Print eventual lightning CSS parsing errors when the CSS matcher fail
(<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/issues/14034">#14034</a>)</li>
<li><a
href="bdc87ae1d7"><code>bdc87ae</code></a>
Fix class detection in Slim templates with attached attributes and IDs
(<a
href="https://redirect.github.com/tailwindlabs/tailwindcss/issues/14019">#14019</a>)</li>
<li>See full diff in <a
href="https://github.com/tailwindlabs/tailwindcss/compare/v3.4.6...v3.4.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tailwindcss&package-manager=npm_and_yarn&previous-version=3.4.6&new-version=3.4.7)](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-01 14:52:47 +00:00
dependabot[bot]
122f11892c build(deps-dev): Bump @types/node from 20.14.12 to 22.0.2 in /rust/gui-client (#6124)
Bumps
[@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node)
from 20.14.12 to 22.0.2.
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@types/node&package-manager=npm_and_yarn&previous-version=20.14.12&new-version=22.0.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-01 14:15:15 +00:00
Jamil
09c108cd20 fix(connlib): make Relay connectivity error log at ERROR level (#6105)
This almost always indicate a user-impacting connectivity error. For
customers troubleshooting their Gateways by greping for `ERROR`, this
will make these much easier to find.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-01 01:07:45 +00:00
Gabi
5841f297a5 fix(gateway): prevent routing loops (#6096)
In some weird conditions there might be routing loops in the gateway
too, so this fixes it and it doesn't do any harm.

Could be the cause behind [these
logs](https://github.com/firezone/firezone/issues/6067#issuecomment-2259081958)
2024-07-30 22:29:38 +00:00
Thomas Eizinger
64d2d89542 test(connlib): add coverage for the Internet Resource (#6089)
With the upcoming feature of full-route tunneling aka an "Internet
Resource", we need to expand the reference state machine in
`tunnel_test`. In particular, packets to non-resources will now be
routed the gateway if we have previously activated the Internet
resource.

This is reasonably easy to model as we can see from the small diff.

Because `connlib` doesn't actually support the Internet resource yet,
the code snippet for where it is added to the list of all possible
resources to sample from is commented out.
2024-07-30 22:04:38 +00:00
Thomas Eizinger
a25e1d10f0 chore: optimise tunnel_test debug output (#6088)
When `tunnel_test` fails, it prints the initial state in verbose debug
formatting. Most of the fields in `RefClient` track state _during_ the
runtime of the test and are all empty initially. The same thing applies
to `Host`.

To make this output easier to read and scroll, we ignore some of these
fields in the debug output.
2024-07-30 21:15:48 +00:00
Thomas Eizinger
308d49865d build(deps): remove proptest fork (#6084)
The bugfix we have been waiting on has been merged and thus we no longer
need to rely on our fork.

Related: https://github.com/proptest-rs/proptest/pull/482.
2024-07-30 21:14:13 +00:00
dependabot[bot]
bd49298240 build(deps): Bump tokio from 1.38.0 to 1.39.2 in /rust (#6082)
Bumps [tokio](https://github.com/tokio-rs/tokio) from 1.38.0 to 1.39.2.
<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.39.2</h2>
<h1>1.39.2 (July 27th, 2024)</h1>
<p>This release fixes a regression where the <code>select!</code> macro
stopped accepting expressions that make use of temporary lifetime
extension. (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6722">#6722</a>)</p>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/6722">#6722</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6722">tokio-rs/tokio#6722</a></p>
<h2>Tokio v1.39.1</h2>
<h1>1.39.1 (July 23rd, 2024)</h1>
<p>This release reverts &quot;time: avoid traversing entries in the time
wheel twice&quot; because it contains a bug. (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6715">#6715</a>)</p>
<p><a
href="https://redirect.github.com/tokio-rs/tokio/issues/6715">#6715</a>:
<a
href="https://redirect.github.com/tokio-rs/tokio/pull/6715">tokio-rs/tokio#6715</a></p>
<h2>Tokio v1.39.0</h2>
<h1>1.39.0 (July 23rd, 2024)</h1>
<ul>
<li>This release bumps the MSRV to 1.70. (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6645">#6645</a>)</li>
<li>This release upgrades to mio v1. (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6635">#6635</a>)</li>
<li>This release upgrades to windows-sys v0.52 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6154">#6154</a>)</li>
</ul>
<h3>Added</h3>
<ul>
<li>io: implement <code>AsyncSeek</code> for <code>Empty</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6663">#6663</a>)</li>
<li>metrics: stabilize <code>num_alive_tasks</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6619">#6619</a>,
<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6667">#6667</a>)</li>
<li>process: add <code>Command::as_std_mut</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6608">#6608</a>)</li>
<li>sync: add <code>watch::Sender::same_channel</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6637">#6637</a>)</li>
<li>sync: add
<code>{Receiver,UnboundedReceiver}::{sender_strong_count,sender_weak_count}</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6661">#6661</a>)</li>
<li>sync: implement <code>Default</code> for <code>watch::Sender</code>
(<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6626">#6626</a>)</li>
<li>task: implement <code>Clone</code> for <code>AbortHandle</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6621">#6621</a>)</li>
<li>task: stabilize <code>consume_budget</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6622">#6622</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>io: improve panic message of <code>ReadBuf::put_slice()</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6629">#6629</a>)</li>
<li>io: read during write in <code>copy_bidirectional</code> and
<code>copy</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6532">#6532</a>)</li>
<li>runtime: replace <code>num_cpus</code> with
<code>available_parallelism</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6709">#6709</a>)</li>
<li>task: avoid stack overflow when passing large future to
<code>block_on</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6692">#6692</a>)</li>
<li>time: avoid traversing entries in the time wheel twice (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6584">#6584</a>)</li>
<li>time: support <code>IntoFuture</code> with <code>timeout</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6666">#6666</a>)</li>
<li>macros: support <code>IntoFuture</code> with <code>join!</code> and
<code>select!</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6710">#6710</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>docs: fix docsrs builds with the fs feature enabled (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6585">#6585</a>)</li>
<li>io: only use short-read optimization on known-to-be-compatible
platforms (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6668">#6668</a>)</li>
<li>time: fix overflow panic when using large durations with
<code>Interval</code> (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6612">#6612</a>)</li>
</ul>
<h3>Added (unstable)</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f602eae499"><code>f602eae</code></a>
chore: prepare Tokio v1.39.2 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6730">#6730</a>)</li>
<li><a
href="438def7957"><code>438def7</code></a>
macros: allow temporary lifetime extension in select (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6722">#6722</a>)</li>
<li><a
href="ee8d4d1b05"><code>ee8d4d1</code></a>
chore: fix ci failures (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6725">#6725</a>)</li>
<li><a
href="3297052763"><code>3297052</code></a>
ci: test Quinn in CI (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6719">#6719</a>)</li>
<li><a
href="f8fe0ffb23"><code>f8fe0ff</code></a>
chore: prepare Tokio v1.39.1 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6716">#6716</a>)</li>
<li><a
href="47210a8e6e"><code>47210a8</code></a>
time: revert &quot;avoid traversing entries in the time wheel
twice&quot; (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6715">#6715</a>)</li>
<li><a
href="29545d9037"><code>29545d9</code></a>
runtime: ignore many_oneshot_futures test for alt scheduler (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6712">#6712</a>)</li>
<li><a
href="48e35c11d9"><code>48e35c1</code></a>
chore: release Tokio v1.39.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6711">#6711</a>)</li>
<li><a
href="dd1d37167d"><code>dd1d371</code></a>
macros: accept <code>IntoFuture</code> args for macros (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6710">#6710</a>)</li>
<li><a
href="6a1a7b1591"><code>6a1a7b1</code></a>
chore: prepare tokio-macros v2.4.0 (<a
href="https://redirect.github.com/tokio-rs/tokio/issues/6707">#6707</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/tokio/compare/tokio-1.38.0...tokio-1.39.2">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.38.0&new-version=1.39.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-07-30 20:45:35 +00:00