Commit Graph

1049 Commits

Author SHA1 Message Date
Thomas Eizinger
21ab270ebc ci(android): be explicit about NDK version (#7119) 2024-10-22 02:38:44 +00:00
Gabi
2976081bc0 chore(connlib): use tcp and udp packets for proptests (#7064)
Currently, tests only send ICMP packets back and forth, to expand our
coverage and later on permit us cover filters and resource picking this
PR implements sending UDP and TCP packets as part of that logic too.

To make this PR simpler in this stage TCP packets don't track an actual
TCP connection, just that they are forwarded back and forth, this will
be fixed in a future PR by emulating TCP sockets.

We also unify how we handle CIDR/DNS/Non Resources to reduce the number
of transitions.

Fixes #7003

---------

Signed-off-by: Gabi <gabrielalejandro7@gmail.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-22 01:21:40 +00:00
Thomas Eizinger
9de1119b69 feat(connlib): support DNS over TCP (#6944)
At present, `connlib` only supports DNS over UDP on port 53. Responses
over UDP are size-constrained on the IP MTU and thus, not all DNS
responses fit into a UDP packet. RFC9210 therefore mandates that all DNS
resolvers must also support DNS over TCP to overcome this limitation
[0].

Handling UDP packets is easy, handling TCP streams is more difficult
because we need to effectively implement a valid TCP state machine.

Building on top of a lot of earlier work (linked in issue), this is
relatively easy because we can now simply import
`dns_over_tcp::{Client,Server}` which do the heavy lifting of sending
and receiving the correct packets for us.

The main aspects of the integration that are worth pointing out are:

- We can handle at most 10 concurrent DNS TCP connections _per defined
resolver_. The assumption here is that most applications will first
query for DNS records over UDP and only fall back to TCP if the response
is truncated. Additionally, we assume that clients will close the TCP
connections once they no longer need it.
- Errors on the TCP stream to an upstream resolver result in `SERVFAIL`
responses to the client.
- All TCP connections to upstream resolvers get reset when we roam, all
currently ongoing queries will be answered with `SERVFAIL`.
- Upon network reset (i.e. roaming), we also re-allocate new local ports
for all TCP sockets, similar to our UDP sockets.

Resolves: #6140.

[0]: https://www.ietf.org/rfc/rfc9210.html#section-3-5
2024-10-18 03:40:50 +00:00
dependabot[bot]
56701d3989 build(deps): Bump lycheeverse/lychee-action from 1.10.0 to 2.0.2 (#7046)
Bumps
[lycheeverse/lychee-action](https://github.com/lycheeverse/lychee-action)
from 1.10.0 to 2.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lycheeverse/lychee-action/releases">lycheeverse/lychee-action's
releases</a>.</em></p>
<blockquote>
<h2>Version 2.0.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Fix a typos by <a
href="https://github.com/szepeviktor"><code>@​szepeviktor</code></a> in
<a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/257">lycheeverse/lychee-action#257</a></li>
<li>Document and use correct permissions in the GitHub workflows by <a
href="https://github.com/dscho"><code>@​dscho</code></a> in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/258">lycheeverse/lychee-action#258</a></li>
<li>Add security policy by <a
href="https://github.com/mondeja"><code>@​mondeja</code></a> in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/259">lycheeverse/lychee-action#259</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/szepeviktor"><code>@​szepeviktor</code></a>
made their first contribution in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/257">lycheeverse/lychee-action#257</a></li>
<li><a href="https://github.com/mondeja"><code>@​mondeja</code></a> made
their first contribution in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/259">lycheeverse/lychee-action#259</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lycheeverse/lychee-action/compare/v2...v2.0.2">https://github.com/lycheeverse/lychee-action/compare/v2...v2.0.2</a></p>
<h2>Version 2.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Don't remove the lychee config file by <a
href="https://github.com/dmathieu"><code>@​dmathieu</code></a> in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/255">lycheeverse/lychee-action#255</a></li>
<li>Bump lycheeverse/lychee-action from 1 to 2 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/252">lycheeverse/lychee-action#252</a></li>
<li>Fix variable name in docs by <a
href="https://github.com/kdeldycke"><code>@​kdeldycke</code></a> in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/253">lycheeverse/lychee-action#253</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/dmathieu"><code>@​dmathieu</code></a>
made their first contribution in <a
href="https://redirect.github.com/lycheeverse/lychee-action/pull/255">lycheeverse/lychee-action#255</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lycheeverse/lychee-action/compare/v2...v2.0.1">https://github.com/lycheeverse/lychee-action/compare/v2...v2.0.1</a></p>
<h2>Version 2.0.0</h2>
<h2>Breaking Changes</h2>
<p><strong>Note:</strong> This release improves the action's robustness
by changing default behaviors. Changes are only required if you want to
opt out of the new failure conditions. Most users won't need to modify
their existing configurations.</p>
<h3>Fail pipeline on error by default</h3>
<p>We've changed the default behavior: pipelines will now fail on broken
links automatically. This addresses user feedback that not failing on
broken links was unexpected (see [issue <a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/71">#71</a>](<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/71">lycheeverse/lychee-action#71</a>)).</p>
<p><strong>What you need to do:</strong></p>
<ul>
<li>Update to version 2 of this action to apply this change.</li>
<li>Users of the <code>lychee-action@master</code> branch don't need to
make any changes, as <code>fail: true</code> has been the default there
for a while.</li>
<li>If you prefer the old behavior, explicitly set <code>fail</code> to
<code>false</code> when updating:</li>
</ul>
<pre lang="yaml"><code>- name: Link Checker
  id: lychee
  uses: lycheeverse/lychee-action@v2
  with:
    fail: false  # Don't fail action on broken links
</code></pre>
<h3>Fail pipeline if no links were found</h3>
<p>Similar to the above change, we now fail the pipeline if no links are
found during a run. This helps warn users about potential configuration
issues.</p>
<p><strong>What you need to do:</strong></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="7cd0af4c74"><code>7cd0af4</code></a>
Merge commit from fork</li>
<li><a
href="8ad54d3568"><code>8ad54d3</code></a>
fix link</li>
<li><a
href="762333c189"><code>762333c</code></a>
Create SECURITY.md (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/259">#259</a>)</li>
<li><a
href="71a38a3bd7"><code>71a38a3</code></a>
Document and use correct permissions in the GitHub workflows (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/258">#258</a>)</li>
<li><a
href="f141760066"><code>f141760</code></a>
Fix a typos (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/257">#257</a>)</li>
<li><a
href="2bb232618b"><code>2bb2326</code></a>
don't remove the lychee config file (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/255">#255</a>)</li>
<li><a
href="731bf1a2af"><code>731bf1a</code></a>
Fix variable name (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/253">#253</a>)</li>
<li><a
href="e360f3c891"><code>e360f3c</code></a>
Bump lycheeverse/lychee-action from 1 to 2 (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/252">#252</a>)</li>
<li><a
href="f87f0a6299"><code>f87f0a6</code></a>
Update version to <code>lycheeverse/lychee-action@v2</code> in docs</li>
<li><a
href="7da8ec1fc4"><code>7da8ec1</code></a>
Test latest lychee version tag (<a
href="https://redirect.github.com/lycheeverse/lychee-action/issues/236">#236</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/lycheeverse/lychee-action/compare/v1.10.0...v2.0.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=lycheeverse/lychee-action&package-manager=github_actions&previous-version=1.10.0&new-version=2.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-10-15 23:18:26 +00:00
Reactor Scram
bfb3250ae2 chore(ci/rust): build and test more packages in Windows (#7036)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-10-15 21:22:27 +00:00
Reactor Scram
786fbc6689 chore(gui-client): delete GTK+ and Iced prototypes (#7035)
We don't need these since Tauri v2 looks like it's about to succeed, and
keeping packages outside of the workspace has been breaking dependabot
PRs
2024-10-15 15:29:11 +00:00
Thomas Eizinger
aee5019329 ci: enable unstable tokio logging for tests (#7038)
Hopefully helps in debugging #6953.
2024-10-14 22:45:03 +00:00
Reactor Scram
0d134a4f01 chore(rust/gui-client): bump GUI to 1.3.9 to fix a crash (#6993)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-10-09 21:44:40 +00:00
Reactor Scram
637c9d0e20 chore(rust/gtk-client): update lockfile (#6973)
I think this was missed during the last dependabot cycle

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-10-08 22:17:35 +00:00
Reactor Scram
61fbfdcbe0 chore(automation): tell dependabot about rust/gtk-client (#6969)
Closes #6968
2024-10-08 20:13:28 +00:00
Reactor Scram
c4ddae7da2 chore(rust/gui-client): cut a GUI release to fix the WSL issue (#6972) 2024-10-08 17:42:46 +00:00
Thomas Eizinger
650e31c784 ci: remove outdated integration tests (#6922)
Since we've added these tests, `connlib`'s test coverage has increased
significantly to the point where we don't need all of them anymore.
Especially pretty much everything in regards to relays is unnecessary to
be tested using docker.

These integration tests are sometimes flaky due to docker not starting
or images failing to pull. Thus, having fewer of them is better because
it increases CI reliability. Also, there are only so many jobs that
GitHub will execute in parallel so having less jobs is better for that
too.

Resolves: #6451.

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-08 16:39:18 +00:00
Reactor Scram
29b5a3c3c4 chore(rust/gui-client): start a GTK 3 prototype (#6838)
Refs #6927

This PR creates a GTK+ event loop, a blank window, and the tray menu. It
connects to the IPC service, you can sign in and everything, but the
About window, Settings window, and Welcome window aren't implemented.

We build a deb package in CI but it isn't pushed to the draft releases
in CD yet.


![image](https://github.com/user-attachments/assets/a0759021-c8c2-4232-8538-654800f29802)

Pros over Iced:
- More mature
- Easy integration with `tray-icon`
- Small binaries (< 1 MB for this example)

Cons:
- GTK 3.x is abandoned as of March. GTK 4 isn't packaged for Ubuntu
20.04.
- Widgets might be hard to use
- Hard to set up on Windows, only using this for Linux for now

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-07 15:08:19 +00:00
Jamil
613127d298 ci: Bump all clients and gateway (#6923)
Main fix: idle connection timing. These have already been released.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-10-03 07:12:52 -07:00
Jamil
8e326d24bb docs: add note on how to rotate client secret for windows code signing (#6900)
Moved the code signing to our US-based Azure account
(firezoneprod.onmicrosoft.com)

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Brian Manifold <bmanifold@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-02 17:35:40 +00:00
Reactor Scram
9bee6860d0 chore(ci): remove unused env var (#6903)
`SENTRY_ENVIRONMENT` is only read at run time, not at build time, and we
override the environment in our code anyway, so this env var was doing
nothing.
2024-10-02 15:07:54 +00:00
Thomas Eizinger
5e51583547 ci(rust): increase number of proptest runs (#6910)
Our tests are pretty fast now, meaning we can afford running more
permutations. This makes it less likely to encounter flakes in the
"coverage" tests where we grep for certain log lines to ensure that the
tests hit certain code paths.

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2024-10-02 15:07:45 +00:00
Reactor Scram
d2a8155ba7 fix(rust/client): set sentry release version and environment correctly (#6855)
Closes #6854 


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

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

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

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

Example screenshot of sentry.io with a caught panic:

<img width="861" alt="image"
src="https://github.com/user-attachments/assets/c5188d86-10d0-4d94-b503-3fba51a21a90">
2024-09-27 16:34:54 +00:00
Thomas Eizinger
7209060c42 test(connlib): assert determinism of strategies in unit-test (#6846)
In the past, we struggled a lot of the reproducibility of `tunnel_test`
failures because our input state and transition strategies were not
deterministic. In the end, we found out that it was due to the iteration
order of `HashMap`s.

To make sure this doesn't regress, we added a check to CI at the time
that compares the debug output of all regression seeds against a 2nd run
and ensures they are the same. That is overall a bit wonky.

We can do better by simple sampling a value from the strategy twice from
a test runner with the same seed. If the strategy is deterministic,
those need to be the same. We still rely on the debug output being
identical because:

a. Deriving `PartialEq` on everything is somewhat cumbersome
b. We actually care about the iteration order which a fancy `PartialEq`
implementation might ignore
2024-09-27 14:46:51 +00:00
Reactor Scram
8ae1eb7721 chore(ci): alphabetize Windows packages (#6824)
Also add `firezone-logging` which slipped through

This is factored out from #6782
2024-09-26 22:13:50 +00:00
Jamil
62f99bd2a4 fix(ci): Reduce log level for android upload release workflow (#6830)
Reduces the likelihood we log something sensitive.
2024-09-26 06:50:42 +00:00
Jamil
c5561163e1 ci: Bump GUI and Headless for DNS ambiguity fix (#6829)
Bump gui/headless clients for #6809
2024-09-26 03:13:55 +00:00
Jamil
332a9fe352 ci: bump all clients to include fix for #6781 (#6820)
bump all clients to include #6781 fix

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-09-25 19:27:50 +00:00
Reactor Scram
990119b0f1 chore(codespell): tell codespell to ignore rust/iced-client/target (#6785)
Also put the `/rust` skips together

I overlooked this in the previous PR because I committed everything
before my new VM had codespell set up
2024-09-20 14:14:04 +00:00
Reactor Scram
b06f2e30e9 chore(rust/gui-client): Iced prototype (#6606)
Adds a prototype `iced` GUI client to the workspace. This needs more
work before we can swap it in and replace the Tauri client.

Refs #4883 

<img width="683" alt="image"
src="https://github.com/user-attachments/assets/b2c85224-fb7f-4f3e-a2e0-3b184e971dda">
2024-09-19 15:31:50 +00:00
Jamil
4a1dc23a7e ci: Bump Apple and GUI versions (#6776)
Mainly to get DNS logging improvements out.
2024-09-19 07:13:33 -07:00
dependabot[bot]
43b8a97ee1 build(deps): Bump hashicorp/tfc-workflows-github from 1.3.0 to 1.3.1 (#6118)
Bumps
[hashicorp/tfc-workflows-github](https://github.com/hashicorp/tfc-workflows-github)
from 1.3.0 to 1.3.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/releases">hashicorp/tfc-workflows-github's
releases</a>.</em></p>
<blockquote>
<h2>v1.3.1</h2>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.1">tfc-workflows-tooling@v1.3.1</a></li>
<li>Compiles for Linux regardless of current CPU architecture when using
the provided Dockerfile by <a
href="https://github.com/ggambetti"><code>@​ggambetti</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/113">hashicorp/tfc-workflows-tooling#113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/hashicorp/tfc-workflows-github/blob/main/CHANGELOG.md">hashicorp/tfc-workflows-github's
changelog</a>.</em></p>
<blockquote>
<h1>v1.3.1</h1>
<ul>
<li>Bug fixes and enhancements from <a
href="https://github.com/hashicorp/tfc-workflows-tooling/releases/tag/v1.3.1">tfc-workflows-tooling@v1.3.1</a></li>
<li>Compiles for Linux regardless of current CPU architecture when using
the provided Dockerfile by <a
href="https://github.com/ggambetti"><code>@​ggambetti</code></a> <a
href="https://redirect.github.com/hashicorp/tfc-workflows-tooling/pull/113">hashicorp/tfc-workflows-tooling#113</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="5bd1031f2e"><code>5bd1031</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2974">#2974</a>
from hashicorp/release/v1.3.1</li>
<li><a
href="b2e72f369d"><code>b2e72f3</code></a>
fix: link in changelog entry</li>
<li><a
href="29b0596744"><code>29b0596</code></a>
prepare v1.3.1 release</li>
<li><a
href="3fa28309b9"><code>3fa2830</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/2950">#2950</a>
from lucymhdavies/patch-1</li>
<li><a
href="485f3828af"><code>485f382</code></a>
Correct links to starter workflow templates</li>
<li><a
href="0207987bdb"><code>0207987</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/1675">#1675</a>
from hashicorp/mjyocca/disable-workflows</li>
<li><a
href="0c302783ed"><code>0c30278</code></a>
chore: disable sync workflow</li>
<li><a
href="9d17c9cb09"><code>9d17c9c</code></a>
Merge pull request <a
href="https://redirect.github.com/hashicorp/tfc-workflows-github/issues/45">#45</a>
from hashicorp/TF-11430/rebrand</li>
<li><a
href="a39678613f"><code>a396786</code></a>
docs: update workflow file refs to HCP Terraform</li>
<li><a
href="b793b8fe2e"><code>b793b8f</code></a>
chore: rename workflow filenames</li>
<li>Additional commits viewable in <a
href="https://github.com/hashicorp/tfc-workflows-github/compare/v1.3.0...v1.3.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=hashicorp/tfc-workflows-github&package-manager=github_actions&previous-version=1.3.0&new-version=1.3.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

You can trigger a rebase of this PR 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>

> **Note**
> Automatic rebases have been disabled on this pull request as it has
been open for over 30 days.

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-17 16:12:42 -06:00
Reactor Scram
fae0c0753e refactor(rust/gui-client): fix warnings when building in release mode (#6709)
This happens because the smoke test is stubbed out for release builds,
so any `use` statements that are only used in the smoke tests will cause
a warning in `--release` builds, including when we make release bundles.
2024-09-17 17:34:58 +00:00
Reactor Scram
5fd3e9dea2 test(ci/kotlin): fix warnings from GitHub (#6730)
<img width="630" alt="image"
src="https://github.com/user-attachments/assets/9372eb1c-9e3f-4120-9c0c-0ac3ffb80d55">
2024-09-17 17:31:33 +00:00
Jamil
3e30bab965 ci: Bump GUI client to 1.3.3 (#6691)
Bumps the GUI client to 1.3.3 to publish #6681
2024-09-13 22:29:51 +00:00
Reactor Scram
af004effd9 chore(rust/gui-client): fix incorrect -modified in the Git version (#6597)
This is #3384 happening again

CI debugging indicates that Cargo is adding a feature to Cargo.toml for
some reason:
https://github.com/firezone/firezone/actions/runs/10713137607/job/29704715158#step:10:40

So I'll have to give up on that clever thing of removing the Tauri
`notification` feature on Windows where we don't use it, since Linux
still uses it for now.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-09-12 16:32:10 +00:00
Thomas Eizinger
133c2565b2 refactor(connlib): merge IpPacket and MutableIpPacket (#6652)
Currently, we have two structs for representing IP packets: `IpPacket`
and `MutableIpPacket`. As the name suggests, they mostly differ in
mutability. This design was originally inspired by the `pnet_packet`
crate which we based our `IpPacket` on. With subsequent iterations, we
added more and more functionality onto our `IpPacket`, like NAT64 &
NAT46 translation. As a result of that, the `MutableIpPacket` is no
longer directly based on `pnet_packet` but instead just keeps an
internal buffer.

This duplication can be resolved by merging the two structs into a
single `IpPacket`. We do this by first replacing all usages of
`IpPacket` with `MutableIpPacket`, deleting `IpPacket` and renaming
`MutableIpPacket` to `IpPacket`. The final design now has different
`self`-receivers: Some functions take `&self`, some `&mut self` and some
consume the packet using `self`.

This results in a more ergonomic usage of `IpPacket` across the codebase
and deletes a fair bit of code. It also takes us one step closer towards
using `etherparse` for all our IP packet interaction-needs. Lastly, I am
currently exploring a performance-optimisation idea that stack-allocates
all IP packets and for that, the current split between `IpPacket` and
`MutableIpPacket` does not really work.

Related: #6366.
2024-09-11 22:32:49 +00:00
Gabi
235c2f3b16 chore: release GUI 1.3.2 (#6625)
Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-09-06 19:12:50 +00:00
Jamil
443826ab4b chore: use ubuntu-22.04-runners (#6626)
Looks like the ubuntu-20.04-arm runner is no longer available 👎
2024-09-06 11:54:03 -07:00
Jamil
ae5613b223 ci: Update changelog for 1.3.1ish clients (#6612)
Bumps internet resource UI.
2024-09-06 00:07:52 +00:00
Reactor Scram
5eab912f60 refactor(rust/gui-client): begin isolating Tauri from our code (#6593)
This moves about 2/3rds of the code from `firezone-gui-client` to
`firezone-gui-client-common`.

I tested it in aarch64 Windows and cycled through sign-in and sign-out
and closing and re-opening the GUI process while the IPC service stays
running. IPC and updates each get their own MPSC channel in this, so I
wanted to be sure it didn't break.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-09-05 17:42:45 +00:00
Thomas Eizinger
578363a7fe refactor(ip-packet): introduce etherparse (#6524)
This PR introduces the `etherparse` dependency for parsing and
generating IP packets.

Using `etherparse`, we can implement the NAT46 & NAT64 implementations
for the gateway more elegantly because it allows us to parse the IP and
protocol headers into a static and much richer representation. The
conversion to the IPv4/IPv6 equivalent is then just a question of
transforming one data structure into another and writing it to the
correct place in the buffer.

We extract this functionality into dedicated `nat64` and `nat46`
modules.

Furthermore, we implement the various functions in `ip_packet::make`
using `etherparse` too. Following that, we also overhaul the NAT
translation tests that we have in `ip_packet::proptests`. Those now use
the more low-level `consume_to_ipX` APIs which makes the tests more
ergonomic to write.

In the future, we should upstream `Ipv4HeaderSliceMut` and
`Ipv6HeaderSliceMut` to `etherparse`.

Moving all of this functionality to `etherparse` will make it easier to
write tests that involve more IP packets as well as customise the
behaviour of our NAT.

Related: #5614.
Related: #6371.
Related: #6353.
2024-09-04 20:01:01 +00:00
Thomas Eizinger
de90596d79 ci: remove test data upload (#6567)
This upload never worked because we generate too many test files. Now
that the tests are deterministic, we shouldn't need that.
2024-09-03 15:12:17 +00:00
dependabot[bot]
db6f712d63 build(deps): Bump gradle/actions from 3 to 4 (#6527)
Bumps [gradle/actions](https://github.com/gradle/actions) from 3 to 4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/gradle/actions/releases">gradle/actions's
releases</a>.</em></p>
<blockquote>
<h2>v4.0.0</h2>
<p>Final release of <code>v4.0.0</code> of the
<code>setup-gradle</code>, <code>dependency-submission</code> and
<code>wrapper-validation</code> actions provided under
<code>gradle/actions</code>.
This release is available under the <code>v4</code> tag.</p>
<h2>Major changes from the <code>v3</code> release</h2>
<h3>The <code>arguments</code> parameter has been removed</h3>
<p>Using the action to execute Gradle via the <code>arguments
</code>parameter was deprecated in <code>v3</code> and this parameter
has been removed.
<a
href="https://github.com/gradle/actions/blob/v4.0.0-rc.1/docs/deprecation-upgrade-guide.md#using-the-action-to-execute-gradle-via-the-arguments-parameter-is-deprecated">See
here for more details</a>.</p>
<h3>Cache cleanup enabled by default</h3>
<p>After a number of fixes and improvements, this release enables <a
href="https://github.com/gradle/actions/blob/v4.0.0-rc.1/docs/setup-gradle.md#configuring-cache-cleanup">cache-cleanup</a>
by default for all Jobs using the <code>setup-gradle</code> and
<code>dependency-submission</code> actions.</p>
<p>Improvements and bugfixes related cache cleanup:</p>
<ul>
<li>By default, cache cleanup is not run if any Gradle build fails (<a
href="https://redirect.github.com/gradle/actions/issues/71">#71</a>)</li>
<li>Cache cleanup is not run after configuration-cache reuse (<a
href="https://redirect.github.com/gradle/actions/issues/19">#19</a>)</li>
</ul>
<p>This feature should help to minimize the size of entries written to
the GitHub Actions cache, speeding up builds and reducing cache
usage.</p>
<h3>Wrapper validation enabled by default</h3>
<p>In <code>v3</code>, the <code>setup-gradle</code> action was enhanced
to support Gradle wrapper validation, removing the need to use a
separate workflow
file with the <code>gradle/actions/wrapper-validation</code> action.</p>
<p>With this release, wrapper validation has been significantly
improved, and is now enabled by default (<a
href="https://redirect.github.com/gradle/actions/issues/12">#12</a>):</p>
<ul>
<li>The <code>allow-snapshot-wrappers</code> makes it possible to
validate snapshot wrapper jars using <code>setup-gradle</code>.</li>
<li>Checksums for <a
href="https://services.gradle.org/distributions-snapshots/">nightly and
snapshot Gradle versions</a> are now validated (<a
href="https://redirect.github.com/gradle/actions/issues/281">#281</a>).</li>
<li>Valid wrapper checksums are cached in Gradle User Home, reducing the
need to retrieve checksum values remotely (<a
href="https://redirect.github.com/gradle/actions/issues/172">#172</a>).</li>
<li>Reduce network calls in <code>wrapper-validation</code> for new
Gradle versions: By only fetching wrapper checksums for Gradle versions
that were not known when this action was released, this release reduces
the likelihood that a network failure could cause failure in wrapper
validation (<a
href="https://redirect.github.com/gradle/actions/issues/171">#171</a>)</li>
<li>Improved error message when <code>wrapper-validation</code> finds no
wrapper jars (<a
href="https://redirect.github.com/gradle/actions/issues/284">#284</a>)</li>
</ul>
<p>Wrapper validation is important for supply-chain integrity. Enabling
this feature by default will increase the coverage of wrapper
validation on projects using GitHub Actions.</p>
<h3>New input parameters for Dependency Graph generation</h3>
<p>Some dependency-graph inputs that could previously only be configured
via environment variables now have dedicated action inputs:</p>
<ul>
<li><code>dependency-graph-report-dir</code>: sets the location where
dependency-graph reports will be generated</li>
<li><code>dependency-graph-exclude-projects</code> and
<code>dependency-graph-include-projects</code>: <a
href="https://github.com/gradle/actions/blob/v4.0.0-rc.1/docs/dependency-submission.md#selecting-gradle-projects-that-will-contribute-to-the-dependency-graph">select
which Gradle projects will contribute to the generated dependency
graph</a>.</li>
<li><code>dependency-graph-exclude-configurations</code> and
<code>dependency-graph-include-configurations</code>: <a
href="https://github.com/gradle/actions/blob/v4.0.0-rc.1/docs/dependency-submission.md#selecting-gradle-configurations-that-will-contribute-to-the-dependency-graph">select
which Gradle configurations will contribute to the generated dependency
graph</a>.</li>
</ul>
<h3>Other improvements</h3>
<ul>
<li>In Job summary, the action now provides an explanation when cache is
set to <code>read-only</code> or <code>disabled</code> (<a
href="https://redirect.github.com/gradle/actions/issues/255">#255</a>)</li>
<li>When <code>setup-gradle</code> requests a specific Gradle version,
the action will no longer download and install that version if it is
already available on the <code>PATH</code> of the runner (<a
href="https://redirect.github.com/gradle/actions/issues/270">#270</a>)</li>
<li>To attempt to speed up builds, the <code>setup-gradle</code> and
<code>dependency-submission</code> actions now attempt to use the
<code>D:</code> drive for Gradle User Home if it is available (<a
href="https://redirect.github.com/gradle/actions/issues/290">#290</a>)</li>
</ul>
<h2>Deprecations and breaking changes</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="16bf8bc8fe"><code>16bf8bc</code></a>
Rework docs for Develocity support</li>
<li><a
href="faf4eeacd5"><code>faf4eea</code></a>
[bot] Update dist directory</li>
<li><a
href="4b7cc6e174"><code>4b7cc6e</code></a>
Differentiate Gradle 8.1 from 8.10 when checking version (<a
href="https://redirect.github.com/gradle/actions/issues/358">#358</a>)</li>
<li><a
href="0873530e60"><code>0873530</code></a>
Increase Gradle version coverage for init-scripts</li>
<li><a
href="f67327f0c8"><code>f67327f</code></a>
[bot] Update dist directory</li>
<li><a
href="d32a10b3ae"><code>d32a10b</code></a>
Dependency updates (<a
href="https://redirect.github.com/gradle/actions/issues/356">#356</a>)</li>
<li><a
href="e598a32529"><code>e598a32</code></a>
Quote version 8.10 in integ test</li>
<li><a
href="d6c8cf816c"><code>d6c8cf8</code></a>
Bump unzip-stream from 0.3.1 to 0.3.4 in /sources</li>
<li><a
href="79ea5b8f3e"><code>79ea5b8</code></a>
Bump org.junit.jupiter:junit-jupiter</li>
<li><a
href="d77a030aaf"><code>d77a030</code></a>
Bump com.google.guava:guava in /.github/workflow-samples/kotlin-dsl</li>
<li>Additional commits viewable in <a
href="https://github.com/gradle/actions/compare/v3...v4">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-02 22:27:55 +00:00
Jamil
c6b0b0a922 ci: Release 1.3.0 for Internet Resource (#6503)
This publishes the 1.3.0 clients and gateways so that Internet Resources
will work.

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

Closes #2667
2024-08-30 01:21:34 -07:00
Jamil
c66f0c15c0 ci: Draft bump 1.3.0 clients (#6470)
- Internet resources
2024-08-29 23:33:02 -07:00
Reactor Scram
c8a7820dae feat(rust/gui-client): daily update checks (#6449)
Closes #5811 

<img width="206" alt="image"
src="https://github.com/user-attachments/assets/a2c46bb6-c76a-49ca-a933-4363597d4029">

- Waits a random amount of time up to 24 hours before the first network
check, to avoid the thundering herd problem
- Polls every 24 hours (86,400 seconds) after that
- Saves the network response to disk so we ~~can show "Update ready"
immediately at startup~~ won't notify twice about the same version
- Not clear whether suspending the computer suspends the timer - "it is
also not specified whether system suspends count as elapsed time or not.
The behavior varies across platforms and Rust versions."

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-29 19:09:33 +00:00
Jamil
ac8ae14c51 fix(ci): Fix update-release-draft name so we can require it in branch protection rules (#6484)
This makes the job name deterministic so we can add it to branch
protection rules.
2024-08-29 10:06:53 -07:00
Reactor Scram
0f62c08070 ci: Bump GUI to 1.2.2 (#6481)
- No known issues from the knowledge base were fixed
- I confirmed on the Windows laptop that the fix for #6469 is in this
MSI.
- The changelog looks good in the Vercel preview

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-08-29 15:26:22 +00:00
Jamil
36fc4cb593 fix(ci): Always build debug images - release binaries with debug tools (#6474)
This will always build images we can use for last-minute compatibility
tests, even if the merge group was bypassed.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-28 16:58:40 -07:00
Thomas Eizinger
35017537c7 feat(gateway): allow out-of-order allow_access requests (#6403)
Currently, the gateway requires a strict ordering of first receiving a
`request_connection` message, following by multiple `allow_access`
messages. Additionally, access can be granted as part of the initial
`request_connection` message too.

This isn't an ideal design. Setting up a new connection is infallible,
all we need to do is send our ICE credentials back to the client.
However, untangling that will require a bit more effort.

Starting with #6335, following this strict order on the client is a more
difficult. Whilst we can send them in order, it is harder to maintain
those ordering guarantees across all our systems.

To avoid this, we change the gateway to perform an upsert for its local
ACLs for a client. In case that an `allow_access` call would somehow get
to the gateway earlier, we can simply already create the `Peer` and only
set up the actual connection later.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-28 13:10:06 +00:00
Jamil
ea33b7868f ci: Bump GUI to 1.2.1 (#6462) 2024-08-27 22:19:26 -07:00
Jamil
2b030d801d feat(android): Bundle GITHUB_SHA into Android client (#6405)
Closes #6400 


<img width="659" alt="Screenshot 2024-08-21 at 11 24 16 PM"
src="https://github.com/user-attachments/assets/c1240406-4dda-41df-a36e-1ed9e9b0895a">
2024-08-27 05:17:22 +00:00
Jamil
84a981f668 refactor(ci): Remove browser-based integration tests (#6435)
Fixes a new issue with puppeteer, chromium 128, and Alpine 3.20 that's
causing failing browser tests.

See more: https://github.com/puppeteer/puppeteer/issues/12189

Failure:

https://github.com/firezone/firezone/actions/runs/10549430305/job/29224528663?pr=6391

Unfortunately, puppeteer's embedded browser doesn't seem to want to run
in Alpine:


https://github.com/firezone/firezone/actions/runs/10563167497/job/29265175731?pr=6435#step:6:56


Fixing this is proving very difficult since we can't seem to use
puppeteer with the latest Alpine images, so I questioned the need to
have these in at all. These tests were added at a time where the DNS
mappings were brittle, so we wanted to verify that relayed and direct
connections held up as we deployed.

This is no longer the case, and we also now have much more unit test
coverage around these things, so given the pain of maintaining these
(and the lack of a current solution to the above), they are removed.

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-08-26 20:01:00 +00:00