#[derive(thiserror::Error, Debug)]
pub enum Error {
#[error("I/O error: {0}")]
Io(#[from] std::io::Error),
#[cfg(feature = "shadowsocks")]
#[error("Invalid Shadowsocks URL: {0}")]
InvalidSsUrl(#[from] shadowsocks::config::UrlParseError),
#[cfg(feature = "hysteria2")]
#[error("Hysteria2 error: {0}")]
Hysteria2(#[from] hysteria2::HysteriaError),
#[error("reqwest request conversion error: {0}")]
ReqwestRequestConversion(reqwest::Error),
#[error("hyper client error: {0}")]
HyperClient(hyper_util::client::legacy::Error),
#[error("hyper body error: {0}")]
HyperBody(hyper::Error),
#[error("Unsupported Protocol: {0}")]
UnsupportedProtocol(String),
}