Revert "mobile wss use rustls_platform_verifier"

This commit is contained in:
RustDesk
2025-10-30 10:27:55 +08:00
committed by GitHub
parent b166534807
commit 84a13ad7f3
5 changed files with 7 additions and 77 deletions

View File

@@ -56,6 +56,7 @@ 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>;
@@ -454,10 +455,8 @@ impl Proxy {
Input: AsyncRead + AsyncWrite + Unpin,
T: IntoTargetAddr<'a>,
{
use rustls_platform_verifier::ConfigVerifierExt;
use std::convert::TryFrom;
let verifier = tokio_rustls::rustls::ClientConfig::with_platform_verifier()
.map_err(|e| ProxyError::IoError(std::io::Error::other(e)))?;
let verifier = rustls_platform_verifier::tls_config();
let url_domain = self.intercept.get_domain()?;
let domain = rustls_pki_types::ServerName::try_from(url_domain.as_str())