mirror of
https://github.com/erebe/wstunnel.git
synced 2025-09-26 19:21:10 +08:00
improve ech command line description
This commit is contained in:
@@ -94,10 +94,19 @@ pub struct Client {
|
||||
|
||||
/// Disable sending SNI during TLS handshake
|
||||
/// Warning: Most reverse proxies rely on it
|
||||
#[cfg_attr(feature = "clap", arg(long, verbatim_doc_comment))]
|
||||
#[cfg_attr(
|
||||
feature = "clap",
|
||||
arg(
|
||||
long,
|
||||
verbatim_doc_comment,
|
||||
conflicts_with = "tls_sni_override",
|
||||
conflicts_with = "tls_ech_enable"
|
||||
)
|
||||
)]
|
||||
pub tls_sni_disable: bool,
|
||||
|
||||
/// Enable ECH during TLS handshake
|
||||
/// Enable ECH (encrypted sni) during TLS handshake to wstunnel server.
|
||||
/// Warning: Ech DNS config is not refreshed over time. It is retrieved only once at startup of the program
|
||||
#[cfg_attr(feature = "clap", arg(long, verbatim_doc_comment))]
|
||||
pub tls_ech_enable: bool,
|
||||
|
||||
|
@@ -128,6 +128,7 @@ pub fn tls_connector(
|
||||
let crypto_provider = ClientConfig::builder().crypto_provider().clone();
|
||||
let config_builder = ClientConfig::builder_with_provider(crypto_provider);
|
||||
let config_builder = if let Some(ech_config) = ech_config {
|
||||
info!("Using TLS ECH (encrypted sni) with config: {:?}", ech_config);
|
||||
config_builder.with_ech(EchMode::Enable(ech_config))?
|
||||
} else {
|
||||
config_builder.with_safe_default_protocol_versions()?
|
||||
|
Reference in New Issue
Block a user