Commit Graph

3100 Commits

Author SHA1 Message Date
bmanifold
751df8b3f3 Update styling for Sign In/Up emails (#2907)
Updated the styling for the outbound emails from the portal.

## Preview of the Sign Up Email
<img width="589" alt="sign_up_email"
src="https://github.com/firezone/firezone/assets/2646332/4fdc04de-bc49-4d31-b818-ec5eb546d4b8">

## Preview of the Sign In Email
<img width="592" alt="sign_in_email"
src="https://github.com/firezone/firezone/assets/2646332/c3a21424-0de2-404a-a8e2-f2ae926ddeaf">

This will close #2132
2023-12-15 17:04:13 +00:00
Jamil
922c25e063 Fix upgrade script link (#2923) 2023-12-15 08:06:58 -08:00
Jamil
54e2258264 Gateway upgrade docs (#2914)
Realized we need a small script to upgrade Docker-based gateways
reliably.
2023-12-14 21:20:30 -08:00
Jamil
de71e7060f Reduce webrtc log level to error (#2911) 2023-12-15 01:07:48 +00:00
Jamil
de0a0b911b Use more informative log filepath (#2910)
* Sort clients list by `last_seen_at` desc. This handles the `online?`
case too. Before, they were sorted by `asc` which made it hard to see
which recent clients were connected
* Scope the client log filename by account slug and actor name so it's
easier to find.
2023-12-14 19:45:50 +00:00
Jamil
0014172c0a Don't automatically delete log files after successful upload (#2904)
Prevents cases where "Export logs" doesn't contain the full log cache.

Fixes #2886
2023-12-14 19:31:40 +00:00
Jamil
b332780cc8 Use correct type for ioctl codes (#2905)
Fixes
https://github.com/firezone/firezone/actions/runs/7202636231/job/19621864921
2023-12-14 11:19:37 +00:00
Reactor Scram
aa46089dd1 windows: use settings log_filter instead of env var (#2888)
Stacked on PR #2883

There will be more changes after this PR, these features are still
broken:
- Can't change filter at runtime yet, you have to restart the client app
- connlib and GUI are sending logs to the same connlib logs files, they
should be separated

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-13 23:57:52 +00:00
Reactor Scram
d1a7211f64 windows: Integrate wintun, run the VPN (#2883)
With this one, ICMP and TCP work, but the client doesn't set up routes
or handle DNS yet, so I've been using `netsh` to fake that.

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-13 23:19:36 +00:00
Gabi
186ceb18e6 Connlib: reduce failover timeout (#2897)
This reduces the failover time by depending on webrtc's keepalive
instead of wireguard's.

We have much more control over that, since boringtun doesn't bubble up
any of the keepalives timeout(only a trace warning).

In the a next commit, when things are more stable, we should just get
rid of wireguard's keep alive. When we remove webrtc we will build our
own.

Events based on `keepalive` timeouts are key to our failover system, so
we **need** it.

Draft because it's built on top of #2891 (which is completely separate
code but without that the failover just doesn't work correctly)
2023-12-13 22:40:04 +00:00
Jamil
8499580388 Remove Apple SplitDNS in favor of unified split DNS approach (#2894)
<img width="1552" alt="Screenshot 2023-12-12 at 11 29 43 PM"
src="https://github.com/firezone/firezone/assets/167144/d517c830-64a8-462d-8cb5-c41835fa2059">

Found a reliable way to return default system DNS resolvers on iOS and
macOS. Even if this method is not perfect, I think it's still worth
pursuing because:

* Many administrators will set an upstream resolver in the portal anyway
(bypassing client system resolvers)
* It unifies our Split DNS approach across platforms (assuming we can
query the default system resolvers on Windows), allowing connlib to
intercept all DNS queries on all platforms. This opens the door for some
interesting feature possibilities in the area of malicious query
blocking. This also makes DNS bugs easier to investigate because there's
only one codepath for packets to take. See
https://github.com/firezone/firezone/issues/2859

Draft because it needs more testing and I need to figure out the
`RustVec<RustString>` type for the Swift -> Rust FFI.

Refs #2713
2023-12-13 22:01:00 +00:00
Andrew Dryga
82c013a1eb Replace eth+ with e+ in the unitfile 2023-12-13 15:19:31 -06:00
Jamil
410bd341fa Set the MTU to 1280 on Apple to avoid connectivity issues (#2901)
Unfortunately tunnelOverheadBytes isn't a reliable way to calculate the
MTU.

This could be the issue behind #2855
2023-12-13 21:00:48 +00:00
Andrew Dryga
af7730337c Fix service account tokens and unifile deployment scripts (#2900) 2023-12-13 14:45:59 -06:00
Gabi
34dce6f185 connlib: try to reuse old ips even with new peers (#2891)
When a peer expired the os might have cached the old internal ips that
we used, then with a new peer we were assigning new ips and that cached
ip might have been wrong, then the tunnel would be in state where it
would send the wrong response to this ips.

With this PR we try to always reuse the old ip if there's any available.
2023-12-13 18:33:51 +00:00
Roopesh Chander
862ce47a52 Add a log tab in settings (#2895)
Fixes #2725.

This PR adds a new tab in settings called "Diagnostic Logs". It has:

  - A label saying: "Log directory size: `<size>`"
  - A button to clear the logs
  - A button to export logs

We calculate the log directory size when the user navigates to that tab.
When “Clear logs” button is clicked, we can stop the calculation (if
it’s going on), and then clear the logs. We refresh the log size every 1
min. We stop refreshing when the user goes to another tab. We’ll refresh
when the user navigates to the Log tab.
2023-12-13 18:30:49 +00:00
Gabi
b9cbc1786f connlib: disconnect on token expiration (#2890)
Previously, we just expected the portal to disconnects us and 401 on the
retry, right now we harden that behaviour by also just disconnecting
when token expiration.

This seems to work, there's another part to this which is not only
handling the replies but also handling the message generated by the
portal, I'll implement that when I can easily test expirying tokens, for
now this makes the client much more stable.
2023-12-13 15:10:43 +00:00
Jamil
33bcbbee45 Add a detailed Google Workspace setup guide and other docs (#2876)
- Added google workspace docs at `/kb/authenticate/google`
- Updated in-product Provider creation form with more details and a link
to docs
- Fixed bg-color for unauthenticated layouts

---------

Co-authored-by: Brian Manifold <bmanifold@gmail.com>
2023-12-13 07:16:11 +00:00
Gabi
75d90d7372 connlib: set DNS response type for answers (#2892)
just silly but important mistake 😛 

fixes #2858 and #2859 (though there might be an additional edge case in
#2859 where the upstream server is set as a dns, though it seems to work
some further testing would be good)
2023-12-13 03:14:42 +00:00
Thomas Eizinger
0de16d3676 refactor(connlib): remove async from the Device API (#2815)
At present, the definition of `Device` is heavily nested with
conditional code. I've found this hard to understand and navigate.
Recent refactorings now made it possible to remove a lot of these layers
so we primarily deal with two concepts:

- A `Device` which offers async read and non-blocking write functions
- A `Tun` abstraction which is platform-specific

Instead of dedicated modules, I chose to feature-flag individual
functions on `Device` with `#[cfg(target_family = "unix")]` and
`#[cfg(target_family = "windows")]`. I find this easier to understand
because the code is right next to each other.

In addition, changing the module hierarchy of `Device` allows us to
remove `async` from the public API which is only introduced by the use
of `rtnetlink` in Linux. Instead of making functions across all `Tun`
implementations `async`, we embed a "worker" within the `linux::Tun`
implementation that gets polled before `poll_read`.

---------

Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
2023-12-12 19:47:26 +00:00
Reactor Scram
cd3114cc1d windows: tell Windows that our release builds should always run as admin (#2838)
It'll show UAC when you first run the app. After that we can open and
close the VPN network adapter without showing more UAC dialogs since we
have sudo powers.
2023-12-12 17:49:32 +00:00
Reactor Scram
a339f5b437 feat(windows): generate device ID and persist it on disk (#2840)
Relating to #2697 and #2711

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2023-12-12 17:46:26 +00:00
Gabi
e1fb6c80a0 fix(connlib): attempt to join topic upon unmatched topic error (#2874)
Fixes: #2854.

Note: this is ready for review but reproducing the bug that triggered
the fix takes ~1 hour or so, so I would like to wait to check that's
fixed.

Can be reviewed meanwhile.
2023-12-12 16:57:47 +00:00
Jamil
6e602dd388 Fix Sendgrid records for sending emails for firezone.dev (#2877)
Attempting to up our `firezone.dev` deliverability. Debugging delivery
issues with it.
<img width="2788" alt="Screenshot 2023-12-11 at 5 37 20 PM"
src="https://github.com/firezone/firezone/assets/167144/1cc180ee-670b-41dc-9959-ab962076cff5">
2023-12-12 10:51:13 -06:00
Andrew Dryga
b7a7fff828 Remove relays dependency to reduce state changes 2023-12-12 10:49:21 -06:00
Reactor Scram
5853b13794 windows: add module to install the wintun.dll by embedding it in the client's exe and then copying it out at runtime (#2843)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-12 16:28:48 +00:00
Andrew Dryga
f1e9715d79 Change staging feed channel 2023-12-12 09:41:32 -06:00
Andrew Dryga
52b284abd9 Terraform improvements for production (#2873) 2023-12-11 19:41:01 -06:00
Jamil
ba44b2cbad Usability iteration 1 (#2869)
* Fix numerous typos and grammar
* Align all next/continue action buttons to the right side of the form
* Rework the Gateway deploy page to be more readable and use consistent
colors
* Link to `Troubleshooting` guide for gateway deployments
* Add spacing between `:sections` so they stand out more
* Move help paragraphs into `:help`s
* Make links consistent to `text-accent-500` to match website/docs
(buttons unchanged)
* Add `warning` style button

More to come in further PRs

---------

Co-authored-by: Brian Manifold <bmanifold@gmail.com>
2023-12-11 21:12:53 +00:00
Jamil
2f9d4d8487 Fix visibility for dark screens (#2849)
![IMG_904438F58D46-1](https://github.com/firezone/firezone/assets/167144/adaeb80e-df24-4278-88ff-5db63665f277)
2023-12-11 21:00:11 +00:00
Gabi
8d3bdf7d45 connlib: add dns routes at tunnel init (#2870)
Fixes #2853 

Note: it seems that this actually fixes ERR_NETWORK_CHANGED.
2023-12-11 19:42:55 +00:00
Reactor Scram
8718cc9245 feat(windows): check in wintun x64 DLL 0.14.1 for #2758 (#2842)
Just adds the DLL and header

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-11 19:17:51 +00:00
Jamil
be37ed1b5c Use the dnsFallbackStrategy configured in portal for macOS/iOS (#2860)
Fixes #2857
2023-12-11 00:13:55 +00:00
Jamil
3bcdbb27e4 Remove website gradients (#2847) 2023-12-10 17:30:38 +00:00
Jamil
9c2c719424 Remove duplicate ios/macos builds (#2851)
We're uploading dupe builds of the client on macOS and iOS because we're
testing the build on Xcode 14 and 15.

Since Xcode 15 is stable now, builds for 14 can be removed.
2023-12-10 17:30:28 +00:00
Jamil
7eb568c862 Update NOTICE.txt
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-10 06:10:22 -08:00
Jamil
786e156337 Elixir/domain ops (#2837)
Adds a helper method we can call from a live IEX to provision an account
when signups are disabled.
2023-12-10 01:35:48 +00:00
Jamil
46a950da84 Retry 60 times to reconnect (#2846)
* Reconnect 60 times to reconnect, every second
* Fix "in limbo" animation to occur during reconnecting, disconnecting,
and reasserting states (up to 60 seconds)
2023-12-09 21:46:44 +00:00
Reactor Scram
a8c0c5255f windows: add example / test binary to keep debugging code out of the main exe (#2822)
It doesn't run with `--example` because Tauri's build process doesn't
seem to be compatible with that.
But it does build the permissions test exe in CI. I might change that a
general test exe later so that I don't have to add more build targets.

It adds about 5 minutes to the CI, sccache only seems to speed up the
build for the 2nd exe a tiny bit.
2023-12-09 20:43:27 +00:00
Gabi
3b3cf6bf27 connlib: fix ipv6 range (#2844) 2023-12-09 18:54:59 +00:00
Jamil
fd9cc88746 Don't use host mode networking for gateways on prod (#2845)
Try fixing masquerading by not using host mode to deploy gateway in GCP.
2023-12-09 18:49:56 +00:00
Andrew Dryga
62507dc704 Add hostname as part of entropy source to generate FIREZONE_ID on prod 2023-12-08 21:04:40 -05:00
Gabi
b817ddfe7f Assorted fixes (#2839) 2023-12-08 19:43:40 +00:00
Andrew Dryga
715392b62f Use Ubuntu 24.04 LTS for our prod gateway deployments 2023-12-08 12:53:11 -05:00
Jamil
3bba76e9ef Timeout perf test after 5 minutes; don't restart containers (#2831)
This should hopefully fix / speed up some of the recent CI issues
@ReactorScram is hitting
2023-12-08 17:13:50 +00:00
Reactor Scram
4b833e06ab docs(windows): requirements for diagnostic logging tab (#2834)
Add requirements for the Diagnostic Logs tab per internal discussion
2023-12-08 17:13:30 +00:00
Jamil
845707bd09 Update README.md
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-08 12:27:21 -05:00
Andrew Dryga
79e1a7582d Fix resources auth query (#2835) 2023-12-08 12:22:37 -05:00
Reactor Scram
7a9c1321dc windows: get actor_name from auth callback (#2820)
Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-12-08 16:39:31 +00:00
Jamil
8cb2833ce3 UI cleanup for iOS (#2832)
* Removes remaining traces of account ID. We don't have any external
users using the app _yet_ so I wanted to remove the tech debt completely
before we get the app to testers
* Adds logo to welcome screen
* Removes "CONNECTION" section from MainView
2023-12-08 10:29:17 -05:00