Closed AdrienPensart closed 10 months ago
Salvo use hyper-tls
, refer to https://github.com/hyperium/hyper-tls/issues/11
Found solution!
let mut http_connector = HttpConnector::new();
http_connector.enforce_http(false);
let native_tls_connector = native_tls::TlsConnector::builder()
.danger_accept_invalid_certs(true)
.build()?;
let tls_connector = tokio_native_tls::TlsConnector::from(native_tls_connector);
let connector = HttpsConnector::from((http_connector, tls_connector));
let upstreams = ["https://localhost:5656/db/edgedb/edgeql"];
let proxy = Proxy::new(
upstreams,
HyperClient::new(
HyperUtilClient::builder(salvo::rt::tokio::TokioExecutor::new()).build(connector),
),
);
Hello!
I try to give a client which would not check certificate validity for Proxy object, but can't manage to initialize it correctly, I tried with rustls, hyper-rustls, openssl, native-tls... no client or https connector seems to satisfy salvo::salvo_proxy::Client.
Do you have an clear example ? Do I have to implement some traits myself?
Thank you