Add DNS hostname support in peer addresses for UDP and TCP transports

Add resolve_socket_addr() with IP fast path and tokio::net::lookup_host()
fallback for DNS hostnames. Peer addresses can now use hostnames like
"peer1.example.com:2121" alongside IP addresses.

UDP transport adds a per-transport DNS cache (60s TTL) to avoid
per-packet resolution. TCP resolves at connect time (one-shot).

Update design docs, config examples, and changelog to reflect hostname
support in transport addressing.
This commit is contained in:
Johnathan Corgan
2026-03-15 00:49:54 +00:00
parent d873d0e00e
commit c0f30d8fe8
12 changed files with 271 additions and 44 deletions
+1 -1
View File
@@ -72,7 +72,7 @@ peers:
alias: "gateway"
addresses:
- transport: udp
addr: "217.77.8.91:2121" # public FIPS testing node
addr: "217.77.8.91:2121" # IP or hostname (e.g., "peer.example.com:2121")
connect_policy: auto_connect
```