From 2872e02a2ce460cd2e25f3c67162df49fb5a2cda Mon Sep 17 00:00:00 2001 From: Toshit Chawda Date: Thu, 18 Jul 2024 21:22:35 -0700 Subject: [PATCH] default to wisp v1 --- client/src/lib.rs | 4 ++-- simple-wisp-client/src/main.rs | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/client/src/lib.rs b/client/src/lib.rs index 1fe24b8..d3c70e9 100644 --- a/client/src/lib.rs +++ b/client/src/lib.rs @@ -173,8 +173,8 @@ impl EpoxyClientOptions { impl Default for EpoxyClientOptions { fn default() -> Self { Self { - wisp_v2: true, - udp_extension_required: true, + wisp_v2: false, + udp_extension_required: false, websocket_protocols: Vec::new(), redirect_limit: 10, user_agent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36".to_string(), diff --git a/simple-wisp-client/src/main.rs b/simple-wisp-client/src/main.rs index d8bacc9..9a146c1 100644 --- a/simple-wisp-client/src/main.rs +++ b/simple-wisp-client/src/main.rs @@ -92,9 +92,9 @@ struct Cli { /// Usernames and passwords are sent in plaintext!! #[arg(long)] auth: Option, - /// Make a Wisp V1 connection + /// Make a Wisp V2 connection #[arg(long)] - wisp_v1: bool, + wisp_v2: bool, } #[tokio::main(flavor = "multi_thread")] @@ -166,7 +166,7 @@ async fn main() -> Result<(), Box> { extension_ids.push(PasswordProtocolExtension::ID); } - let (mux, fut) = if opts.wisp_v1 { + let (mux, fut) = if !opts.wisp_v2 { ClientMux::create(rx, tx, None) .await? .with_no_required_extensions() @@ -178,7 +178,7 @@ async fn main() -> Result<(), Box> { }; println!( - "connected and created ClientMux, was downgraded {}, extensions supported {:?}", + "connected and created ClientMux, was downgraded {}, extensions supported {:?}\n", mux.downgraded, mux.supported_extension_ids );