mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 10:18:54 +00:00
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.