diff --git a/libs/hbb_common/src/socket_client.rs b/libs/hbb_common/src/socket_client.rs index e0dac0fb0..0375b713e 100644 --- a/libs/hbb_common/src/socket_client.rs +++ b/libs/hbb_common/src/socket_client.rs @@ -4,7 +4,7 @@ use crate::{ udp::FramedSocket, ResultType, }; -use anyhow::{bail, Context}; +use anyhow::Context; use std::net::SocketAddr; use tokio::net::ToSocketAddrs; use tokio_socks::{IntoTargetAddr, TargetAddr}; diff --git a/src/common.rs b/src/common.rs index 13f013540..2d5fa5073 100644 --- a/src/common.rs +++ b/src/common.rs @@ -273,6 +273,7 @@ async fn test_nat_type_() -> ResultType { ) .await?; if Config::get_network_type() == NetworkType::Direct { + // to-do: should set NatType::UNKNOWN for proxy addr = socket.local_addr(); } socket.send(&msg_out).await?; diff --git a/src/ui/common.tis b/src/ui/common.tis index 09ffae08c..2ce6214e2 100644 --- a/src/ui/common.tis +++ b/src/ui/common.tis @@ -261,8 +261,8 @@ function msgbox_(type, title, text, callback, height, width, retry, contentStyle } else if (res == "!alive") { // do nothing } else if (res.type == "input-password") { - if (!is_port_forward) msgbox("connecting", "Connecting...", "Logging in..."); handler.login(res.password, res.remember); + if (!is_port_forward) msgbox("connecting", "Connecting...", "Logging in..."); } else if (res.reconnect) { if (!is_port_forward) connecting(); handler.reconnect();