Files
firezone/rust/client-shared/Cargo.toml
Thomas Eizinger de7d3bff89 fix(connlib): re-resolve portal host on WS hiccup (#10817)
Currently, the DNS records for the portal's hostname are only resolved
during startup. When the WebSocket connection fails, we try to reconnect
but only with the IPs that we have previously resolved. If the local IP
stack changed since then or the hostname now points to different IPs, we
will run into the reconnect-timeout configured in `phoenix-channel`.

To fix this, we re-resolve the portal's hostname every time the
WebSocket connection fails. For the Gateway, this is easy as we can
simply reuse the already existing `TokioResolver` provided by hickory.
For the Client, we need to write our own DNS client on top of our socket
factory abstraction to ensure we don't create a routing loop with the
resulting DNS queries. To simplify things, we only send DNS queries over
UDP. Those are not guaranteed to succeed but given that we do this on
every "hiccup", we already have a retry mechanism. We use the currently
configured upstream DNS servers for this.

Resolves: #10238
2025-11-11 03:24:36 +00:00

39 lines
1.2 KiB
TOML

[package]
name = "client-shared"
version = "0.1.0"
edition = { workspace = true }
license = { workspace = true }
[dependencies]
anyhow = { workspace = true }
backoff = { workspace = true }
bimap = { workspace = true }
connlib-model = { workspace = true }
dns-types = { workspace = true }
firezone-logging = { workspace = true }
firezone-tunnel = { workspace = true }
futures = { workspace = true }
ip_network = { workspace = true }
libc = { workspace = true }
parking_lot = { workspace = true }
phoenix-channel = { workspace = true }
secrecy = { workspace = true }
serde = { workspace = true, features = ["std", "derive"] }
snownet = { workspace = true }
socket-factory = { workspace = true }
thiserror = { workspace = true }
time = { workspace = true, features = ["formatting"] }
tokio = { workspace = true, features = ["rt", "sync"] }
tokio-stream = { workspace = true, features = ["sync"] }
tracing = { workspace = true, features = ["std", "attributes"] }
tun = { workspace = true }
url = { workspace = true, features = ["serde"] }
[dev-dependencies]
chrono = { workspace = true }
serde_json = { workspace = true, features = ["std"] }
tokio = { workspace = true, features = ["macros"] }
[lints]
workspace = true