fix: address secure-tunnel scrutiny findings
This commit is contained in:
@@ -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),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user