Commit Graph

5 Commits (70fc2b455c5b6dbfbfc0f505e597942712298c7b)

Author SHA1 Message Date
Manos Pitsidianakis 70fc2b455c
Update nix dependency to 0.27
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-02-11 17:13:05 +02:00
Manos Pitsidianakis 7861fb0402
Fix typos found with `typos` tool
Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
2024-01-03 11:08:55 +02:00
Manos Pitsidianakis da8e810448
melib/connections: remove leftover debug prints 2023-08-19 09:06:31 +03:00
Manos Pitsidianakis df638cceec
melib/connections: remove stale failing doc code example
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 7m50s Details
This leftover doc test/example was failing to compile, so remove it.
2023-08-16 19:50:48 +03:00
Manos Pitsidianakis 97d3686815
melib/connections: use Happy Eyeballs algorithm Ꙭ
Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 12m17s Details
This commit adds a Happy Eyeballs [1] implementation taken from the
happy-eyeballs crate, which is in public domain.

While the function lookup_ip[0] iterates through the addresses returned by
A and AAAA records from a DNS lookup, it returns the first one  which
always is an IPv4 address, unless there only is an AAAA record.

RFC6555 [1] recommends an algorithm for choosing the fastest address to
connect to, called "Happy Eyeballs". Ꙭ

[0]: melib/src/utils/connections.rs:497
[1]: https://www.rfc-editor.org/rfc/rfc6555

Fixes #268
2023-08-15 09:55:46 +03:00