mirror of
https://github.com/rustdesk/hbb_common.git
synced 2026-04-06 16:06:25 +00:00
mobile wss use rustls_platform_verifier
Signed-off-by: 21pages <sunboeasy@gmail.com>
This commit is contained in:
@@ -56,7 +56,6 @@ const MAXIMUM_RESPONSE_HEADERS: usize = 16;
|
||||
const DEFINE_TIME_OUT: u64 = 600;
|
||||
|
||||
pub trait IntoUrl {
|
||||
|
||||
// Besides parsing as a valid `Url`, the `Url` must be a valid
|
||||
// `http::Uri`, in that it makes sense to use in a network request.
|
||||
fn into_url(self) -> Result<Url, ProxyError>;
|
||||
@@ -455,8 +454,10 @@ impl Proxy {
|
||||
Input: AsyncRead + AsyncWrite + Unpin,
|
||||
T: IntoTargetAddr<'a>,
|
||||
{
|
||||
use rustls_platform_verifier::ConfigVerifierExt;
|
||||
use std::convert::TryFrom;
|
||||
let verifier = rustls_platform_verifier::tls_config();
|
||||
let verifier = tokio_rustls::rustls::ClientConfig::with_platform_verifier()
|
||||
.map_err(|e| ProxyError::IoError(std::io::Error::other(e)))?;
|
||||
let url_domain = self.intercept.get_domain()?;
|
||||
|
||||
let domain = rustls_pki_types::ServerName::try_from(url_domain.as_str())
|
||||
|
||||
Reference in New Issue
Block a user