-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Show ALPN log with --verbose #389
Comments
blyxxyz
added a commit
to blyxxyz/xh
that referenced
this issue
Nov 30, 2024
Enable `rustls`'s `logging` feature to start emitting logs. Enable the `tracing` crate's `log` feature to hook up the dependencies that log via that crate. `hyper` can use `tracing` but it's currently unstable and locked behind `RUSTFLAGS='--cfg hyper_unstable_tracing'` so we shouldn't use it yet. This partially addresses ducaale#389. ```console $ RUST_LOG=trace/ALPN xh https://example.org [0.495665s DEBUG rustls::client::hs] ALPN protocol is Some(b"h2") [0.499526s TRACE hyper_util::client::legacy::client] ALPN negotiated h2, updating pool HTTP/2.0 200 OK [...] $ RUST_LOG=rustls xh https://example.org [0.288085s DEBUG rustls::client::hs] No cached session for DnsName("example.org") [0.288657s DEBUG rustls::client::hs] Not resuming any session [0.288767s TRACE rustls::client::hs] Sending ClientHello Message { version: TLSv1_0, payload: Handshake { [...] [0.698465s DEBUG rustls::client::hs] Using ciphersuite TLS13_AES_256_GCM_SHA384 [0.698508s DEBUG rustls::client::tls13] Not resuming [0.698530s TRACE rustls::client::client_conn] EarlyData rejected [0.699267s DEBUG rustls::client::tls13] TLS1.3 encrypted extensions: [Protocols([ProtocolName(6832)])] [0.699342s DEBUG rustls::client::hs] ALPN protocol is Some(b"h2") [0.699578s TRACE rustls::client::tls13] Server cert is CertificateChain([CertificateDer(0x3082076e3082[...] ``` `native-tls` barely has any logging so we don't get much useful info from there yet.
blyxxyz
added a commit
to blyxxyz/xh
that referenced
this issue
Nov 30, 2024
Enable `rustls`'s `logging` feature to start emitting logs. Enable the `tracing` crate's `log` feature to hook up the dependencies that log via that crate. `hyper` can use `tracing` but it's currently unstable and locked behind `RUSTFLAGS='--cfg hyper_unstable_tracing'` so we shouldn't use it yet. This partially addresses ducaale#389. ```console $ RUST_LOG=trace/ALPN xh https://example.org [0.495665s DEBUG rustls::client::hs] ALPN protocol is Some(b"h2") [0.499526s TRACE hyper_util::client::legacy::client] ALPN negotiated h2, updating pool HTTP/2.0 200 OK [...] $ RUST_LOG=rustls xh https://example.org [0.288085s DEBUG rustls::client::hs] No cached session for DnsName("example.org") [0.288657s DEBUG rustls::client::hs] Not resuming any session [0.288767s TRACE rustls::client::hs] Sending ClientHello Message { version: TLSv1_0, payload: Handshake { [...] [0.698465s DEBUG rustls::client::hs] Using ciphersuite TLS13_AES_256_GCM_SHA384 [0.698508s DEBUG rustls::client::tls13] Not resuming [0.698530s TRACE rustls::client::client_conn] EarlyData rejected [0.699267s DEBUG rustls::client::tls13] TLS1.3 encrypted extensions: [Protocols([ProtocolName(6832)])] [0.699342s DEBUG rustls::client::hs] ALPN protocol is Some(b"h2") [0.699578s TRACE rustls::client::tls13] Server cert is CertificateChain([CertificateDer(0x3082076e3082[...] ``` `native-tls` barely has any logging so we don't get much useful info from there yet.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Show ALPN log with --verbose arg, similar to curl:
The text was updated successfully, but these errors were encountered: