Thomas Eizinger
66c85e28b0
feat(connection): use STUN to generate server-reflexive candidate ( #3268 )
...
Currently, `firezone-connection` can only handle connections on a LAN.
Via the use of a STUN server, we can discover our public IP and attempt
to direct, hole-punched connection across multiple subnets.
2024-01-19 04:11:07 +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
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<[T]></code> and <code>Arc<[T]></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 />
[](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
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
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
Thomas Eizinger
2f64b150e5
chore(connlib): fix clippy warning ( #3227 )
2024-01-15 14:54:17 +00:00
Thomas Eizinger
11ada00617
feat: introduce firezone-connection with basic test suite ( #2965 )
...
Initial version of the `firezone-connection` crate. To begin with, we
only establish a connection in a LAN, i.e. no hole-punching, no STUN or
TURN servers, just host candidates. As such, a lot of this PR is just
scaffolding for setting up the test environment and the actual
`ConnectionPool` implementation.
For the curious, I've left some TODOs where I am going to attempt
extending the implementation once we start dealing with STUN and TURN
servers.
I also extended CI to run these tests.
2023-12-23 00:45:43 +00:00