Commit Graph

5002 Commits

Author SHA1 Message Date
Thomas Eizinger
8ec6a809a1 refactor(relay): use RangeInclusive to specify available ports (#5820) 2024-07-11 06:26:21 +00:00
Jamil
f6b6055f65 fix(website): use 256x256 icon size (#5838) 2024-07-10 19:39:33 -07:00
Thomas Eizinger
00a3940717 chore(rust): introduce tokio workspace dependency (#5821)
We are referencing the `tokio` dependency a lot and it makes sense to
ensure that version is tracked only once across the whole workspace.

Extracted out of #5797.

---------

Co-authored-by: Not Applicable <ReactorScram@users.noreply.github.com>
2024-07-10 23:40:34 +00:00
Thomas Eizinger
0c2648dae2 test(connlib): correctly scope state within tunnel_test (#5809)
Currently, the type hierarchy within `tunnel_test` is already quite
nested: We have a `Host` that wraps a `SimNode` which wraps a
`ClientState` or `GatewayState`. Additionally, a lot of state that is
actually _per_ client or _per_ gateway is tracked in the root of
`ReferenceState` and `TunnelTest`. That makes it difficult to introduce
multiple gateways / clients to this test.

To fix this, we introduce dedicated `RefClient` and `RefGateway` states.
Those track the expected state of a particular client / gateway.
Similarly, we introduce dedicated `SimClient` and `SimGateway` structs
that track the simulation state by wrapping the corresponding
system-under-test: `ClientState` a `GatewayState`.

This ends up moving a lot of code around but has the great benefit that
all the state is now scoped to a particular instance of a client or a
gateway, paving the way for creating multiple clients & gateways in a
single test.
2024-07-10 23:22:19 +00:00
Reactor Scram
7e04d62daa fix(gui-client): catch IPC connection dropouts as fatal errors (#5795)
Closes #5760, refs #5790

Also removes some redundant IPC-related code that was nearby.

If you stop the IPC service, e.g. due to an update on Linux, it will say
"IPC connection closed". This isn't ideal but at least the Client does
catch it now, instead of failing on the next IPC send.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-10 22:38:55 +00:00
Reactor Scram
15ad0fa80d chore(changelog): fix prose (#5831)
Looks like this is from #5767
2024-07-10 22:20:56 +00:00
Reactor Scram
c8c349ac41 refactor(gui-client): simplify IPC and how Resources in the menu are updated (#5824)
The Arc+Notify thing was always overkill, I just thought it was useful
early on. With the IPC change it's easier to just use the existing MPSC
channel

Also removing `TunnelReady` and assuming that the tunnel is ready
whenever connlib sends us the first Resource list

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-10 21:37:59 +00:00
Reactor Scram
c3380daa75 fix(gui-client/windows): deactivate DNS control when we stop connlib (#5828)
Closes #5827

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-07-10 20:29:16 +00:00
Reactor Scram
78f1c7c519 test(firezone-tunnel/windows): Test Windows upload speed in CI (#5607)
Closes #5601
It looks like we can hit 100+ Mbps in theory. This covers Wintun, Tokio,
and Windows OS overhead. It doesn't cover the cryptography or anything
in connlib itself.

The code is kinda messy but I'm not sure how to clean it up so I'll just
leave it for review.

This test should fail if there's any regressions in #5598.

It fails if any packet is dropped or if the speed is under 100 Mbps

```[tasklist]
### Tasks
- [x] Use `ip_packet::make`
- [x] Switch to `cargo bench`
- [x] Extract windows ARM PR
- [x] Clean up wintun.dll install code
- [x] Re-request review
```
2024-07-10 19:09:45 +00:00
Jamil
a91d49b1ff fix: update favicon with bg and border (#5826)
Fixes #5822
2024-07-10 18:55:14 +00:00
Reactor Scram
565602fadb refactor(headless-client): clean up signal handling code (#5799)
Left over from #5789 

This removes SIGHUP for the IPC service, which doesn't handle it anyway,
so it removes a code path that would just panic.

```[tasklist]
### Tasks
- [ ] Can we test this at all?
```
2024-07-10 18:38:24 +00:00
Jamil
446d24a761 ci: Fix scoping dialyzer cache to elixir version (#5825)
This fixes a CI bug where the dialyzer cache was not being scoped to the
elixir version, causing cache issues that fail CI jobs.

This also performs some tidying up of the cache key to scope it by
runner arch too for elixir deps, and make clear what the cache key
references.

https://github.com/firezone/firezone/actions/runs/9877195625
2024-07-10 18:01:32 +00:00
FTB_lag
63e5277b3e chore(website): Add missing section in Install Clients (#5791) 2024-07-10 10:50:41 -07:00
Thomas Eizinger
0e6ac2040c test(connlib): use two relays in tunnel_test (#5804)
With the introduction of a routing table in #5786, we can very easily
introduce an additional relay to `tunnel_test`. In production, we are
always given two relays and thus, this mimics the production setup more
closely.
2024-07-09 23:47:35 +00:00
Jamil
ae87abacff chore: move AWS firezone-gateway module to dedicated repo (#5816)
Why:

Managing the module from Terraform registry is simpler if our published
module is in its own repo.

See https://github.com/firezone/terraform-firezone-aws
2024-07-09 14:05:14 -07:00
Andrew Dryga
117d736c4e Enable DNSSEC (#5812)
Already deployed and configured on the registrar.
2024-07-09 10:42:02 -06:00
Thomas Eizinger
f3fa0c7e5f test(connlib): reduce cycles of resource_management test (#5807)
With the performance improvements of `tunnel_test` in #5786, the
`resource_management` test is now in the hot-path of CI runtime. We
reduce the cycles to 50 should cut down overall CI time by ~ 1 minute as
the Windows builds are among the slowest.

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-09 14:50:12 +00:00
Thomas Eizinger
d15c43b6f2 test(connlib): render IDs as hex u128 (#5803)
This is a bit of a hack because features should never change behaviour.
Unfortunately, we can't use `cfg(test)` here because the proptests live
in a different crate and thus for the tests, we import the crate using
`cfg(not(test))`.

Our `proptest` feature is really only meant to be activated during
testing so I think this is fine for now.

The benefit is that the test logs are much more terse because proptest
will shrink the IDs to `0`, `1` etc. With the upcoming addition of
multiple gateways and multiple relays, we will have a lot more IDs in
the logs. Thus, it is important that they stay legible.
2024-07-09 14:23:37 +00:00
Thomas Eizinger
a3c9617faa test(connlib): ensure Windows test module follows conventions (#5806)
By convention, `tests` modules are usually feature-flagged to not end up
in production code. Additionally, a `use super::*;` import line ensures
we have access to the parent module which is usually the one you want to
test.
2024-07-09 14:12:44 +00:00
Thomas Eizinger
f8468813c3 test(tunnel): use hex notation for IPv6 network (#5808) 2024-07-09 14:11:46 +00:00
Thomas Eizinger
79b14d4399 ci: don't build optimised Rust tests (#5805)
In #5786, we massively increase the performance of `tunnel_test` and
thus, it is no longer necessary to build all tests using optimisation
level 1. Windows is very slow in compiling Rust and forcing it to
compile with optimisations doesn't help that.

On `main`, the compile phase takes ~ **8min**:
https://github.com/firezone/firezone/actions/runs/9847792756/job/27188488313#step:5:968

With this patch, the compile phase takes ~**6min**:
https://github.com/firezone/firezone/actions/runs/9849448280/job/27193128597?pr=5805#step:5:967
2024-07-09 13:17:07 +00:00
Jamil
a14f07cf45 Update README.md
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-07-09 06:16:33 -07:00
Jamil
ef3b4e5dfe feat(linux-gui): Bump GUI to 1.1.5 for arm64 support (#5800) 2024-07-08 21:58:10 -07:00
Jamil
cd1b46c8f5 fix(ci): Install GH CLI on arm runners (#5802)
`main` failure:

https://github.com/firezone/firezone/actions/runs/9847918080/job/27190842443

Opened an issue:
https://github.com/actions/runner-images/issues/10192

gh cli instructions:

https://github.com/cli/cli/blob/trunk/docs/install_linux.md#debian-ubuntu-linux-raspberry-pi-os-apt
2024-07-09 02:56:24 +00:00
Thomas Eizinger
9caca475dc test(connlib): introduce routing table to tunnel_test (#5786)
Currently, `tunnel_test` uses a rather naive approach when dispatching
`Transmit`s. In particular, it checks client, gateway and relay
separately whether they "want" a certain packet. In a real network,
these packets are routed based on their IP.

To mimic something similar, we introduce a `Host` abstraction that wraps
each component: client, gateway and relay. Additionally, we introduce a
`RoutingTable` where we can add and remove hosts. With these things in
place, routing a `Transmit` is as easy as looking up the destination IP
in the routing table and dispatching to the corresponding host.

Our hosts are type-safe: client, gateway and relay have different types.
Thus, we abstract over them using a `HostId` in order to know, which
host a certain message is for. Following these patches, we can easily
introduce multiple gateways and relays to this test by simply making
more entries in this routing table. This will increase the test coverage
of connlib.

Lastly, this patch massively increases the performance of `tunnel_test`.
It turns out that previously, we spent a lot of CPU cycles accessing
"random" IPs from very large iterators. With this patch, we take a
limited range of 100 IPs that we sample from, thus drastically
increasing performance of this test. The configured 1000 testcases
execute in 3s on my machine now (with opt-level 1 which is what we use
in CI).

---------

Signed-off-by: Thomas Eizinger <thomas@eizinger.io>
2024-07-09 01:48:54 +00:00
Reactor Scram
927702cd2f chore(gui-client): fix papercuts (#5792)
Closes #5789 

The SIGTERM catching would have helped debug #5790 

```[tasklist]
### Tasks
- [x] catch SIGTERM and log when systemd shuts us down gracefully
- [x] Log architecture at startup
```
2024-07-08 22:20:57 +00:00
Andrew Dryga
a054121233 fix(portal): Fix HTTPS redirects (#5798) 2024-07-08 16:25:55 -06:00
Reactor Scram
fff7d112a5 fix(changelog): typo in the GUI Client changelog (#5796) 2024-07-08 21:41:29 +00:00
Reactor Scram
e0326be807 ci(gui-client/linux): see if we can build the GUI Client for ARM (#5793)
This would make it a little easier to replicate prod issues on old
releases

```[tasklist]
### Tasks
- [x] Add comment to changelog
- [x] Check Vercel preview
- [x] Request review
- [x] Update arches link
- [x] `apt-get update`
- [x] Re-request review
```
2024-07-08 21:30:48 +00:00
Jamil
0ff45c34f9 fix(style): Set prettier prosewrap to preserve to let authors write MD in their own style (#5722)
Prettier has three options for prose-wrap:

- `always`: Format prose (markdown) to the line-length (current)
- `never`: Use a single line for all prose (proposed)
- `preserve`: Don't lint prose

Settled on `preserve` due to discussion.


Fixes #5686

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-07-08 14:26:58 +00:00
Reactor Scram
7469f44fc4 refactor(headless-client): remove unnecessary derived impl of PartialEq (#5758)
I didn't know about `matches!` back then
2024-07-08 13:57:18 +00:00
Jamil
6003f2b424 fix(portal): Clarify label (#5774)
Label isn't quite accurate
2024-07-07 23:02:04 +00:00
Jamil
5947ffbf98 chore(infra): remove double secret "SECRET_KEY_BASE" (#5728) (#5729)
This is a duplicate var that is replaced with the base64 version just
below it.

Co-authored-by: FTB_lag <tabolskyy.git@gmail.com>
2024-07-07 03:58:31 +00:00
Jamil
81bd42f6b0 fix(android): Target sdk 35 (#5785)
I think they meant API level 35...


<img width="1056" alt="Screenshot 2024-07-06 at 5 23 44 PM"
src="https://github.com/firezone/firezone/assets/167144/02930c3b-9173-48b9-b807-79bbff08b33a">
2024-07-07 02:58:26 +00:00
Jamil
1b7338e5c3 fix(website): fix sha of deployed portal (#5782)
Needs a storage key, not an env var to read.
2024-07-06 17:25:00 -07:00
Jamil
aa7977c9b5 chore: bump android 1.1.3 (#5784) 2024-07-06 16:54:14 -07:00
Jamil
7820e3f3c7 fix(android): Strip scope id off IPv6 addresses Android (#5783)
Fixes #5781

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2024-07-06 16:50:30 -07:00
Jamil
7c2796c716 fix(infra): use separate SSL cert resource (#5779) 2024-07-06 13:18:25 -07:00
Jamil
6c8d7a1d8f fix(infra): blog. and docs. need SSL certs too (#5778)
These are needed to be able to redirect.
2024-07-06 12:25:37 -07:00
Jamil
e349f3710e fix(infra): fix CAA and redirect configuration issues (#5777) 2024-07-06 10:46:42 -07:00
Andrew Dryga
8e4e7253e0 chore(portal): Split domains and set separate CAAs records (#5434) 2024-07-06 09:19:38 -07:00
Jamil
4ac447ad1f refactor(website): Update hero layout on landing page (#5771)
Still need to replace the graphic
2024-07-06 00:42:10 -07:00
FTB_lag
2f9175b66a chore(infra): fix docker image and tag for domain (#5769)
Signed-off-by: FTB_lag <tabolskyy.git@gmail.com>
2024-07-05 19:52:37 -07:00
Jamil
ff506ab679 chore(infra): revoke oneleet signups, allow firezonedemo.com (#5770)
- Reverts the access allowing them to sign up on staging.
- Allows `firezonedemo.com` for marketing / sales demos.
2024-07-05 21:02:51 +00:00
Jamil
b7227d1abc docs: GitHub releases -> Changelog (#5763)
Needs to be updated with proper links pointing to changelog, not GH
releases.
2024-07-05 13:19:43 -07:00
Jamil
e39ce22b36 chore: Publish new linux/windows clients (#5767)
Adds the DNS fix.
2024-07-05 13:19:30 -07:00
Jamil
5dc7715dca feat(website): Add shadow to navbar on scroll (#5768)
Prevents problems with it blending in to content.

### Before
<img width="855" alt="Screenshot 2024-07-05 at 11 59 52 AM"
src="https://github.com/firezone/firezone/assets/167144/b5f4a595-26a6-4c48-8195-28dd26a6264e">


### After

<img width="836" alt="Screenshot 2024-07-05 at 11 59 26 AM"
src="https://github.com/firezone/firezone/assets/167144/cb2de469-6717-4991-9c79-b8daf68c5578">
2024-07-05 12:00:31 -07:00
Reactor Scram
35926eb12f refactor(gui-client): connect to the IPC service immediately when the GUI starts (#5704)
I had to change the smoke test because it had a couple issues:
- The IPC socket had the wrong permissions because I didn't realize you
can tell `su` / `sudo` / `runuser` to set a group in addition to setting
a user
- It had a hard-coded timer of 12 seconds, and one time the test failed
because the IPC service exited before the GUI finished loading. So I
changed it so the IPC service in smoke test mode will wait forever for
exactly one client, then quit

```[tasklist]
### Tasks
- [x] Run `chown` in the Ubuntu smoke test
```
2024-07-05 17:44:12 +00:00
Jamil
0239176c8e fix(website): fix wrong link in /support (#5759) 2024-07-05 10:18:20 -07:00
Reactor Scram
663367b605 chore(gui-client): timestamp crash dump file names (#5452)
Closes #5449

The smoke tests expect `last_crash.dmp` at a fixed path, so in this case
we write the file with a timestamped name, then copy it over
`last_crash.dmp`.
2024-07-05 15:21:25 +00:00