Commit Graph

1304 Commits

Author SHA1 Message Date
Thomas Eizinger
eeadde0c86 ci: bump Ubuntu runners to 24.04 (#10288)
Ubuntu 22.04 is over 3 years old and therefore ships with quite an old
kernel. Our production VMs (for relays) all run Ubuntu 24.04 so it makes
sense to build and test them on the same kernel / OS release. For
consistency reasons, we therefore bump all runners to 24.04.
2025-09-04 02:04:55 +00:00
Thomas Eizinger
7b5f5d9a30 ci: remove exception for OS error 5 (#10287)
Now that we retry packets that encounter OS error 5, we no longer need
to ignore those warnings in CI.

Related: #10279
2025-09-03 06:36:14 +00:00
Jamil
1a251406c9 fix(ci): bump tauri setup timeout to 15m (#10280)
These occasionally take just a bit more time to complete.

Related:
https://github.com/firezone/firezone/actions/runs/17403822300/job/49402974171
2025-09-02 14:20:11 +00:00
Thomas Eizinger
0c2e54f54c feat(connlib): persistent DNS resource records across sessions (#10104)
When we receive a DNS query for a DNS resource in Firezone, we take the
next available 4 IPs from the CG-NAT range and assign them to the domain
name. For example, if `example.com` is a DNS resource and it is the
first resource being queried in a Firezone session, we will assigned the
IPs `100.96.0.1` - `100.96.0.4` to it. If the user now restarts Firezone
or signs out and back in, this state is lost and we assign those same
IPs to the next DNS query coming in.

This creates a problem for applications that do not re-query DNS very
often or never. They expect these IPs to not change. Restarting software
or signing out and back in is a common approach to fixing software
problems, yet in this specific case, doing so may create even more
problems for the user.

To mitigate this, `ClientState` introduce a new event
`DnsRecordsChanged` that gets emitted to the event-loop every time we
assign new records. The event-loop then caches this in memory and reuses
it in case a new session is initiated. The records are only stored
in-memory and not on disk. Most likely, the tunnel process will be alive
for the entire OS session.

To verify this behaviour, we add a new `RestartClient` transition to our
proptests. In the proptests, we already keep a mapping of all DNS names
we ever resolved, including DNS resources. When generating IP traffic,
we sample from this list of IPs and then expect the packet to be routed.
By replacing the `ClientState` as part of this transition and re-seeding
it with the previously exported DNS records, we can verify that packets
to IPs resolved from a previous session still get successfully routed to
the resource.

Related: #5498
2025-09-01 07:29:28 +00:00
Jamil
275f38a828 chore(ci): copy staging artifacts to azure (#10269)
To deploy the relays on Azure, we need to make sure the binaries are
copied there, similar to GCP. This adds a job step to do just that,
placing them into a storage account + container using new infra
provisioned in Azure.
2025-09-01 00:00:22 +00:00
Jamil
0ccd4bbf24 feat(ci): enable relay eBPF offloading (#10160)
In CI, eBPF in driver mode actually functions just fine with no changes
to our existing tests, given we apply a few workarounds and bugfixes:

- The interface learning mechanism had two flaws: (1) it only learned
per-CPU, which meant the risk for a missing entry grew as the core count
of the relay host grew, and (2) it did not filter for unicast IPs, so it
picked up broadcast and link-local addresses, causing cross-relay paths
to fail occasionally
- The `relay-relay` candidate where the two relays are the same relay
causes packet drops / loops in the Docker bridge setup, and possibly in
GCP too. I'm not sure this is a valid path that solves a real
connectivity issue in the wild. I can understand relay-relay paths where
two relays are different hosts, and the client and gateway both talk
over their TURN channel to each other (i.e. WireGuard is blocked in each
of their networks), but I can't think of an advantage for a relay-relay
candidate where the traffic simply hairpins (or is dropped) off the
nearest switch. This has been now detected with a new `PacketLoop` error
that triggers whenever source_ip == dest_ip.
- The relays in CI need a common next-hop to talk to for the MAC address
swapping to work. A simple router service is added which functions as a
basic L3 router (no NAT) that allows the MAC swapping to work.
- The `veth` driver has some peculiar requirements to allow it to
function with XDP_TX. If you send a packet out of one interface of a
veth pair with XDP_TX, you need to either make sure both interfaces have
GRO enabled, or you need to attach a dummy XDP program that simply does
XDP_PASS to the other interface so that the sk_buff is allocated before
going up the stack to the Docker bridge. The GRO method was unreliable
and didn't work in our case, causing massive packet delays and
unpredictable bursts that prevented ICE from working, so we use the
XDP_PASS method instead. A simple docker image is built and lives at
https://github.com/firezone/xdp-pass to handle this.

Related: #10138 
Related: #10260
2025-08-31 23:37:03 +00:00
Jamil
516be7417e fix(ci): remove extraneous caching (#10258)
- Removes the swift DerivedData cache. This was added to attempt to
speed up the Swift builds in CI but in reality, those are already fast
and the cache did not speed them up.
- Removes the runner.os/arch specifier from the Webview installer cache
key. The binary download is hardcoded for a specific windows version /
arch already so the cache key just adds unneeded complexity.

These caches are getting saved on PR runs which consumes excess GHA
cache storage.
2025-08-27 05:01:02 -07:00
Jamil
8eb738e66a chore(ci): downgrade runners to free tier (#10248)
To avoid burning Azure credits, we move the runners back down to the
free tier. Now that caching is properly set up, this should incur only a
minor increase in CI time.
2025-08-26 10:48:45 -07:00
Jamil
b7045338df fix(ci): compute sha256sum of binaries earlier (#10199)
Fixes an issue where the sha256sum.txt of the relay was not available.

Related: #10198
2025-08-15 18:01:29 -07:00
Jamil
b3ea251082 fix(ci): use correct relay binary location (#10198)
Fixes an issue introduced in #10196.

Related: #10196
2025-08-15 17:41:33 -07:00
Jamil
1c2d70ac0d chore(infra): push relay binary to gcp (#10196)
The COS images we currently use to run our Relays ship with an older
Linux kernel that doesn't have some of the nice verifier improvements
for our eBPF relay.

To fix this, we need to use Ubuntu 24.04. To keep things simple there,
we would like to avoid installing Docker on that image and instead run
the Relay raw. To support that, we first need to push the built relay
binary to our staging cloud storage bucket.

Related: #10177
Related: https://github.com/firezone/infra/pull/116

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-08-15 17:16:30 -07:00
Jamil
3c55ddcd1e fix(ci): move rust cache to Azure; docker on main (#10169)
We are _very much_ over our GHA cache limit of 10 GB so in an effort to
keep evictions to a minimum, we update the Rust SCCACHE to only write on
`main` and the Docker elixir and data plane image build steps to do the
same.

Fixes #10145
2025-08-10 01:29:12 +00:00
Jamil
6f0e7f3caa chore(ci): enable data plane arm64 debug images (#10165)
On developers with Apple Silicon machines, this allows for testing
native binaries without having to build data plane images.
2025-08-08 21:47:10 +00:00
Firezone Bot
95ee111e62 chore: publish apple-client 1.5.7 (#10159) 2025-08-07 04:38:03 +00:00
Firezone Bot
ea960cce74 chore: publish android-client 1.5.3 (#10141) 2025-08-05 16:38:23 +00:00
Jamil
a05067d410 chore(ci): Add 50ms simulated API latency (#10132)
In the real world, it's entirely possible that the latency between
clients, gateways, and relays is much lower than the latency to the API
nodes. This added latency will test that we can handle such cases
reliably.

---------

Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2025-08-05 09:23:43 -07:00
Firezone Bot
3e529ed36c chore: publish gateway 1.4.15 (#10134) 2025-08-05 17:17:25 +10:00
Thomas Eizinger
08d900f3dc ci: remove duplicate log output (#10124)
These are already shown in prior steps.
2025-08-04 14:10:40 +00:00
Thomas Eizinger
1222be8fc9 fix(snownet): de-multiplex packets based on WG session index (#10109)
Right now, `snownet` de-multiplexes WireGuard packets based on their
source tuple (IP + port) to the _first_ connection that would like to
handle this traffic. What appears to be happening based on observation
from customer logs is that we sometimes dispatch the traffic to the
wrong connection.

The WireGuard packet format uses session indices to declare, which
session a packet is for. The local session index is selected during the
handshake for a particular session.

By associating the different session indices (we can have up to 8 in
parallel per peer) with our Firezone-specific connection ID, we can
change our de-multiplexing scheme to uses these indices instead of the
source tuple. This is especially important for Gateways as those talk to
multiple different clients.

The session index is a 32-bit integer where the top 24 bits identify the
connection and the bottom 8 bits are used in a round-robin fashion to
identify individual sessions within the connection. Thus, to find the
correct connection, we right-shift the session index of an incoming
packet to arrive back at the 24-bit connection identifier.

In environments with a limited number of ports outside the NAT, a
connection from a new Client may come from a source tuple of a previous
Client. In such a case, we'd dispatch the packets to the wrong
connection, causing the Client to not be able to handshake a tunnel.
2025-08-04 23:35:48 +10:00
Firezone Bot
acf52ccf1e chore: publish apple-client 1.5.6 (#10106) 2025-08-02 19:43:35 +00:00
dependabot[bot]
0b2fcbd16f build(deps): bump taiki-e/install-action from 2.55.3 to 2.57.5 (#10091)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.55.3 to 2.57.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.57.5</h2>
<ul>
<li>Update <code>vacuum@latest</code> to 0.17.7.</li>
</ul>
<h2>2.57.4</h2>
<ul>
<li>Update <code>trivy@latest</code> to 0.65.0.</li>
</ul>
<h2>2.57.3</h2>
<ul>
<li>Update <code>syft@latest</code> to 1.29.1.</li>
</ul>
<h2>2.57.2</h2>
<ul>
<li>
<p>Update <code>grcov@latest</code> to 0.10.3.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.4.1.</p>
</li>
</ul>
<h2>2.57.1</h2>
<ul>
<li>
<p>Update <code>git-cliff@latest</code> to 2.10.0.</p>
</li>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.14.2.</p>
</li>
</ul>
<h2>2.57.0</h2>
<ul>
<li>Support <code>mdbook-alerts</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1060">#1060</a>,
thanks <a
href="https://github.com/CommanderStorm"><code>@​CommanderStorm</code></a>)</li>
</ul>
<h2>2.56.24</h2>
<ul>
<li>Update <code>just@latest</code> to 1.42.4.</li>
</ul>
<h2>2.56.23</h2>
<ul>
<li>Update <code>release-plz@latest</code> to 0.3.139.</li>
</ul>
<h2>2.56.22</h2>
<ul>
<li>Update <code>wasmtime@latest</code> to 35.0.0.</li>
</ul>
<h2>2.56.21</h2>
<ul>
<li>Improve error message for unsupported host architectures.</li>
</ul>
<h2>2.56.20</h2>
<ul>
<li>Update <code>syft@latest</code> to 1.29.0.</li>
</ul>
<h2>2.56.19</h2>
<ul>
<li>Update <code>cargo-llvm-cov@latest</code> to 0.6.18.</li>
</ul>
<h2>2.56.18</h2>
<ul>
<li>Update <code>just@latest</code> to 1.42.3.</li>
</ul>
<h2>2.56.17</h2>
<ul>
<li>Update <code>wasmtime@latest</code> to 34.0.2.</li>
</ul>
<h2>2.56.16</h2>
<ul>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.20.1.</p>
</li>
<li>
<p>Update <code>cargo-lambda@latest</code> to 1.8.6.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.57.5] - 2025-08-01</h2>
<ul>
<li>Update <code>vacuum@latest</code> to 0.17.7.</li>
</ul>
<h2>[2.57.4] - 2025-07-31</h2>
<ul>
<li>Update <code>trivy@latest</code> to 0.65.0.</li>
</ul>
<h2>[2.57.3] - 2025-07-31</h2>
<ul>
<li>Update <code>syft@latest</code> to 1.29.1.</li>
</ul>
<h2>[2.57.2] - 2025-07-29</h2>
<ul>
<li>
<p>Update <code>grcov@latest</code> to 0.10.3.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.4.1.</p>
</li>
</ul>
<h2>[2.57.1] - 2025-07-27</h2>
<ul>
<li>
<p>Update <code>git-cliff@latest</code> to 2.10.0.</p>
</li>
<li>
<p>Update <code>cargo-binstall@latest</code> to 1.14.2.</p>
</li>
</ul>
<h2>[2.57.0] - 2025-07-26</h2>
<ul>
<li>Support <code>mdbook-alerts</code>. (<a
href="https://redirect.github.com/taiki-e/install-action/pull/1060">#1060</a>,
thanks <a
href="https://github.com/CommanderStorm"><code>@​CommanderStorm</code></a>)</li>
</ul>
<h2>[2.56.24] - 2025-07-25</h2>
<ul>
<li>Update <code>just@latest</code> to 1.42.4.</li>
</ul>
<h2>[2.56.23] - 2025-07-24</h2>
<ul>
<li>Update <code>release-plz@latest</code> to 0.3.139.</li>
</ul>
<h2>[2.56.22] - 2025-07-24</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="d31232495a"><code>d312324</code></a>
Release 2.57.5</li>
<li><a
href="00ad1b8748"><code>00ad1b8</code></a>
Update <code>vacuum@latest</code> to 0.17.7</li>
<li><a
href="e8c1cf74a6"><code>e8c1cf7</code></a>
Release 2.57.4</li>
<li><a
href="f5b10fbf06"><code>f5b10fb</code></a>
Update <code>trivy@latest</code> to 0.65.0</li>
<li><a
href="17ad3887d7"><code>17ad388</code></a>
Release 2.57.3</li>
<li><a
href="450b647d5c"><code>450b647</code></a>
Update <code>syft@latest</code> to 1.29.1</li>
<li><a
href="bbdef1c33c"><code>bbdef1c</code></a>
Release 2.57.2</li>
<li><a
href="c01bd8006a"><code>c01bd80</code></a>
Update <code>grcov@latest</code> to 0.10.3</li>
<li><a
href="658daa5fc2"><code>658daa5</code></a>
Update <code>cargo-shear@latest</code> to 1.4.1</li>
<li><a
href="a416ddeedb"><code>a416dde</code></a>
Release 2.57.1</li>
<li>Additional commits viewable in <a
href="https://github.com/taiki-e/install-action/compare/v2.55.3...d31232495ad76f47aad66e3501e47780b49f0f3e">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.55.3&new-version=2.57.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-01 12:05:00 +00:00
dependabot[bot]
54e6edaf1b build(deps): bump docker/metadata-action from 5.7.0 to 5.8.0 (#10092)
Bumps
[docker/metadata-action](https://github.com/docker/metadata-action) from
5.7.0 to 5.8.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/docker/metadata-action/releases">docker/metadata-action's
releases</a>.</em></p>
<blockquote>
<h2>v5.8.0</h2>
<ul>
<li>New <code>is_not_default_branch</code> global expression by <a
href="https://github.com/crazy-max"><code>@​crazy-max</code></a> in <a
href="https://redirect.github.com/docker/metadata-action/pull/535">docker/metadata-action#535</a></li>
<li>Allow to match part of the git tag or value for semver/pep440 types
by <a href="https://github.com/crazy-max"><code>@​crazy-max</code></a>
in <a
href="https://redirect.github.com/docker/metadata-action/pull/536">docker/metadata-action#536</a>
<a
href="https://redirect.github.com/docker/metadata-action/pull/537">docker/metadata-action#537</a></li>
<li>Bump <code>@​actions/github</code> from 6.0.0 to 6.0.1 in <a
href="https://redirect.github.com/docker/metadata-action/pull/523">docker/metadata-action#523</a></li>
<li>Bump <code>@​docker/actions-toolkit</code> from 0.56.0 to 0.62.1 in
<a
href="https://redirect.github.com/docker/metadata-action/pull/526">docker/metadata-action#526</a></li>
<li>Bump form-data from 2.5.1 to 2.5.5 in <a
href="https://redirect.github.com/docker/metadata-action/pull/533">docker/metadata-action#533</a></li>
<li>Bump moment-timezone from 0.5.47 to 0.6.0 in <a
href="https://redirect.github.com/docker/metadata-action/pull/525">docker/metadata-action#525</a></li>
<li>Bump semver from 7.7.1 to 7.7.2 in <a
href="https://redirect.github.com/docker/metadata-action/pull/524">docker/metadata-action#524</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/docker/metadata-action/compare/v5.7.0...v5.8.0">https://github.com/docker/metadata-action/compare/v5.7.0...v5.8.0</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c1e51972af"><code>c1e5197</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/metadata-action/issues/537">#537</a>
from crazy-max/pep440-match</li>
<li><a
href="89dd65a569"><code>89dd65a</code></a>
chore: update generated content</li>
<li><a
href="699ee45cf1"><code>699ee45</code></a>
allow to match part of the git tag or value for pep440 type</li>
<li><a
href="e0542a6360"><code>e0542a6</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/metadata-action/issues/536">#536</a>
from crazy-max/semver-match</li>
<li><a
href="b7facdfcef"><code>b7facdf</code></a>
chore: update generated content</li>
<li><a
href="81c60dfb8b"><code>81c60df</code></a>
allow to match part of the git tag or value for semver type</li>
<li><a
href="de1119515d"><code>de11195</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/metadata-action/issues/535">#535</a>
from crazy-max/not_def_branch</li>
<li><a
href="2f9c64b1b1"><code>2f9c64b</code></a>
Merge pull request <a
href="https://redirect.github.com/docker/metadata-action/issues/533">#533</a>
from docker/dependabot/npm_and_yarn/form-data-2.5.5</li>
<li><a
href="510f746975"><code>510f746</code></a>
chore: update generated content</li>
<li><a
href="2bc3f4e0f1"><code>2bc3f4e</code></a>
is_not_default_branch global expression</li>
<li>Additional commits viewable in <a
href="902fa8ec7d...c1e51972af">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=docker/metadata-action&package-manager=github_actions&previous-version=5.7.0&new-version=5.8.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>
2025-08-01 12:04:27 +00:00
Thomas Eizinger
a7ba15c8c1 ci: test packet loss behaviour using download (#10067) 2025-08-01 01:55:02 +00:00
Jamil
89f9a915c1 fix(ci): only tag latest on release (#10053)
This fixes an issue introduced when we moved to GHCR hosting where the
`latest` tag was being applied to each `main` build of the `client` and
`gateway` instead of publish builds only.
2025-07-30 17:05:00 +00:00
Thomas Eizinger
69f9a03ee8 refactor(connlib): simplify IpPacket struct (#9795)
With the removal of the NAT64/46 modules, we can now simplify the
internals of our `IpPacket` struct. The requirements for our `IpPacket`
struct are somewhat delicate.

On the one hand, we don't want to be overly restrictive in our parsing /
validation code because there is a lot of broken software out there that
doesn't necessarily follow RFCs. Hence, we want to be as lenient as
possible in what we accept.

On the other hand, we do need to verify certain aspects of the packet,
like the payload lengths. At the moment, we are somewhat too lenient
there which causes errors on the Gateway where we have to NAT or
otherwise manipulate the packets. See #9567 or #9552 for example.

To fix this, we make the parsing in the `IpPacket` constructor more
restrictive. If it is a UDP, TCP or ICMP packet, we attempt to fully
parse its headers and validate the payload lengths.

This parsing allows us to then rely on the integrity of the packet as
part of the implementation. This does create several code paths that can
in theory panic but in practice, should be impossible to hit. To ensure
that this does in fact not happen, we also tackle an issue that is long
overdue: Fuzzing.

Resolves: #6667 
Resolves: #9567
Resolves: #9552
2025-07-29 04:42:57 +00:00
Jamil
1763113511 test(ci): test 20% packet loss (#9846)
Packet loss is a reality on the modern internet. Ideally, Firezone
should be able to handle some level of packet loss and still function
reliably, especially considering all of the UDP-based protocols we rely
on.

To test this, we set an extreme packet loss of 20% and perform a 10 MB
download through Firezone. Doing so actually exposed a bug:

For DNS resources, we need to set up the DNS resource NAT on the Gateway
which happens through the p2p control protocol. This packet is resent at
most every 2s but only if there are any other DNS queries. If we don't
receive another DNS query but get traffic for the resource, we keep
buffering those packets without trying to re-send the `AssignedIp`s
packet.
2025-07-28 22:51:04 +00:00
Firezone Bot
e6fc7e62da chore: publish apple-client 1.5.5 (#10035) 2025-07-28 20:14:12 +00:00
Firezone Bot
2309be11fc chore: publish headless-client 1.5.2 (#10029) 2025-07-28 06:17:42 +00:00
Firezone Bot
cf40f4dd96 chore: publish gateway 1.4.14 (#10030) 2025-07-28 06:14:07 +00:00
Firezone Bot
7b8daf4074 chore: publish gui-client 1.5.6 (#10028) 2025-07-28 06:08:01 +00:00
dependabot[bot]
c85951095e build(deps): bump dorny/test-reporter from 2.1.0 to 2.1.1 (#9921)
Bumps [dorny/test-reporter](https://github.com/dorny/test-reporter) from
2.1.0 to 2.1.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dorny/test-reporter/releases">dorny/test-reporter's
releases</a>.</em></p>
<blockquote>
<h2>v2.1.1</h2>
<p>A bug fix release of the <code>test-reporter</code> action.</p>
<h2>What's Changed</h2>
<ul>
<li>Use if: '!cancelled()' by <a
href="https://github.com/Vampire"><code>@​Vampire</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/576">dorny/test-reporter#576</a></li>
<li>Update packages to latest minor releases by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/599">dorny/test-reporter#599</a></li>
<li>Add step summary short summary by <a
href="https://github.com/OlesGalatsan"><code>@​OlesGalatsan</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/589">dorny/test-reporter#589</a></li>
<li>Return links to summary report by <a
href="https://github.com/OlesGalatsan"><code>@​OlesGalatsan</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/588">dorny/test-reporter#588</a></li>
<li>Add type definitions to <code>github-utils.ts</code> by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/604">dorny/test-reporter#604</a></li>
<li>Configure markdown linting rules by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/605">dorny/test-reporter#605</a></li>
<li>List only failed tests by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/606">dorny/test-reporter#606</a></li>
<li>Add stack trace from trx to summary by <a
href="https://github.com/dboriichuk"><code>@​dboriichuk</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/615">dorny/test-reporter#615</a></li>
<li>Update development dependencies by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/628">dorny/test-reporter#628</a></li>
<li>Fix error when a TestMethod element does not have a className
attribute in a trx file by <a
href="https://github.com/0xced"><code>@​0xced</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/623">dorny/test-reporter#623</a></li>
<li>test-reporter release v2.1.1 by <a
href="https://github.com/jozefizso"><code>@​jozefizso</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/638">dorny/test-reporter#638</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/dboriichuk"><code>@​dboriichuk</code></a> made
their first contribution in <a
href="https://redirect.github.com/dorny/test-reporter/pull/615">dorny/test-reporter#615</a></li>
<li><a href="https://github.com/0xced"><code>@​0xced</code></a> made
their first contribution in <a
href="https://redirect.github.com/dorny/test-reporter/pull/623">dorny/test-reporter#623</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/dorny/test-reporter/compare/v2.1.0...v2.1.1">https://github.com/dorny/test-reporter/compare/v2.1.0...v2.1.1</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/dorny/test-reporter/blob/main/CHANGELOG.md">dorny/test-reporter's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>2.1.1</h2>
<ul>
<li>Fix error when a TestMethod element does not have a className
attribute in a trx file <a
href="https://redirect.github.com/dorny/test-reporter/pull/623">dorny/test-reporter#623</a></li>
<li>Add stack trace from trx to summary <a
href="https://redirect.github.com/dorny/test-reporter/pull/615">dorny/test-reporter#615</a></li>
<li>List only failed tests <a
href="https://redirect.github.com/dorny/test-reporter/pull/606">dorny/test-reporter#606</a></li>
<li>Add type definitions to <code>github-utils.ts</code> <a
href="https://redirect.github.com/dorny/test-reporter/pull/604">dorny/test-reporter#604</a></li>
<li>Avoid split on undefined <a
href="https://redirect.github.com/dorny/test-reporter/pull/258">dorny/test-reporter#258</a></li>
<li>Return links to summary report <a
href="https://redirect.github.com/dorny/test-reporter/pull/588">dorny/test-reporter#588</a></li>
<li>Add step summary short summary <a
href="https://redirect.github.com/dorny/test-reporter/pull/589">dorny/test-reporter#589</a></li>
<li>Fix for empty TRX TestDefinitions <a
href="https://redirect.github.com/dorny/test-reporter/pull/582">dorny/test-reporter#582</a></li>
<li>Increase step summary limit to 1MiB <a
href="https://redirect.github.com/dorny/test-reporter/pull/581">dorny/test-reporter#581</a></li>
<li>Fix input description for list options <a
href="https://redirect.github.com/dorny/test-reporter/pull/572">dorny/test-reporter#572</a></li>
</ul>
<h2>2.1.0</h2>
<ul>
<li>Feature: Add summary title <a
href="https://redirect.github.com/dorny/test-reporter/pull/568">dorny/test-reporter#568</a></li>
<li>Feature: Add Golang test parser <a
href="https://redirect.github.com/dorny/test-reporter/pull/571">dorny/test-reporter#571</a></li>
<li>Increase step summary limit to 1MiB <a
href="https://redirect.github.com/dorny/test-reporter/pull/581">dorny/test-reporter#581</a></li>
<li>Fix for empty TRX TestDefinitions <a
href="https://redirect.github.com/dorny/test-reporter/pull/582">dorny/test-reporter#582</a></li>
<li>Fix input description for list options <a
href="https://redirect.github.com/dorny/test-reporter/pull/572">dorny/test-reporter#572</a></li>
<li>Update npm packages <a
href="https://redirect.github.com/dorny/test-reporter/pull/583">dorny/test-reporter#583</a></li>
</ul>
<h2>2.0.0</h2>
<ul>
<li>Parse JUnit report with detailed message in failure <a
href="https://redirect.github.com/dorny/test-reporter/pull/559">dorny/test-reporter#559</a></li>
<li>Support displaying test results in markdown using GitHub Actions Job
Summaries <a
href="https://redirect.github.com/dorny/test-reporter/pull/383">dorny/test-reporter#383</a></li>
</ul>
<h2>1.9.1</h2>
<ul>
<li>Fix problematic retransmission of authentication token <a
href="https://redirect.github.com/dorny/test-reporter/pull/438">dorny/test-reporter#438</a></li>
<li>Report correct number of tests in Dart <a
href="https://redirect.github.com/dorny/test-reporter/pull/426">dorny/test-reporter#426</a></li>
<li>Number of completed tests mismatches passed/failed <a
href="https://redirect.github.com/dorny/test-reporter/issues/319">dorny/test-reporter#319</a></li>
</ul>
<h2>1.9.0</h2>
<ul>
<li>Add support for Rspec (Ruby) <a
href="https://redirect.github.com/dorny/test-reporter/pull/398">dorny/test-reporter#398</a></li>
</ul>
<h2>1.8.0</h2>
<ul>
<li>Add <code>SwiftXunitParser</code> class based on
<code>JavaJunitParser</code> for <code>swift-xunit</code> reporter <a
href="https://redirect.github.com/dorny/test-reporter/pull/317">dorny/test-reporter#317</a></li>
<li>Use NodeJS 18 LTS as default runtime <a
href="https://redirect.github.com/dorny/test-reporter/pull/332">dorny/test-reporter#332</a></li>
<li>Escape <code>&lt;&gt;</code> characters in suite name <a
href="https://redirect.github.com/dorny/test-reporter/pull/236">dorny/test-reporter#236</a></li>
<li>Update actions runtime to Node20 <a
href="https://redirect.github.com/dorny/test-reporter/pull/315">dorny/test-reporter#315</a></li>
<li>Update check title and remove icon <a
href="https://redirect.github.com/dorny/test-reporter/pull/144">dorny/test-reporter#144</a></li>
</ul>
<h2>1.7.0</h2>
<ul>
<li>Fix <a
href="https://redirect.github.com/dorny/test-reporter/issues/199">#199</a>:
Use  instead of ✔️ for better cross platform look by <a
href="https://github.com/petrdvorak"><code>@​petrdvorak</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/200">dorny/test-reporter#200</a></li>
<li>Verify content of dist/ folder matches build output by <a
href="https://github.com/dorny"><code>@​dorny</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/207">dorny/test-reporter#207</a></li>
<li>Gracefully handle empty nested testsuite elements for JUnit. by <a
href="https://github.com/rvdlaarschot"><code>@​rvdlaarschot</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/193">dorny/test-reporter#193</a></li>
<li>Gracefully handle empty failure tags by <a
href="https://github.com/haudren-woven"><code>@​haudren-woven</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/213">dorny/test-reporter#213</a></li>
<li>Fix <a
href="https://redirect.github.com/dorny/test-reporter/issues/208">#208</a>
- java-junit: show annotations on PR changed files by <a
href="https://github.com/atsu85"><code>@​atsu85</code></a> in <a
href="https://redirect.github.com/dorny/test-reporter/pull/209">dorny/test-reporter#209</a></li>
<li>Only report failure if fail-on-error is set by <a
href="https://github.com/trond-snekvik"><code>@​trond-snekvik</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/214">dorny/test-reporter#214</a></li>
<li>Improve clarity on configuring for forkable repos by <a
href="https://github.com/abelbraaksma"><code>@​abelbraaksma</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/211">dorny/test-reporter#211</a></li>
<li>Suppress &quot;Processing test results from&quot; log by <a
href="https://github.com/vasanthdharmaraj"><code>@​vasanthdharmaraj</code></a>
in <a
href="https://redirect.github.com/dorny/test-reporter/pull/179">dorny/test-reporter#179</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="dc3a92680f"><code>dc3a926</code></a>
test-reporter release v2.1.1</li>
<li><a
href="e8e27361af"><code>e8e2736</code></a>
test-reporter release v2.1.1</li>
<li><a
href="ec9d9d2459"><code>ec9d9d2</code></a>
Merge pull request <a
href="https://redirect.github.com/dorny/test-reporter/issues/623">#623</a>
from 0xced/xunitv3-trx</li>
<li><a
href="be36461fba"><code>be36461</code></a>
Fix code formatting in the <code>dotnet-trx.tests.ts</code> file</li>
<li><a
href="8dd7047bf0"><code>8dd7047</code></a>
Merge pull request <a
href="https://redirect.github.com/dorny/test-reporter/issues/628">#628</a>
from dorny/chore/update_packages</li>
<li><a
href="71814ae0cd"><code>71814ae</code></a>
Update development dependencies</li>
<li><a
href="4128d36b92"><code>4128d36</code></a>
Use &quot;Unclassified&quot; when no class name is available</li>
<li><a
href="d1504ea554"><code>d1504ea</code></a>
Add test on a trx report where the className attribute of TestMethod is
missing</li>
<li><a
href="18430db883"><code>18430db</code></a>
Merge pull request <a
href="https://redirect.github.com/dorny/test-reporter/issues/615">#615</a>
from dboriichuk/trx-stack-trace-summary</li>
<li><a
href="ae8bd195f8"><code>ae8bd19</code></a>
Add stack tracke to summary</li>
<li>Additional commits viewable in <a
href="890a17cecf...dc3a92680f">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=dorny/test-reporter&package-manager=github_actions&previous-version=2.1.0&new-version=2.1.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>
2025-07-25 03:16:03 +00:00
Thomas Eizinger
d244a99c58 feat(connlib): always use all candidates (#9979)
In #6876, we added functionality that would only make use of new remote
candidates whilst we haven't nominated a socket yet with the remote. The
reason for that was because in the described edge-case where relays
reboot or get replaced whilst the client is partitioned from the portal
(or we experience a connection hiccup), only one of the two peers, i.e.
Client or Gateway would migrate to the new relay, leaving the other one
in an inconsistent state.

Looking at recent customer logs, I've been seeing a lot of these
messages:

> Unknown connection or socket has already been nominated

For this particular customer, these are then very quickly followed by
ICE timeouts, leaving the connection unusable.

Considering that, I no longer think that the above change was a good
idea and we should instead always make use of all candidates that we are
given. What we are seeing is that in deployment scenarios where the
latency link between Client and Gateway is very short (5-10ms) yet the
latency to the portal is longer (~30-50ms), we trigger a race condition
where we are temporarily nominating a _peer-reflexive_ candidate pair
instead of a regular one. This happens because with such a short latency
link, Client and Gateway are _faster_ in sending back and forth several
STUN bindings than the control plane is in delivering all the
candidates.

Due to the functionality added in #6876, this then results in us not
accepting the candidates. It further appears that a nominated
peer-reflexive candidate does not provide a stable connection which is
why we then run into an ICE timeout, requiring Firezone to establish a
new connection only to have the same thing happen again.

This is very disruptive for the user experience as the connection only
works for a few moments at a time.

With #9793, we have actually added a feature that is also at play here.
Now that we don't immediately act on an ICE timeout, it is actually
possible for both Client and Gateway to migrate a connection to a
different relay, should the one that they are using get disconnected. In
#9793, we added a timeout of 2s for this.

To make this fully work, we need to patch str0m to transition to
`Checking` early. Presently, str0m would directly transition from
`Disconnected` to `Connected` in this case which in some of the
high-latency scenarios that we are testing in CI is not enough to
recover the connection within 2s. By transitioning to `Checking` early,
we abort this timer.

Related: https://github.com/algesten/str0m/pull/676
2025-07-24 01:35:54 +00:00
Jamil
86954a4f4a fix(ci): don't version images until release (#9968)
Fixes #9967
2025-07-22 18:59:01 +00:00
Firezone Bot
a11983e4b3 chore: publish gateway 1.4.13 (#9969) 2025-07-22 18:56:40 +00:00
dependabot[bot]
4c0c605c72 build(deps): bump taiki-e/install-action from 2.55.3 to 2.56.19 (#9918)
Bumps
[taiki-e/install-action](https://github.com/taiki-e/install-action) from
2.55.3 to 2.56.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/releases">taiki-e/install-action's
releases</a>.</em></p>
<blockquote>
<h2>2.56.19</h2>
<ul>
<li>Update <code>cargo-llvm-cov@latest</code> to 0.6.18.</li>
</ul>
<h2>2.56.18</h2>
<ul>
<li>Update <code>just@latest</code> to 1.42.3.</li>
</ul>
<h2>2.56.17</h2>
<ul>
<li>Update <code>wasmtime@latest</code> to 34.0.2.</li>
</ul>
<h2>2.56.16</h2>
<ul>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.20.1.</p>
</li>
<li>
<p>Update <code>cargo-lambda@latest</code> to 1.8.6.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.17.6.</p>
</li>
<li>
<p>Update <code>earthly@latest</code> to 0.8.16.</p>
</li>
</ul>
<h2>2.56.15</h2>
<ul>
<li>
<p>Fix <code>cargo-valgrind</code> installation error due to their tag
rename.</p>
</li>
<li>
<p>Update <code>cargo-valgrind@latest</code> to 2.3.2.</p>
</li>
<li>
<p>Update <code>just@latest</code> to 1.42.2.</p>
</li>
</ul>
<h2>2.56.14</h2>
<ul>
<li>
<p>Update <code>zola@latest</code> to 0.21.0.</p>
</li>
<li>
<p>Update <code>wait-for-them@latest</code> to 0.5.1.</p>
</li>
<li>
<p>Update <code>mdbook@latest</code> to 0.4.52.</p>
</li>
<li>
<p>Update <code>just@latest</code> to 1.42.1.</p>
</li>
<li>
<p>Update <code>cargo-shear@latest</code> to 1.4.0.</p>
</li>
<li>
<p>Update <code>cyclonedx@latest</code> to 0.29.0.</p>
</li>
</ul>
<h2>2.56.13</h2>
<ul>
<li>Update <code>cargo-nextest@latest</code> to 0.9.101.</li>
</ul>
<h2>2.56.12</h2>
<ul>
<li>Update <code>cargo-hack@latest</code> to 0.6.37.</li>
</ul>
<h2>2.56.11</h2>
<ul>
<li>
<p>Update <code>osv-scanner@latest</code> to 2.1.0.</p>
</li>
<li>
<p>Update <code>cargo-no-dev-deps@latest</code> to 0.2.16.</p>
</li>
<li>
<p>Update <code>cargo-minimal-versions@latest</code> to 0.1.31.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/taiki-e/install-action/blob/main/CHANGELOG.md">taiki-e/install-action's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<p>All notable changes to this project will be documented in this
file.</p>
<p>This project adheres to <a href="https://semver.org">Semantic
Versioning</a>.</p>
<!-- raw HTML omitted -->
<h2>[Unreleased]</h2>
<h2>[2.56.19] - 2025-07-19</h2>
<ul>
<li>Update <code>cargo-llvm-cov@latest</code> to 0.6.18.</li>
</ul>
<h2>[2.56.18] - 2025-07-19</h2>
<ul>
<li>Update <code>just@latest</code> to 1.42.3.</li>
</ul>
<h2>[2.56.17] - 2025-07-18</h2>
<ul>
<li>Update <code>wasmtime@latest</code> to 34.0.2.</li>
</ul>
<h2>[2.56.16] - 2025-07-18</h2>
<ul>
<li>
<p>Update <code>cargo-zigbuild@latest</code> to 0.20.1.</p>
</li>
<li>
<p>Update <code>cargo-lambda@latest</code> to 1.8.6.</p>
</li>
<li>
<p>Update <code>vacuum@latest</code> to 0.17.6.</p>
</li>
<li>
<p>Update <code>earthly@latest</code> to 0.8.16.</p>
</li>
</ul>
<h2>[2.56.15] - 2025-07-16</h2>
<ul>
<li>
<p>Fix <code>cargo-valgrind</code> installation error due to their tag
rename.</p>
</li>
<li>
<p>Update <code>cargo-valgrind@latest</code> to 2.3.2.</p>
</li>
<li>
<p>Update <code>just@latest</code> to 1.42.2.</p>
</li>
</ul>
<h2>[2.56.14] - 2025-07-15</h2>
<ul>
<li>
<p>Update <code>zola@latest</code> to 0.21.0.</p>
</li>
<li>
<p>Update <code>wait-for-them@latest</code> to 0.5.1.</p>
</li>
<li>
<p>Update <code>mdbook@latest</code> to 0.4.52.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c99cc51b30"><code>c99cc51</code></a>
Release 2.56.19</li>
<li><a
href="35aa282e0f"><code>35aa282</code></a>
Update <code>cargo-llvm-cov@latest</code> to 0.6.18</li>
<li><a
href="8962e8bc90"><code>8962e8b</code></a>
Release 2.56.18</li>
<li><a
href="86ed27786e"><code>86ed277</code></a>
Update <code>just@latest</code> to 1.42.3</li>
<li><a
href="d8fcd11e5f"><code>d8fcd11</code></a>
Release 2.56.17</li>
<li><a
href="03efa19be6"><code>03efa19</code></a>
Update readme</li>
<li><a
href="14dc975de9"><code>14dc975</code></a>
ci: Fix debian 10 setup</li>
<li><a
href="00c7072f52"><code>00c7072</code></a>
Update wasmtime manifest</li>
<li><a
href="8520ed0913"><code>8520ed0</code></a>
Release 2.56.16</li>
<li><a
href="56de642f63"><code>56de642</code></a>
Update <code>cargo-zigbuild@latest</code> to 0.20.1</li>
<li>Additional commits viewable in <a
href="9ca1734d89...c99cc51b30">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=taiki-e/install-action&package-manager=github_actions&previous-version=2.55.3&new-version=2.56.19)](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>
2025-07-22 08:46:31 +00:00
Jamil
dff6495057 fix(ci): use pinned musl toolchains (#9953) 2025-07-21 13:11:47 -07:00
Jamil
2038a1bc22 chore(ci): Use GitHub Actions Cache for CI layer cache (#9941)
Since GCP artifact registry is cost-prohibitive, we can use the GitHub
Actions Cache for docker layer caching for CI builds.

See https://docs.docker.com/build/cache/backends/gha/

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-21 04:04:14 +00:00
Jamil
79acfd698f fix(ci): remove copy binaries step (#9940)
A leftover from #9913 - we need to remove the copy binaries step.
2025-07-19 07:27:12 -07:00
Jamil
a8f93d24a3 chore(infra): ditch gcp registry for ghcr.io (#9913)
Google Cloud Artifact registry and Cloud storage is a significant cost.
GitHub, on the other hand, is completely free due to our being a public
repository. Hence, it makes sense to ditch GCP for GHCR.

To do this, we move all "staging" artifacts to GHCR. These will then be
used in the infra repo to push to GCP for deploys - we probably still
want pulls for our infra to hit GCP and not GitHub.

One big element of this is that we potentially lose sccache, so I'll be
checking the compile time of this PR and looking for alternatives that
don't involve such a massive cloud bill.
2025-07-19 07:00:30 -07:00
Thomas Eizinger
3e71a91667 feat(gateway): revoke unlisted authorizations upon init (#9896)
When receiving an `init` message from the portal, we will now revoke all
authorizations not listed in the `authorizations` list of the `init`
message.

We (partly) test this by introducing a new transition in our proptests
that de-authorizes a certain resource whilst the Gateway is simulated to
be partitioned. It is difficult to test that we cannot make a connection
once that has happened because we would have to simulate a malicious
client that knows about resources / connections or ignores the "remove
resource" message.

Testing this is deferred to a dedicated task. We do test that we hit the
code path of revoking the resource authorization and because the other
resources keep working, we also test that we are at least not revoking
the wrong ones.

Resolves: #9892
2025-07-17 19:04:54 +00:00
Thomas Eizinger
cf2470ba1e test(iperf): install iptables rule inside of container (#9880)
In Docker environments, applying iptables rules to filter
container-container traffic on the Docker bridged network is not
reliable, leading to direct connections being established in our relayed
tests. To fix this, we insert the rules directly from the client
container itself.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2025-07-16 10:29:33 +00:00
Thomas Eizinger
cb3f4c0884 ci: fail perf & integration tests on warnings (#9875)
We already do the same thing for our integration tests. It turns out
that it wasn't working there either though.

Related: #9874
2025-07-15 14:36:54 +00:00
Thomas Eizinger
d92e997878 ci: add work-around for apple-client tag (#9877)
The current Git tag for releases of the Apple client is out-of-line with
the naming of rest of the repository. Ideally, the tag would be renamed
to `apple-client-X.Y.Z` as it represents the version for both the macOS
and iOS client.

I am not familiar with the redirect system on our website to
confidentially do this without breaking anything, so the easiest fix
here is to employ the same hack we already do for Sentry where we
special-case the `macos-client` tag.

Resolves: #9871
2025-07-15 13:37:00 +00:00
Thomas Eizinger
66455ab0ef feat(gateway): translate TimeExceeded ICMP messages (#9812)
In the DNS resource NAT table, we track parts of the layer 4 protocol of
the connection in order to map packets back to the correct proxy IP in
case multiple DNS names resolve to the same real IP. The involvement of
layer 4 means we need to perform some packet inspection in case we
receive ICMP errors from an upstream router.

Presently, the only ICMP error we handle here is destination
unreachable. Those are generated e.g. when we are trying to contact an
IPv6 address but we don't have an IPv6 egress interface. An additional
error that we want to handle here is "time exceeded":

Time exceeded is sent when the TTL of a packet reaches 0. Typically,
TTLs are set high enough such that the packet makes it to its
destination. When using tools such as `tracepath` however, the TTL is
specifically only incremented one-by-one in order to resolve the exact
hops a packet is taking to a destination. Without handling the time
exceeded ICMP error, using `tracepath` through Firezone is broken
because the packets get dropped at the DNS resource NAT.

With this PR, we generalise the functionality of detecting destination
unreachable ICMP errors to also handle time-exceeded errors, allowing
tools such as `tracepath` to somewhat work:

```
❯ sudo docker compose exec --env RUST_LOG=info -it client /bin/sh -c 'tracepath -b example.com'
 1?: [LOCALHOST]                      pmtu 1280
 1:  100.82.110.64 (100.82.110.64)                         0.795ms
 1:  100.82.110.64 (100.82.110.64)                         0.593ms
 2:  example.com (100.96.0.1)                              0.696ms asymm 45
 3:  example.com (100.96.0.1)                              5.788ms asymm 45
 4:  example.com (100.96.0.1)                              7.787ms asymm 45
 5:  example.com (100.96.0.1)                              8.412ms asymm 45
 6:  example.com (100.96.0.1)                              9.545ms asymm 45
 7:  example.com (100.96.0.1)                              7.312ms asymm 45
 8:  example.com (100.96.0.1)                              8.779ms asymm 45
 9:  example.com (100.96.0.1)                              9.455ms asymm 45
10:  example.com (100.96.0.1)                             14.410ms asymm 45
11:  example.com (100.96.0.1)                             24.244ms asymm 45
12:  example.com (100.96.0.1)                             31.286ms asymm 45
13:  no reply
14:  example.com (100.96.0.1)                            303.860ms asymm 45
15:  no reply
16:  example.com (100.96.0.1)                            135.616ms (This broken router returned corrupted payload) asymm 45
17:  no reply
18:  example.com (100.96.0.1)                            161.647ms asymm 45
19:  no reply
20:  no reply
21:  no reply
22:  example.com (100.96.0.1)                            238.066ms reached
     Resume: pmtu 1280 hops 22 back 45
```

We say "somewhat work" because due to the NAT that is in place for DNS
resources, the output does not disclose the intermediary hops beyond the
Gateway.

Co-authored-by: Antoine Labarussias <antoinelabarussias@gmail.com>

---------

Co-authored-by: Antoine Labarussias <antoinelabarussias@gmail.com>
2025-07-12 21:09:48 +00:00
Jamil
12351e5985 ci: publish apple 1.5.4 clients (#9842) 2025-07-11 16:35:25 +00:00
Thomas Eizinger
55eaa7cdc7 test(connlib): establish real TCP connections in proptests (#9814)
With this patch, we sample a list of DNS resources on each test run and
create a "TCP service" for each of their addresses. Using this list of
resources, we then change the `SendTcpPayload` transition to
`ConnectTcp` and establish TCP connections using `smoltcp` to these
services.

For now, we don't send any data on these connections but we do set the
keep-alive interval to 5s, meaning `smoltcp` itself will keep these
connections alive. We also set the timeout to 30s and after each
transition in a test-run, we assert that all TCP sockets are still in
their expected state:

- `ESTABLISHED` for most of them.
- `CLOSED` for all sockets where we ended up sampling an IPv4 address
but the DNS resource only supports IPv6 addresses (or vice-versa). In
these cases, we use the ICMP error to sent by the Gateway to assert that
the socket is `CLOSED`. Unfortunately, `smoltcp` currently does not
handle ICMP messages for its sockets, so we have to call `abort`
ourselves.

Overall, this should assert that regardless of whether we roam networks,
switch relays or do other kind of stuff with the underlying connection,
the tunneled TCP connection stays alive.

In order to make this work, I had to tweak the timeouts when we are
on-demand refreshing allocations. This only happens in one particular
case: When we are being given new relays by the portal, we refresh all
_other_ relays to make sure they are still present. In other words, all
relays that we didn't remove and didn't just add but still had in-memory
are refreshed. This is important for cases where we are
network-partitioned from the portal whilst relays are deployed or reset
their state otherwise. Instead of the previous 8s max elapsed time of
the exponential backoff like we have it for other requests, we now only
use a single message with a 1s timeout there. With the increased ICE
timeout of 15s, a TCP connection with a 30s timeout would otherwise not
survive such an event. This is because it takes the above mentioned 8s
for us to remove a non-functioning relay, all whilst trying to establish
a new connection (which also incurs its own ICE timeout then).

With the reduced timeout on the on-demand refresh of 1s, we detect the
disappeared relay much quicker and can immediately establish a new
connection via one of the new ones. As always with reduced timeouts,
this can create false-positives if the relay doesn't reply within 1s for
some reason.

Resolves: #9531
2025-07-11 15:10:22 +00:00
Thomas Eizinger
55aef6ae11 chore: publish gui-client 1.5.5 (#9811) 2025-07-09 12:44:38 +00:00
Jamil
4a02e89b43 ci: publish headless 1.5.1 (#9791) 2025-07-05 08:18:14 +00:00
Thomas Eizinger
cb9b087bf3 refactor(ci): reuse gcp-docker-login action (#9787)
It appears the code for authenticating with GCP is duplicated in some of
our workflows.
2025-07-04 14:06:21 +00:00
Thomas Eizinger
94660cbb2c chore(gui-smoke-test): wait for tunnel service to boot (#9766)
The tunnel service creates the Firezone ID upon start-up. With recent
changes to the GUI client, we now require reading the ID file when
starting the GUI client.

This exposes a race condition in our smoke-tests where we start them
both at roughly the same time.

To fix this, we sleep for 500ms after starting the tunnel process.
2025-07-02 05:16:15 +00:00