* Refactor sharedPreferences to only save the AccountId
* Update TeamId -> AccountId to match naming elsewhere
* Update JWT -> Token to avoid confusion; this token is **not** a valid
JWT and should be treated as an opaque token
* Update FFI `connect` to accept an optional file descriptor (int32) as
a first argument. This seemed to be the most straightforward way to pass
it to the tunnel stack. Retrieving it via callback is another option,
but retrieving return vars with the `jni` was more complex. We could
have used a similar approach that we did in the Apple client
(enumerating all fd's in the `new()` function until we found ours) but
this approach is [explicitly
documented/recommended](https://developer.android.com/reference/android/net/VpnService.Builder#establish())
by the Android docs so I figured it's not likely to break.
Additionally, there was a thread safety bug in the recent JNI callback
implementation that consistently crashed the VM with `JNI DETECTED ERROR
IN APPLICATION: use of invalid jobject...`. The fix was to use
`GlobalRef` which has the explicit purpose of outliving the `JNIEnv`
lifetime so that no `static` lifetimes need to be used.
---------
Signed-off-by: Jamil <jamilbk@users.noreply.github.com>
Co-authored-by: Pratik Velani <pratikvelani@gmail.com>
Co-authored-by: Gabi <gabrielalejandro7@gmail.com>
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.21 to 4.3.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.3.23</h2>
<h2>[4.3.23] - 2023-08-18</h2>
<h3>Fixes</h3>
<ul>
<li>Fixed <code>UnknownArgumentValueParser</code> to not error on flag's
absence</li>
</ul>
<h2>v4.3.22</h2>
<h2>[4.3.22] - 2023-08-17</h2>
<h3>Features</h3>
<ul>
<li>Add <code>UnknownArgumentValueParser</code> for injecting errors for
improving the experience with errors</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.3.23] - 2023-08-18</h2>
<h3>Fixes</h3>
<ul>
<li>Fixed <code>UnknownArgumentValueParser</code> to not error on flag's
absence</li>
</ul>
<h2>[4.3.22] - 2023-08-17</h2>
<h3>Features</h3>
<ul>
<li>Add <code>UnknownArgumentValueParser</code> for injecting errors for
improving the experience with errors</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="b9df80c2ce"><code>b9df80c</code></a>
chore: Release</li>
<li><a
href="e46e12b7eb"><code>e46e12b</code></a>
docs: Update changelog</li>
<li><a
href="c9923119d4"><code>c992311</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5080">#5080</a>
from epage/unknown</li>
<li><a
href="56135f3ff3"><code>56135f3</code></a>
fix(builder): UnknownValueParser shouldn't error on flag absense</li>
<li><a
href="6720240577"><code>6720240</code></a>
feat(parser): Report source to value parsers</li>
<li><a
href="b55ebc9f7f"><code>b55ebc9</code></a>
test(parser): Show bad Unknown bug on flags</li>
<li><a
href="df337de701"><code>df337de</code></a>
chore: Release</li>
<li><a
href="fb8a12a739"><code>fb8a12a</code></a>
docs: Update changelog</li>
<li><a
href="b87ca2ff2c"><code>b87ca2f</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5075">#5075</a>
from epage/err</li>
<li><a
href="9f65eb0c9a"><code>9f65eb0</code></a>
refactor(error): Give caller control over suggestion</li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/v4.3.21...v4.3.23">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Basically we were having a panic inside a panic before, when I tried to
drop the runtime in `on_disconnect` since you can't drop a runtime
within a runtime. This PR spawns a new thread that listen for
disconnection and stops the runtime right there.
This also fixes the timer for reconnections.
Note: That I first stop it and the drop it which is redundant but I
rather be safe :)
Bumps [async-trait](https://github.com/dtolnay/async-trait) from 0.1.72
to 0.1.73.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/async-trait/releases">async-trait's
releases</a>.</em></p>
<blockquote>
<h2>0.1.73</h2>
<ul>
<li>Prevent generated code from triggering ignored_unit_patterns
pedantic clippy lint</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="f07c856870"><code>f07c856</code></a>
Release 0.1.73</li>
<li><a
href="f12f3717e6"><code>f12f371</code></a>
Resolve ignored_unit_patterns pedantic clippy lint in test suite</li>
<li><a
href="a71e0664c2"><code>a71e066</code></a>
Resolve ignored_unit_patterns pedantic clippy lint in generated
code</li>
<li><a
href="7d4e192c7d"><code>7d4e192</code></a>
Update ui test suite to nightly-2023-08-10</li>
<li><a
href="47565d9ff6"><code>47565d9</code></a>
Revert "Temporarily disable -Zrandomize-layout due to rustc
ICE"</li>
<li><a
href="72bd72b000"><code>72bd72b</code></a>
Temporarily disable -Zrandomize-layout due to rustc ICE</li>
<li>See full diff in <a
href="https://github.com/dtolnay/async-trait/compare/0.1.72...0.1.73">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [anyhow](https://github.com/dtolnay/anyhow) from 1.0.72 to 1.0.75.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/anyhow/releases">anyhow's
releases</a>.</em></p>
<blockquote>
<h2>1.0.75</h2>
<ul>
<li>Partially work around rust-analyzer bug (<a
href="https://redirect.github.com/rust-lang/rust-analyzer/issues/9911">rust-lang/rust-analyzer#9911</a>)</li>
</ul>
<h2>1.0.74</h2>
<ul>
<li>Add bootstrap workaround to allow rustc to depend on anyhow (<a
href="https://redirect.github.com/dtolnay/anyhow/issues/320">#320</a>,
thanks <a
href="https://github.com/RalfJung"><code>@RalfJung</code></a>)</li>
</ul>
<h2>1.0.73</h2>
<ul>
<li>Update backtrace support to nightly's new Error::provide API (<a
href="https://redirect.github.com/rust-lang/rust/pull/113464">rust-lang/rust#113464</a>,
<a
href="https://redirect.github.com/dtolnay/anyhow/issues/319">#319</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="6485caebde"><code>6485cae</code></a>
Release 1.0.75</li>
<li><a
href="238223af99"><code>238223a</code></a>
Work around ridiculous rust-analyzer behavior</li>
<li><a
href="cbade7d00a"><code>cbade7d</code></a>
Release 1.0.74</li>
<li><a
href="0798a9a635"><code>0798a9a</code></a>
Reword bootstrap comment</li>
<li><a
href="61d86763da"><code>61d8676</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/320">#320</a>
from RalfJung/bootstrap</li>
<li><a
href="663c6633e3"><code>663c663</code></a>
don't run build probes in rustc bootstrap</li>
<li><a
href="e471b2b650"><code>e471b2b</code></a>
Release 1.0.73</li>
<li><a
href="8cf1d150f7"><code>8cf1d15</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/anyhow/issues/319">#319</a>
from dtolnay/errorprovide</li>
<li><a
href="31c8dff2cd"><code>31c8dff</code></a>
Update to nightly's new Error::provide API</li>
<li><a
href="496b9584c4"><code>496b958</code></a>
Ignore ignored_unit_patterns pedantic clippy lint in test suite</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/anyhow/compare/1.0.72...1.0.75">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.44 to
1.0.47.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/dtolnay/thiserror/releases">thiserror's
releases</a>.</em></p>
<blockquote>
<h2>1.0.47</h2>
<ul>
<li>Work around rust-analyzer bug (<a
href="https://redirect.github.com/rust-lang/rust-analyzer/issues/9911">rust-lang/rust-analyzer#9911</a>)</li>
</ul>
<h2>1.0.46</h2>
<ul>
<li>Add bootstrap workaround to allow rustc to depend on thiserror (<a
href="https://redirect.github.com/dtolnay/thiserror/issues/248">#248</a>,
thanks <a
href="https://github.com/RalfJung"><code>@RalfJung</code></a>)</li>
</ul>
<h2>1.0.45</h2>
<ul>
<li>Update backtrace support to nightly's new Error::provide API (<a
href="https://redirect.github.com/rust-lang/rust/pull/113464">rust-lang/rust#113464</a>,
<a
href="https://redirect.github.com/dtolnay/thiserror/issues/246">#246</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="0495eaa802"><code>0495eaa</code></a>
Release 1.0.47</li>
<li><a
href="2d9425c374"><code>2d9425c</code></a>
Work around ridiculous rust-analyzer behavior</li>
<li><a
href="5ada5d5198"><code>5ada5d5</code></a>
Release 1.0.46</li>
<li><a
href="f51271a0d5"><code>f51271a</code></a>
Reword bootstrap comment</li>
<li><a
href="1f02cdfcdd"><code>1f02cdf</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/248">#248</a>
from RalfJung/bootstrap</li>
<li><a
href="fa637828ae"><code>fa63782</code></a>
don't run build probes in rustc bootstrap</li>
<li><a
href="2fd79cd52a"><code>2fd79cd</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/247">#247</a>
from dtolnay/errorprovide</li>
<li><a
href="78e0ffed90"><code>78e0ffe</code></a>
Pull in anyhow's new Error::provide support</li>
<li><a
href="06f1895832"><code>06f1895</code></a>
Release 1.0.45</li>
<li><a
href="a11330f7fb"><code>a11330f</code></a>
Merge pull request <a
href="https://redirect.github.com/dtolnay/thiserror/issues/246">#246</a>
from dtolnay/errorprovide</li>
<li>Additional commits viewable in <a
href="https://github.com/dtolnay/thiserror/compare/1.0.44...1.0.47">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [rustls-webpki](https://github.com/rustls/webpki) from 0.100.1 to
0.100.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rustls/webpki/releases">rustls-webpki's
releases</a>.</em></p>
<blockquote>
<h2>v/0.100.2</h2>
<h2>Release notes</h2>
<ul>
<li>certificate path building and verification is now capped at 100
signature validation operations to avoid the risk of CPU usage
denial-of-service attack when validating crafted certificate chains
producing quadratic runtime. This risk affected both clients, as well as
servers that verified client certificates.</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>v0.100.2 prep by <a
href="https://github.com/cpu"><code>@cpu</code></a> in <a
href="https://redirect.github.com/rustls/webpki/pull/154">rustls/webpki#154</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/rustls/webpki/compare/v/0.100.1...v/0.100.2">https://github.com/rustls/webpki/compare/v/0.100.1...v/0.100.2</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="c8b821450b"><code>c8b8214</code></a>
Bump MSRV to 1.60</li>
<li><a
href="855752292e"><code>8557522</code></a>
Avoid testing MSRV of dev-dependencies</li>
<li><a
href="73a7f0c7d7"><code>73a7f0c</code></a>
Cargo: version 0.100.1 -> 0.100.2</li>
<li><a
href="4ea052366f"><code>4ea0523</code></a>
verify_cert: enforce maximum number of signatures.</li>
<li>See full diff in <a
href="https://github.com/rustls/webpki/compare/v/0.100.1...v/0.100.2">compare
view</a></li>
</ul>
</details>
<br />
[](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)
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/firezone/firezone/network/alerts).
</details>
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Fixes the following issues with the macOS app:
1. Every alternate launch of the app caused the tunnel to go down
2. When signing out and signing back in, resources were not getting
updated
3. While the tunnel is up, when we quit the app and restart the app, the
tunnel was brought down
This PR fixes issues with the iOS client connecting to the portal and
setting up the tunnel.
- portal IPv6 unique-local prefix typo
- Use `rustls-webpki-roots` instead of `rustls-native-roots` for tokio
tungstenite since the latter [only supports macOS, Linux, and
Windows](https://github.com/rustls/rustls-native-certs) while the former
seems to work on all platforms(?)
- Remove Multipath TCP entitlement for iOS since it's not relevant for
us.
@conectado After this is merged, we _almost_ have a working tunnel on
iOS. I believe the error we're hitting now is the 4-byte address family
header that we need to add and strip from each packet written to / read
from the tunnel. See below log for sample output when attempting to
connect to the `HTTPbin` resource:
```
dev.firezone.firezone.network-extension packet-tunnel debug 16:10:13.401705-0700 FirezoneNetworkExtensioniOS Adapter state changed to: tunnelReady
dev.firezone.firezone.network-extension packet-tunnel debug 16:10:13.401731-0700 FirezoneNetworkExtensioniOS Beginning path monitoring
com.apple.network path default 16:10:13.402211-0700 FirezoneNetworkExtensioniOS nw_path_evaluator_start [1ACDE975-615B-4557-BF7C-678F3594452E <NULL> generic, multipath service: 1, attribution: developer]
path: satisfied (Path is satisfied), interface: en0[802.11], scoped, ipv4, ipv6, dns
com.apple.network path info 16:10:13.402235-0700 FirezoneNetworkExtensioniOS nw_path_evaluator_call_update_handler [1ACDE975-615B-4557-BF7C-678F3594452E] scheduling update
com.apple.network path info 16:10:13.402261-0700 FirezoneNetworkExtensioniOS nw_path_evaluator_call_update_handler_block_invoke [1ACDE975-615B-4557-BF7C-678F3594452E] delivering update
com.apple.network debug 16:10:13.402286-0700 FirezoneNetworkExtensioniOS nw_path_copy_interface_with_generation Cache miss for interface for index 3 (generation 4574)
com.apple.network debug 16:10:13.402312-0700 FirezoneNetworkExtensioniOS nw_path_copy_interface_with_generation Cache miss for interface for index 31 (generation 141)
dev.firezone.firezone.network-extension packet-tunnel debug 16:10:13.402363-0700 FirezoneNetworkExtensioniOS Suppressing calls to disableSomeRoamingForBrokenMobileSemantics() and bumpSockets()
dev.firezone.firezone connlib debug 16:10:14.368105-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:15.369018-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:16.095618-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:16.370908-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:17.372035-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:18.373423-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:20.402863-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:24.381581-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:32.374566-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:10:38.137437-0700 FirezoneNetworkExtensioniOS Text("{\"ref\":null,\"topic\":\"phoenix\",\"event\":\"phx_reply\",\"payload\":{\"status\":\"ok\",\"response\":{}}}")
dev.firezone.firezone connlib debug 16:10:38.137757-0700 FirezoneNetworkExtensioniOS Phoenix status message
dev.firezone.firezone connlib debug 16:10:48.376339-0700 FirezoneNetworkExtensioniOS Reading from iface 76 bytes
dev.firezone.firezone connlib debug 16:11:08.148369-0700 FirezoneNetworkExtensioniOS Text("{\"ref\":null,\"topic\":\"phoenix\",\"event\":\"phx_reply\",\"payload\":{\"status\":\"ok\",\"response\":{}}}")
dev.firezone.firezone connlib debug 16:11:08.148654-0700 FirezoneNetworkExtensioniOS Phoenix status message
```
This PR allows the TURN allocation binding to be optionally configured
by `TURN_LOWEST_PORT` and `TURN_HIGHEST_PORT` environment variables.
This will allow client app developers to test their apps against a
fully-working local development cluster in Docker Desktop for
Linux/macOS/Windows, allowing us to remove the PortalMock, Connlib Mock,
and SwiftMock codepaths entirely.
cc @roop @pratikvelani
Previously, we required the user to specify a `LISTEN_IP4_ADDR` and/or a
`LISTEN_IP6_ADDR` parameter. This is cumbersome because dynamically
fetching the address of the local interface is not trivial in all
environments.
We remove this parameter in exchange for listening on all interfaces.
This is a trade-off. The relay will now listen on all interfaces, even
the ones not exposed to the public internet. This is true for the main
socket on port 3478 and for all created allocations. Actually relaying
data relies on the 4-tuple of a "connection", i.e. the source and
destination address and port. Technically, I think it is possible with
this change to send traffic to a relay via an interface that was not
intended to be used for that. I think this will still require spoofing
the source address which is a known and accepted problem.
It is still recommended that operators put appropriate firewall rules in
place to not allow ingress traffic on any interface other than the one
intended for relaying.
I've tested locally that we are correctly using the `IPV6_ONLY` flag. In
other words, a relay listening on the `0.0.0.0` wildcard interface will
not accept IPv6 traffic and vice versa.
Resolves#1886.
Apple provides a mechanism to calculate a smarter MTU for the tunnel
interface that is created.
This will be automatically adjusted depending on the MTU of the
underlying physical device.
Fixes a small bug where `client_platform` wasn't being added to the
redirect_params in the magic link auth flow, so the token form input was
never shown.
Also adds a `hidden` type input that omits the `class=` attribute and
`div` wrapper.
Feel free to build off this or close and open a more thorough fix if
this is not the desired approach.
This PR should fix the way we handle the `length` field in the
`DataChannel` messages, previous to this fix relaying data (using the
`webrtc-rs` crate) was impossible)
The new way to handle this is if the actual message is bigger than what
this data field says we ignore the extra bytes (which I think is the
correct way to do it according to spec)
Also, I added an integration test to verify relay messages using
`iptables`, not the cleanest way to do it but the easiest, in this vein
I tried to fix the caching for rust containers since 2 integration test
in our current state would take ~20 minutes each.
Addresses #1899.
Tested only with PortalMock. Works with Safari. Not tested yet with
non-Safari browsers as default in macOS (if required, will address that
separately).
`client_csrf_token` is always passed. It's verified only if the sign in
happens with the external open-app-with-URL scenario. It's not checked
if the user logs in inside of the `ASWebAuthenticationSession` webpage
itself.
Bumps [clap](https://github.com/clap-rs/clap) from 4.3.19 to 4.3.21.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/releases">clap's
releases</a>.</em></p>
<blockquote>
<h2>v4.3.21</h2>
<h2>[4.3.21] - 2023-08-08</h2>
<h3>Features</h3>
<ul>
<li>Expose <code>TryMapValueParser</code> so the type can be named</li>
</ul>
<h2>v4.3.20</h2>
<h2>[4.3.20] - 2023-08-08</h2>
<h3>Features</h3>
<ul>
<li>Expose <code>TryMapValueParser</code> so the type can be named</li>
<li><code>Command::mut_args</code> for modifying all arguments en
masse</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/clap-rs/clap/blob/master/CHANGELOG.md">clap's
changelog</a>.</em></p>
<blockquote>
<h2>[4.3.21] - 2023-08-08</h2>
<h3>Features</h3>
<ul>
<li>Expose <code>TryMapValueParser</code> so the type can be named</li>
</ul>
<h2>[4.3.20] - 2023-08-08</h2>
<h3>Features</h3>
<ul>
<li><code>Command::mut_args</code> for modifying all arguments en
masse</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="ee1388c0a3"><code>ee1388c</code></a>
chore: Release</li>
<li><a
href="390436681a"><code>3904366</code></a>
docs: Update changelog</li>
<li><a
href="3156e1a35c"><code>3156e1a</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5066">#5066</a>
from 9999years/export-trymapvalueparser</li>
<li><a
href="da19141560"><code>da19141</code></a>
chore: Release</li>
<li><a
href="b96cbafcbe"><code>b96cbaf</code></a>
chore: Release</li>
<li><a
href="174f12c7f8"><code>174f12c</code></a>
docs: Update changelog</li>
<li><a
href="fe04b3cc4e"><code>fe04b3c</code></a>
Merge pull request <a
href="https://redirect.github.com/clap-rs/clap/issues/5056">#5056</a>
from ModProg/dynamic-completions-help</li>
<li><a
href="aa3f47c239"><code>aa3f47c</code></a>
test(complete): Help for possible value</li>
<li><a
href="65b9c2b37d"><code>65b9c2b</code></a>
test(complete): Helper for asserting dynamic completions</li>
<li><a
href="c86172e891"><code>c86172e</code></a>
feat: Export <code>builder::TryMapValueParser</code></li>
<li>Additional commits viewable in <a
href="https://github.com/clap-rs/clap/compare/v4.3.19...v4.3.21">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [android_logger](https://github.com/rust-mobile/android_logger-rs)
from 0.13.1 to 0.13.3.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-mobile/android_logger-rs/blob/master/CHANGELOG.md">android_logger's
changelog</a>.</em></p>
<blockquote>
<h1><code>android_logger</code> changelog</h1>
<p>All user visible changes to this project will be documented in this
file. This project uses [Semantic Versioning 2.0.0].</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li>See full diff in <a
href="https://github.com/rust-mobile/android_logger-rs/commits">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Bumps [log](https://github.com/rust-lang/log) from 0.4.19 to 0.4.20.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rust-lang/log/blob/master/CHANGELOG.md">log's
changelog</a>.</em></p>
<blockquote>
<h2>[0.4.20] - 2023-07-11</h2>
<ul>
<li>Remove rustversion dev-dependency by <a
href="https://github.com/Thomasdezeeuw"><code>@Thomasdezeeuw</code></a>
in <a
href="https://redirect.github.com/rust-lang/log/pull/568">rust-lang/log#568</a></li>
<li>Remove <code>local_inner_macros</code> usage by <a
href="https://github.com/EFanZh"><code>@EFanZh</code></a> in <a
href="https://redirect.github.com/rust-lang/log/pull/570">rust-lang/log#570</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="4708f1484c"><code>4708f14</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/574">#574</a>
from chrysn-pull-requests/doc-log-to-defmt</li>
<li><a
href="6de3cccc36"><code>6de3ccc</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/571">#571</a>
from rust-lang/cargo/0.4.20</li>
<li><a
href="838920cf18"><code>838920c</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/575">#575</a>
from EFanZh/group-target-module-path-and-file</li>
<li><a
href="3985711f74"><code>3985711</code></a>
Group <code>target</code>, <code>module_path</code> and
<code>file</code> arguments</li>
<li><a
href="3f534d00e4"><code>3f534d0</code></a>
Move private APIs into a single module</li>
<li><a
href="f5ab686e9b"><code>f5ab686</code></a>
doc: Add log-to-defmt to other-facilities section</li>
<li><a
href="6d173bf941"><code>6d173bf</code></a>
prepare for 0.4.20 release</li>
<li><a
href="cab10885de"><code>cab1088</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/570">#570</a>
from EFanZh/remove-local-inner-macros</li>
<li><a
href="9d052b17d3"><code>9d052b1</code></a>
Remove <code>local_inner_macros</code> usage</li>
<li><a
href="e9123d6d9a"><code>e9123d6</code></a>
Merge pull request <a
href="https://redirect.github.com/rust-lang/log/issues/568">#568</a>
from Thomasdezeeuw/remove-rustversion-dep</li>
<li>Additional commits viewable in <a
href="https://github.com/rust-lang/log/compare/0.4.19...0.4.20">compare
view</a></li>
</ul>
</details>
<br />
[](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>
Auth base URL and Control Plane URL are configurable in a new
Server.xcconfig (so that we can have Server_Dev.xcconfig,
Server_Staging.xcconfig, and Server_Prod.xcconfig and switch between
them by copying / symbolic linking).
App's Settings View takes in Team ID instead of a URL. App forms auth
URL from Auth base URL from Server.xcconfig and the Team ID in settings.
Tunnel passes control plane URL from Server.xcconfig to connlib.
~~Marked as draft because this PR depends on #1881.~~ #1881 has been
merged.
* Remove JWT to be an opaque token and update variable names accordingly
* Use new `actor_name` param from the portal instead of user info from
old JWT
* Log attempted portal URL from connlib
* Remove account slug/id from portal_url before sending to connlib
@roop The token from the portal is a Phoenix.Token, not a valid JWT, so
this was causing a JWTDecodeError. Discussed with @AndrewDryga and
concluded this should be an opaque token. Expiry and other invalid token
scenarios will be bubbled up from connlib via an `onError` callback (or
perhaps a dedicated `onTokenInvalid` callback). For now connlib doesn't
handle this specifically.