Closed arloor closed 5 months ago
code
// static connector lazy_static! { static ref connector: TlsConnector = { let mut config = ClientConfig::new(); let der = std::fs::read("certificatename.der").unwrap(); let serverRoot = webpki::trust_anchor_util::cert_der_as_trust_anchor(der.as_ref()).unwrap(); // config.root_store.add_server_trust_anchors(&webpki_roots::TLS_SERVER_ROOTS); config.root_store.add_server_trust_anchors(&webpki::TLSServerTrustAnchors(vec![serverRoot].as_ref())); TlsConnector::from(Arc::new(config)) }; } /// Handshake logic for ShadowSocks Client async fn proxy_server_handshake( context: SharedContext, remote_stream: STcpStream, svr_cfg: &ServerConfig, relay_addr: &Address, ) -> io::Result<TlsStream<STcpStream>> { //todo:优化 // let mut stream = connector.connect(svr_cfg.addr().host().as_str(), remote_stream).await.unwrap(); let target = String::from(svr_cfg.addr().host().as_str()); let dnsname = DNSNameRef::try_from_ascii_str(&target).unwrap(); let mut stream = connector.connect(dnsname, remote_stream).await?;
/proc/{pid}/smaps shows some big Rss( which is all Private_dirty)
when I use tokio-tls,the memory seems normal
Can you give a minimal reproduction example or describe in detail how "big" it is?
code
/proc/{pid}/smaps shows some big Rss( which is all Private_dirty)
when I use tokio-tls,the memory seems normal