Commit Graph

5 Commits

Author SHA1 Message Date
Thomas Eizinger
a552e695f7 fix(relay): wait for channel binding in smoke test script (#1853)
`webrtc-rs` has a race condition where `send_to` does not actually await
the channel binding, thus attempting to send something through the
channel from the other end my fail because we receive the bytes from the
relay before the library registers that there is an active channel.

This should hopefully fix the flakiness of the smoke test script.
2023-08-04 03:17:20 +00:00
Thomas Eizinger
73e60795d8 feat(relay): add smoke test script (#1834)
I finally figured out why the smoke test script was being funny. It
turns out that the TURN client I still had lying around in the `gateway`
binary was reading from the UDP socket in the background and thus
sometimes grabbed the relayed data and wanted to interpret it as a STUN
packet.

However, for this test, the `gateway` doesn't actually need a TURN
client at all. It communicates with the relay as if it were the `client`
itself.

By modifying the script to only work on localhost, we can avoid use of a
TURN client altogether in the relay and make this script deterministic
which is a big win for our CI confidence!
2023-07-31 20:13:27 +00:00
Thomas Eizinger
911126b79d fix(relay): ensure smoke test script fails on error (#1711)
Due to a silly bash mistake (I hate bash), the error from the gateway
binary wasn't actually propagated to the script. Thus, we did not notice
that it was been broken for a while.

Attempting to fix it turned up that we were double-hexing the relay
secret and using invalid passwords for the clients.
2023-06-28 21:32:51 +00:00
Thomas Eizinger
16156a6448 relay: implement authentication (#1641) 2023-06-07 06:17:20 -07:00
Thomas Eizinger
f5fdd56812 relay: create channel bindings and relay data (#1618)
Here is a short demo:


[Relay](https://github.com/firezone/firezone/assets/5486389/c0199294-70ca-47b4-90ae-2c96428bdb56)

You can run this locally using the `./run_smoke_test.sh` shell-script.
It is not reliable enough yet to be used in CI but I used one if its
outputs to make a regression test.

---------

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-05-22 17:25:16 -07:00