fix: Win and macOS compilation errors

This commit is contained in:
yuluo
2024-04-24 00:44:38 +08:00
parent 369df12a5d
commit 8d538994a8
2 changed files with 6 additions and 3 deletions

View File

@@ -48,6 +48,9 @@ pub enum ProxyError {
HttpCode200(u16), HttpCode200(u16),
#[error("The proxy address resolution failed: {0}")] #[error("The proxy address resolution failed: {0}")]
AddressResolutionFailed(String), AddressResolutionFailed(String),
#[cfg(any(target_os = "windows", target_os = "macos"))]
#[error("The native tls error: {0}")]
NativeTlsError(#[from] tokio_native_tls::native_tls::Error),
} }
const MAXIMUM_RESPONSE_HEADER_LENGTH: usize = 4096; const MAXIMUM_RESPONSE_HEADER_LENGTH: usize = 4096;