default to wisp v1

This commit is contained in:
Toshit Chawda 2024-07-18 21:22:35 -07:00
parent d6353bd5a9
commit 2872e02a2c
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
2 changed files with 6 additions and 6 deletions

View file

@ -173,8 +173,8 @@ impl EpoxyClientOptions {
impl Default for EpoxyClientOptions { impl Default for EpoxyClientOptions {
fn default() -> Self { fn default() -> Self {
Self { Self {
wisp_v2: true, wisp_v2: false,
udp_extension_required: true, udp_extension_required: false,
websocket_protocols: Vec::new(), websocket_protocols: Vec::new(),
redirect_limit: 10, 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(), 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(),

View file

@ -92,9 +92,9 @@ struct Cli {
/// Usernames and passwords are sent in plaintext!! /// Usernames and passwords are sent in plaintext!!
#[arg(long)] #[arg(long)]
auth: Option<String>, auth: Option<String>,
/// Make a Wisp V1 connection /// Make a Wisp V2 connection
#[arg(long)] #[arg(long)]
wisp_v1: bool, wisp_v2: bool,
} }
#[tokio::main(flavor = "multi_thread")] #[tokio::main(flavor = "multi_thread")]
@ -166,7 +166,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
extension_ids.push(PasswordProtocolExtension::ID); extension_ids.push(PasswordProtocolExtension::ID);
} }
let (mux, fut) = if opts.wisp_v1 { let (mux, fut) = if !opts.wisp_v2 {
ClientMux::create(rx, tx, None) ClientMux::create(rx, tx, None)
.await? .await?
.with_no_required_extensions() .with_no_required_extensions()
@ -178,7 +178,7 @@ async fn main() -> Result<(), Box<dyn Error + Send + Sync>> {
}; };
println!( println!(
"connected and created ClientMux, was downgraded {}, extensions supported {:?}", "connected and created ClientMux, was downgraded {}, extensions supported {:?}\n",
mux.downgraded, mux.supported_extension_ids mux.downgraded, mux.supported_extension_ids
); );