Commit Graph

12 Commits

Author SHA1 Message Date
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
Jamil
0647eeebca 1.0 views (part 1) (#1599)
# Todo
- [x] Users
- [x] Groups
- [x] Devices
- [x] Gateways
2023-05-22 17:09:41 -07:00
Thomas Eizinger
9c120fb35a fix(relay): use correct variable (#1617)
We had a semantic conflict here that resulted in a broken build. This PR
fixes that.

Co-authored-by: Jamil <jamilbk@users.noreply.github.com>
2023-05-17 09:36:32 -07:00
Thomas Eizinger
52df0cbfb4 relay: remember allocations by port (#1613)
Instead of remembering the used ports separately, we store a reference
to each allocation by port.
2023-05-16 09:05:51 +02:00
Thomas Eizinger
5e74143ede relay: don't repeat magic numbers througout the code (#1612)
A small refactoring to keep magic numbers only in one place.
2023-05-16 09:05:13 +02:00
Thomas Eizinger
675cb2dd54 relay: refresh allocations (#1610) 2023-05-16 07:21:02 +10:00
Thomas Eizinger
01f33ed4a0 relay: add basic README (#1611) 2023-05-16 05:39:28 +10:00
Thomas Eizinger
c0774523a8 relay: Parse and respond to allocation requests (#1604)
With this patch, the relay can parse and respond to allocation requests. I
ran some basics tests against https://icetest.info/ and implemented a
regression test as a result of the logged data.

In writing this, I also had to slightly change the design of `Server`
(as expected). Event handlers for incoming data now do not return a
message directly. Instead, the caller is responsible to drain `Command`s
from it.

When creating an allocation, we need to start listening on a new port.
This needs to happen outside the `Server` as I am going for a sans-IO
style. We emit a `Command` that instructs the main event loop to listen
on a new port. Any incoming data on that port will be forwarded to the
`Server`.

At the moment, this incoming data is just dropped. This is actually
standards-compliant because we cannot handle binding requests yet which
would allow this data to be forwarded to the client.

In some areas, the code is still a bit rough but I expect to iron those
things out as we go along.
2023-05-16 04:58:33 +10:00
Thomas Eizinger
70e6982e45 Implement basic STUN server (#1603)
This is an alternative to https://github.com/firezone/firezone/pull/1602
that implements the server using a library I've found called
`stun_codec`.

It already has support for parsing a variety of attributes.

The following is a nice website to test some of the functionality:
https://icetest.info/

The server is still listening on:
`ec2-3-89-112-240.compute-1.amazonaws.com:3478`.
2023-05-10 07:58:32 -07:00
Thomas Eizinger
718e4da41a Move rust-toolchain to workspace root 2023-05-08 19:06:34 -03:00
Thomas Eizinger
8db82445ba Move gitignore and lockfile to workspace root 2023-05-08 19:06:34 -03:00
Thomas Eizinger
f9b6e96b5e Move everything to a workspace 2023-05-08 19:06:34 -03:00