fix: address secure-tunnel scrutiny findings

This commit is contained in:
c4ch3c4d3
2026-06-03 19:15:48 -06:00
parent 393100de5a
commit 76bda0bc5b
3 changed files with 571 additions and 195 deletions
+14
View File
@@ -65,6 +65,7 @@ pub enum TunnelError {
ConnectionRefused(String),
#[error("connection closed")]
#[allow(dead_code)]
ConnectionClosed,
#[error("port {0} already in use")]
@@ -116,3 +117,16 @@ pub enum ConnectorError {
#[error("timeout: {0}")]
Timeout(String),
}
/// Errors returned during hostname resolution.
#[derive(Debug, Error)]
pub enum HostError {
#[error("DNS resolution failed for '{0}': {1}")]
DnsResolution(String, String),
#[error("hostname '{0}' is empty or invalid")]
InvalidHostname(String),
#[error("no addresses resolved for '{0}'")]
NoAddresses(String),
}