Commit Graph

423 Commits

Author SHA1 Message Date
Gabi
2277d92c88 fix(connlib): handle expiration messages correctly (#3292)
While working on #3288 I saw a few messages that we don't explicitly
handle from the portal.

This PR changes it so that we handle them correctly and we don't just
depend on coincidental behavior..
2024-01-18 18:08:43 +00:00
Reactor Scram
c25366202e feat(windows): crash handler that writes minidumps to ... (#3200)
... ProgramData/dev.firezone.client/dumps/last_crash.dmp, in debug
builds only for now

For #3111.
I was way off on my estimated dump size. It's only about 500 KB.

Please double-check that the Linux exes are still stripped properly.
Windows, Linux, and Mac have different ways to do embedded or
non-embedded debug info, so the Windows client should still be 20 MB but
with a ~62MB pdb next to it, and the Linux client should still be 15 MB.

- [ ] Check Linux artifacts weren't accidentally affected
- [ ] Make sure connlib's panic handler doesn't interfere with this
- [ ] Later on, change CI so pdb files are saved as artifacts
- [ ] Later on, enable for release builds

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-01-18 02:40:21 +00:00
Gabi
973e48cf68 Fix dns bad nxdomain (#3299)
Some dns servers return NXDOMAIN for queries where the address exists
but there is no
answer for the given query type(e.g. AAAA-only records). This is not up
to spec and
musl PROPERLY assumes that means there is no record of any type. Saddly,
this happens even
with google DNS so we can expect it to happen everywhere. So we use
getaddrinfo to separate
requests for A and AAAA queries and preventing this.

Seems to work locally, though the exact situation where we have a record
that returns NXDOMAIN while it exists is easier to reproduce in staging,
we should test it after we merge.

Fixes #3215
2024-01-18 02:30:30 +00:00
Reactor Scram
1b42e577da docs(windows): document processes involved in the Windows client (#3293) 2024-01-18 01:38:00 +00:00
Reactor Scram
0da573f397 refactor(windows): rename TAURI_ID to BUNDLE_ID (copied from #3200) (#3294)
Also set an assert so if they ever diverge it should crash during a
smoke test
2024-01-18 01:37:49 +00:00
Jamil
df3953983c fix(ci): Fix publish step to publish multi-arch images for public use (#3287)
* Remove `--pull-tags`
* Correctly build and push multi-arch images for public use
* re-revert Fix POSIX shell issue
* re-revert Fix Gateways masquerading for wireless interfaces
2024-01-17 18:03:27 -08:00
Reactor Scram
663466aa1d refactor(windows): give name to worker thread (#3289)
This came up while dealing with the COM stuff for #3000, but it's out of
scope, so I made it its own PR.
2024-01-17 22:14:08 +00:00
Thomas Eizinger
2e4dd9943b feat: dynamically configure network & redis for LAN integration test (#3286)
This also uses the docker healthcheck again for the redis container.
2024-01-17 22:11:29 +00:00
Thomas Eizinger
1f4955b366 chore: update logger config for firezone-connection-tests (#3285) 2024-01-17 22:10:01 +00:00
Thomas Eizinger
e0e4a5b732 fix: complain about correct env var (#3284) 2024-01-17 22:07:44 +00:00
Reactor Scram
af18923be4 refactor(windows): designate a place for cleanup before the process crashes (#3290)
Ran into this on a yak shave for #3000
2024-01-17 22:05:49 +00:00
Thomas Eizinger
a531d21f62 fix: only log about migration if address differs (#3283)
With https://github.com/firezone/firezone/pull/3245, there is now a 2nd
place where we set the `remote_socket` field. Hence, for the log message
to be correct we need to compare whether the new socket actually differs
from the existing one.
2024-01-17 21:52:10 +00:00
Gabi
7233ccdc0a gateway(fix): accept nil expiration times (#3288)
Fixes #3240
2024-01-17 21:13:11 +00:00
Jamil Bou Kheir
1d80af79bc Revert docker-init.sh 2024-01-17 03:45:39 -08:00
Jamil
3cb54e54d2 revert(ci): Revert Dockerfile to use alpine&musl (#3279) 2024-01-17 03:11:30 -08:00
Jamil
b5e591dfd3 fix(ci): Revert runtime to musl (#3278)
Turns out #3276 was only part of the problem. After that was fixed, the
issue did turn out to be the statically-linked libc runtime. Staging was
using dynamic linking and so didn't hit the issue.

This reverts back to musl which has been tested as @AndrewDryga noted.
2024-01-17 02:58:26 -08:00
Jamil Bou Kheir
fda49a17d6 Don't escape args 2024-01-17 00:12:05 -08:00
dependabot[bot]
dc57206027 build(deps): Bump redis from 0.23.3 to 0.24.0 in /rust (#2864)
Bumps [redis](https://github.com/redis-rs/redis-rs) from 0.23.3 to
0.24.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/redis-rs/redis-rs/releases">redis's
releases</a>.</em></p>
<blockquote>
<h2>v0.24.0</h2>
<h3>0.24.0 (2023-12-05)</h3>
<h4>Features</h4>
<ul>
<li><strong>Breaking change</strong>: Support Mutual TLS (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/858">#858</a>
<a href="https://github.com/sp-angel"><code>@​sp-angel</code></a>)</li>
<li>Implement <code>FromRedisValue</code> for
<code>Box&lt;[T]&gt;</code> and <code>Arc&lt;[T]&gt;</code> (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/799">#799</a>
<a href="https://github.com/JOT85"><code>@​JOT85</code></a>)</li>
<li>Sync Cluster: support multi-slot operations. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/967">#967</a>)</li>
<li>Execute multi-node requests using try_request. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/919">#919</a>)</li>
<li>Sorted set blocking commands (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/962">#962</a>
<a
href="https://github.com/gheorghitamutu"><code>@​gheorghitamutu</code></a>)</li>
<li>Allow passing routing information to cluster. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/899">#899</a>)</li>
<li>Add <code>tcp_nodelay</code> feature (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/941">#941</a>
<a
href="https://github.com/PureWhiteWu"><code>@​PureWhiteWu</code></a>)</li>
<li>Add support for multi-shard commands. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/900">#900</a>)</li>
</ul>
<h4>Changes</h4>
<ul>
<li>Order in usage of ClusterParams. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/997">#997</a>)</li>
<li><strong>Breaking change</strong>: Fix StreamId::contains_key
signature (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/783">#783</a>
<a
href="https://github.com/Ayush1325"><code>@​Ayush1325</code></a>)</li>
<li><strong>Breaking change</strong>: Update Command expiration values
to be an appropriate type (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/589">#589</a>
<a href="https://github.com/joshleeb"><code>@​joshleeb</code></a>)</li>
<li><strong>Breaking change</strong>: Bump aHash to v0.8.6 (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/966">#966</a>
<a href="https://github.com/aumetra"><code>@​aumetra</code></a>)</li>
<li>Fix features for <code>load_native_certs</code>. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/996">#996</a>)</li>
<li>Revert redis-test versioning changes (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/993">#993</a>)</li>
<li>Tests: Add retries to test cluster creation (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/994">#994</a>)</li>
<li>Fix sync cluster behavior with transactions. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/983">#983</a>)</li>
<li>Sync Pub/Sub - cache received pub/sub messages. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/910">#910</a>)</li>
<li>Prefer routing to primary in a transaction. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/986">#986</a>)</li>
<li>Accept iterator at <code>ClusterClient</code> initialization (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/987">#987</a>
<a
href="https://github.com/ruanpetterson"><code>@​ruanpetterson</code></a>)</li>
<li><strong>Breaking change</strong>: Change timeouts from usize and
isize to f64 (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/988">#988</a>
<a
href="https://github.com/eythorhel19"><code>@​eythorhel19</code></a>)</li>
<li>Update minimal rust version to 1.6.5 (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/982">#982</a>)</li>
<li>Disable JSON module tests for redis 6.2.4. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/980">#980</a>)</li>
<li>Add connection string examples (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/976">#976</a>
<a
href="https://github.com/NuclearOreo"><code>@​NuclearOreo</code></a>)</li>
<li>Move response policy into multi-node routing. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/952">#952</a>)</li>
<li>Added functions that allow tests to check version. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/963">#963</a>)</li>
<li>Fix XREADGROUP command ordering as per Redis Docs, and compatibility
with Upstash Redis (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/960">#960</a>
<a
href="https://github.com/prabhpreet"><code>@​prabhpreet</code></a>)</li>
<li>Optimize make_pipeline_results by pre-allocate memory (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/957">#957</a>
<a
href="https://github.com/PureWhiteWu"><code>@​PureWhiteWu</code></a>)</li>
<li>Run module tests sequentially. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/956">#956</a>)</li>
<li>Log cluster creation output in tests. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/955">#955</a>)</li>
<li>CI: Update and use better maintained github actions. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/954">#954</a>)</li>
<li>Call CLIENT SETINFO on new connections. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/945">#945</a>)</li>
<li>Deprecate functions that erroneously use <code>tokio</code> in their
name. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/913">#913</a>)</li>
<li>CI: Increase timeouts and use newer redis. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/949">#949</a>)</li>
<li>Remove redis version from redis-test. (<a
href="https://redirect.github.com/redis-rs/redis-rs/pull/943">#943</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="37ba5614c9"><code>37ba561</code></a>
Release redis 0.24.0 / redis-test 0.3.0 (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/998">#998</a>)</li>
<li><a
href="bcc6e3ba59"><code>bcc6e3b</code></a>
Order in usage of ClusterParams. (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/997">#997</a>)</li>
<li><a
href="db19291263"><code>db19291</code></a>
Fix StreamId::contains_key signature (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/783">#783</a>)</li>
<li><a
href="413f4d947e"><code>413f4d9</code></a>
Update Command expiration values to be an appropriate type (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/589">#589</a>)</li>
<li><a
href="f4f5344d2c"><code>f4f5344</code></a>
Bump aHash to v0.8.6 (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/966">#966</a>)</li>
<li><a
href="439118e73e"><code>439118e</code></a>
Fix features for <code>load_native_certs</code>. (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/996">#996</a>)</li>
<li><a
href="a26373b145"><code>a26373b</code></a>
Revert redis-test versioning changes (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/993">#993</a>)</li>
<li><a
href="882ecf9c5d"><code>882ecf9</code></a>
Tests: Add retries to test cluster creation (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/994">#994</a>)</li>
<li><a
href="d8a5ca95e5"><code>d8a5ca9</code></a>
Release redis 0.23.4 / redis-test 0.2.4 (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/992">#992</a>)</li>
<li><a
href="a6df6e273c"><code>a6df6e2</code></a>
Fix sync cluster behavior with transactions. (<a
href="https://redirect.github.com/redis-rs/redis-rs/issues/983">#983</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/redis-rs/redis-rs/compare/redis-0.23.3...redis-0.24.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=redis&package-manager=cargo&previous-version=0.23.3&new-version=0.24.0)](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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</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>
Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-01-17 03:37:38 +00:00
Jamil
6c72447b4f fix(rust): Use -n for POSIX shells to handle building for different TARGETs (#3270) 2024-01-16 17:52:30 -08:00
Thomas Eizinger
5a679ad264 feat(connection-tests): dynamically discover network interfaces (#3241)
Currently, we are hardcoding the network interface to use in the docker
compose file. This doesn't scale pariticularly well because
docker-compose doesn't like it when networks have overlapping address
ranges. Instead of hard-coding the address, we let docker compose choose
a network range and assign addresses to us.

---------

Co-authored-by: Jamil Bou Kheir <jamilbk@users.noreply.github.com>
2024-01-16 23:05:16 +00:00
Reactor Scram
d83afe2f84 fix(windows): when the token expires, change the GUI to signed-out state (#3142)
Fixes #3128 

Will mark ready for review in an hour or two when it replicates on my
dev laptop
2024-01-16 22:14:03 +00:00
Jamil
5551eece5d fix(devops): Use webpki roots instead of OS cert store (#3266)
Fixes 

```json
{
  "insertId": "1lzwe6ffj77v9n",
  "jsonPayload": {
    "cos.googleapis.com/container_name": "klt-relay-vmkr",
    "cos.googleapis.com/stream": "stderr",
    "cos.googleapis.com/container_id": "29e6fd8f9a4ed1ce390e8a25561d73b0fd8cbcdf17344e999637301175c41fdc",
    "message": "    1: invalid peer certificate: UnknownIssuer\n",
    "time": "2024-01-16T20:21:49.992901207Z"
  },
  "resource": {
    "type": "gce_instance",
    "labels": {
      "zone": "asia-south1-a",
      "instance_id": "4570479834747179906",
      "project_id": "firezone-staging"
    }
  },
  "timestamp": "2024-01-16T20:21:49.992901207Z",
  "logName": "projects/firezone-staging/logs/cos_containers",
  "receiveTimestamp": "2024-01-16T20:21:50.930410255Z"
}
```
2024-01-16 13:11:13 -08:00
Jamil
9d476d83e4 fix(devops): Fix shellcheck errors for docker-init.sh script (#3265) 2024-01-16 12:05:40 -08:00
Jamil
856f72cd4b fix(ci): shell is dash on debian slim (#3261) 2024-01-16 11:27:46 -08:00
Reactor Scram
d5f09ab342 feat(Windows): #2998, add 'signing in' state to system tray menu (#3157)
Depends on the new auth flow in #3147 

I couldn't find the UI mockups so I just modified the "Sign In" menu to
create this.
2024-01-16 17:08:40 +00:00
Jamil
36209c7d2d fix(rust): Check /proc for health checks (#3250)
Debian slim is slimmer than we could ever have imagined.
2024-01-16 16:46:44 +00:00
Jamil
4ff70746c8 Revert "build(deps): Bump tokio-tungstenite from 0.20.1 to 0.21.0 in /rust" (#3248)
Reverts firezone/firezone#3191
2024-01-15 23:36:56 -08:00
dependabot[bot]
e9a86fe1e7 build(deps): Bump tokio-tungstenite from 0.20.1 to 0.21.0 in /rust (#3191)
Bumps [tokio-tungstenite](https://github.com/snapview/tokio-tungstenite)
from 0.20.1 to 0.21.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/snapview/tokio-tungstenite/blob/master/CHANGELOG.md">tokio-tungstenite's
changelog</a>.</em></p>
<blockquote>
<h1>0.21.0</h1>
<ul>
<li>Update TLS dependencies.</li>
<li>Update <code>tungstenite</code> to <code>0.21.0</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="52e59dd732"><code>52e59dd</code></a>
Release version 0.21.0</li>
<li><a
href="7b2cf20a10"><code>7b2cf20</code></a>
Update <code>rustls</code> to 0.22 and <code>tokio-rustls</code> to
0.25</li>
<li><a
href="ecf7a7ebae"><code>ecf7a7e</code></a>
Update <code>webpki-roots</code> to 0.26</li>
<li>See full diff in <a
href="https://github.com/snapview/tokio-tungstenite/compare/v0.20.1...v0.21.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=tokio-tungstenite&package-manager=cargo&previous-version=0.20.1&new-version=0.21.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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-01-16 04:24:01 +00:00
Jamil
b1738bdd46 feat(ci): Add e2e test bed (#3135)
- [x] Launch control plane via docker compose
- [x] Ensure all clients build
2024-01-16 01:57:41 +00:00
Jamil
b8e2a59570 fix(connlib): Use debian:12-slim for Rust base image (#3243)
Fixes #3215
2024-01-16 01:53:32 +00:00
Thomas Eizinger
247c907da7 fix(connection): set a Connections remote-socket from WG activity (#3245)
It appears that sometimes, the dialer already considers the connection
as connected whilst the other party is still finishing the ICE
handshake. In that case, the dialer will start wireguard activity. Once
the tunnel is fully established, the dialer will then start to send data
which can lead to a `NotConnected` error in case the listener hasn't yet
finished the handshake and updated the state. This is only a local
inconsistency which we can fix by also updating the `remote_socket`
field based on activity on the wireguard tunnel.

For future debugging, we also raise the log level of `str0m` to see the
STUN messages that are being exchanged.

Fixes: #3178.
2024-01-16 01:50:10 +00:00
Jamil
eceb2f6105 fix(connlib): Fix getSystemDefaultResolvers while tunnel session is active (#3236)
Reverts firezone/firezone#3198

This was actually functioning well for non-Apple platforms. Marking as a
draft until #3235 PR is opened

Fixes #3235

---------

Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-01-15 23:29:46 +00:00
Reactor Scram
53d43329c3 feat(windows): implement Clear Logs, closes #3224 (#3237) 2024-01-15 23:25:53 +00:00
Jamil
397c2ba497 chore(windows): Use version from Cargo toml to support automatic versioning (#3231)
JSON doesn't support comments, so we can't easily maintain the package
version like we do elsewhere in the codebase.

Luckily Tauri [will pull
this](https://tauri.app/v1/api/config/#packageconfig) from the toml if
it's missing in the JSON config.

Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-01-15 16:39:21 +00:00
Jamil
17371b2c10 feat(windows): Add Windows iconset (#3225)
Refs #3017 

Generated with `cargo tauri icon` with a 1024x1024 input from our Figma
assets

Co-authored-by: Reactor Scram <ReactorScram@users.noreply.github.com>
2024-01-15 16:37:43 +00:00
dependabot[bot]
5fce5dd267 chore(deps): bump base64 from 0.21.6 to 0.21.7 in /rust (#3228)
Bumps [base64](https://github.com/marshallpierce/rust-base64) from
0.21.6 to 0.21.7.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/marshallpierce/rust-base64/blob/master/RELEASE-NOTES.md">base64's
changelog</a>.</em></p>
<blockquote>
<h1>0.21.7</h1>
<ul>
<li>Support getting an alphabet's contents as a str via
<code>Alphabet::as_str()</code></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="9652c78773"><code>9652c78</code></a>
v0.21.7</li>
<li><a
href="08deccf703"><code>08deccf</code></a>
provide as_str() method to return the alphabet characters (<a
href="https://redirect.github.com/marshallpierce/rust-base64/issues/264">#264</a>)</li>
<li>See full diff in <a
href="https://github.com/marshallpierce/rust-base64/compare/v0.21.6...v0.21.7">compare
view</a></li>
</ul>
</details>
<br />


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

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

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

---

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

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


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-01-15 14:54:55 +00:00
Thomas Eizinger
2f64b150e5 chore(connlib): fix clippy warning (#3227) 2024-01-15 14:54:17 +00:00
dependabot[bot]
d76c94d057 chore(deps): bump axum from 0.6.20 to 0.7.3 in /rust (#3068)
Bumps [axum](https://github.com/tokio-rs/axum) from 0.6.20 to 0.7.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/tokio-rs/axum/releases">axum's
releases</a>.</em></p>
<blockquote>
<h2>axum-extra - v0.7.3</h2>
<ul>
<li><strong>added:</strong> Implement <code>Deref</code> and
<code>DerefMut</code> for built-in extractors (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1922">#1922</a>)</li>
<li><strong>added:</strong> Add <code>OptionalPath</code> extractor (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1889">#1889</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/1889">#1889</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/1889">tokio-rs/axum#1889</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/1922">#1922</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/1922">tokio-rs/axum#1922</a></p>
<h2>axum - v0.7.3</h2>
<ul>
<li><strong>added:</strong> <code>Body</code> implements
<code>From&lt;()&gt;</code> now (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2411">#2411</a>)</li>
<li><strong>change:</strong> Update version of multer used internally
for multipart (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2433">#2433</a>)</li>
<li><strong>change:</strong> Update tokio-tungstenite to 0.21 (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2435">#2435</a>)</li>
<li><strong>added:</strong> Enable <code>tracing</code> feature by
default (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2460">#2460</a>)</li>
<li><strong>added:</strong> Support graceful shutdown on
<code>serve</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2398">#2398</a>)</li>
<li><strong>added:</strong> <code>RouterIntoService</code> implements
<code>Clone</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2456">#2456</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/2411">#2411</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2411">tokio-rs/axum#2411</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2433">#2433</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2433">tokio-rs/axum#2433</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2435">#2435</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2435">tokio-rs/axum#2435</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2460">#2460</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2460">tokio-rs/axum#2460</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2398">#2398</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2398">tokio-rs/axum#2398</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2456">#2456</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2456">tokio-rs/axum#2456</a></p>
<h2>axum-extra - v0.7.2</h2>
<ul>
<li><strong>added:</strong> Implement <code>IntoResponse</code> for
<code>MultipartError</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1861">#1861</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/1861">#1861</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/1861">tokio-rs/axum#1861</a></p>
<h2>axum - v0.7.2</h2>
<ul>
<li><strong>added:</strong> Add <code>axum::body::to_bytes</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2373">#2373</a>)</li>
<li><strong>fixed:</strong> Gracefully handle accept errors in
<code>serve</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2400">#2400</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/2373">#2373</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2373">tokio-rs/axum#2373</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/2400">#2400</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/2400">tokio-rs/axum#2400</a></p>
<h2>axum-extra - v0.7.1</h2>
<ul>
<li>Updated to latest <code>axum-macros</code></li>
</ul>
<h2>axum - v0.7.1</h2>
<ul>
<li><strong>fix</strong>: Fix readme.</li>
</ul>
<h2>axum-extra - v0.7.0</h2>
<ul>
<li><strong>breaking:</strong> Remove the <code>spa</code> feature which
should have been removed in 0.6.0 (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1802">#1802</a>)</li>
<li><strong>added:</strong> Add <code>Multipart</code>. This is similar
to <code>axum::extract::Multipart</code>
except that it enforces field exclusivity at runtime instead of compile
time,
as this improves usability (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1692">#1692</a>)</li>
<li><strong>added:</strong> Implement <code>Clone</code> for
<code>CookieJar</code>, <code>PrivateCookieJar</code> and
<code>SignedCookieJar</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1808">#1808</a>)</li>
<li><strong>fixed:</strong> Add <code>#[must_use]</code> attributes to
types that do nothing unless used (<a
href="https://redirect.github.com/tokio-rs/axum/issues/1809">#1809</a>)</li>
</ul>
<p><a
href="https://redirect.github.com/tokio-rs/axum/issues/1692">#1692</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/1692">tokio-rs/axum#1692</a>
<a
href="https://redirect.github.com/tokio-rs/axum/issues/1802">#1802</a>:
<a
href="https://redirect.github.com/tokio-rs/axum/pull/1802">tokio-rs/axum#1802</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="fe89ab5592"><code>fe89ab5</code></a>
Release (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2461">#2461</a>)</li>
<li><a
href="b494d455cc"><code>b494d45</code></a>
Implement <code>Clone</code> for <code>RouterIntoService</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2456">#2456</a>)</li>
<li><a
href="560213a7b7"><code>560213a</code></a>
docs: add clarification about building middleware and error types (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2448">#2448</a>)</li>
<li><a
href="ea6dd51e98"><code>ea6dd51</code></a>
Enable tracing by default (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2460">#2460</a>)</li>
<li><a
href="12e8c6219d"><code>12e8c62</code></a>
Support graceful shutdown on <code>serve</code> (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2398">#2398</a>)</li>
<li><a
href="56159b0d4e"><code>56159b0</code></a>
JsonDeserializer extractor for zero-copy deserialization (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2431">#2431</a>)</li>
<li><a
href="c3db223532"><code>c3db223</code></a>
Rework error handling example (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2382">#2382</a>)</li>
<li><a
href="6c276c3ff0"><code>6c276c3</code></a>
Updated docs regarding constraints of Handler arguments (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2451">#2451</a>)</li>
<li><a
href="4f010d9b2d"><code>4f010d9</code></a>
Updating <code>tls-rustls</code> example (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2457">#2457</a>)</li>
<li><a
href="3fda093806"><code>3fda093</code></a>
Use separate lexical scope for lock guard in docs (<a
href="https://redirect.github.com/tokio-rs/axum/issues/2439">#2439</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/tokio-rs/axum/compare/axum-v0.6.20...axum-v0.7.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=axum&package-manager=cargo&previous-version=0.6.20&new-version=0.7.3)](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 <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2024-01-15 03:31:32 +00:00
Jamil
91d9e86773 fix(windows): Remove exec perms on Windows files (#3223)
Somehow these files keep getting `755` permissions applied to them --
maybe there's a `chmod -R 0755` script being run somewhere?
2024-01-14 14:29:35 +00:00
Jamil
04aeee2e7b fix(android): Simplify connlib gradle build configuration to ensure libconnlib.so is packaged (#3207)
Fixes #3205
2024-01-12 08:16:43 -08:00
Jamil
f6b2256b9a fix(connlib): Differentiate between 4xx and other portal errors in log message (#3203)
Why?

We print the previous error even when getting a `4xx` and disconnecting
immediately, which doesn't make sense.
2024-01-12 15:30:36 +00:00
Gabi
bdf260a58c connlib: only get system dns servers on session connect (#3198) 2024-01-11 22:41:33 +00:00
Reactor Scram
9b7c5d4ebd feat(windows): use ProgramData to store device ID instead of per-user… (#3172)
Fulfills #3159.

This means the device ID is only tied to the Windows install instead of
the user account. I also fixed up the logs and errors for that module
real quick since I was already there.
2024-01-11 21:57:55 +00:00
Reactor Scram
b8aa9fcc9d feat(windows): When the tunnel is ready, show a notification (#3166)
This is handy since the systray icon is hidden by default:


![image](https://github.com/firezone/firezone/assets/13400041/7c434538-8baf-46ca-92db-1fea97e84f41)

---------

Signed-off-by: Reactor Scram <ReactorScram@users.noreply.github.com>
Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2024-01-11 18:16:06 +00:00
Jamil
4f37bfab93 refactor(connlib): Remove unused on_error callback (#3162)
Fixes #3161 
Fixes #2867
2024-01-11 12:42:41 +00:00
Reactor Scram
a63f178eff feat(windows): switch to the new auth flow per #2823 (#3147)
Also refactored to extract an auth state machine. The auth logic
previously was scattered throughout the GUI module, which would make it
hard to audit. Because of the refactoring I was able to add some simple
unit tests.
2024-01-10 23:36:17 +00:00
Gabi
9844a4b7b7 connlib: fix wildcard checking in gateways (#3148)
the way we were checking for subdomains in the gateways completely
broke, didn't detect it before because the deployed staging version for
gateways is too old.

~~Added a few CI tests so this doesn't' happen again.~~ seems like
github runners [doesn't support pinging the outside
world](https://github.com/actions/runner-images/issues/1519) so I'm
putting that off for now.
2024-01-09 22:55:23 -03:00
Reactor Scram
8fddde371e feat(windows): log Git version used to build the client (#3144)
Fulfills #3141 

It took a little longer than I expected but since I'll be leaving the
client running all the time even on my dev laptop, I want to easily see
what version I built, even if I've changed branches since building it.
2024-01-10 01:10:36 +00:00
Gabi
2af8d6096c fix(connlib): mangle packet for upstream dns as resource (#3134)
Fixes #3027 

Left a few TODO, will solve it when doing #3123 

Draft because we're still testing but it's almost ready
2024-01-09 21:08:07 +00:00
Reactor Scram
33133d7448 feat(windows): new module to listen for network changes (#3137)
This isn't hooked up to the GUI yet, it's a debug subcommand.

I overheard that the other clients rebuild the tunnel when they change
networks, I think? And this might be useful for debugging the issue
where Chrome / other browsers don't flush their TCP connections when the
tunnel comes up. It's also reference code for how to use COM interfaces
in Rust. The official samples are a little sparse. So I wanted to get
this checked in.


![image](https://github.com/firezone/firezone/assets/13400041/9f9c576e-c56f-4d7c-93f4-6e92eace5914)
2024-01-09 20:58:54 +00:00