bug fix for msgbox, todo: test more for msgbox in file_transfer.tis
This commit is contained in:
parent
6767dda246
commit
b24e16d6c1
@ -4,7 +4,7 @@ use crate::{
|
|||||||
udp::FramedSocket,
|
udp::FramedSocket,
|
||||||
ResultType,
|
ResultType,
|
||||||
};
|
};
|
||||||
use anyhow::{bail, Context};
|
use anyhow::Context;
|
||||||
use std::net::SocketAddr;
|
use std::net::SocketAddr;
|
||||||
use tokio::net::ToSocketAddrs;
|
use tokio::net::ToSocketAddrs;
|
||||||
use tokio_socks::{IntoTargetAddr, TargetAddr};
|
use tokio_socks::{IntoTargetAddr, TargetAddr};
|
||||||
|
@ -273,6 +273,7 @@ async fn test_nat_type_() -> ResultType<bool> {
|
|||||||
)
|
)
|
||||||
.await?;
|
.await?;
|
||||||
if Config::get_network_type() == NetworkType::Direct {
|
if Config::get_network_type() == NetworkType::Direct {
|
||||||
|
// to-do: should set NatType::UNKNOWN for proxy
|
||||||
addr = socket.local_addr();
|
addr = socket.local_addr();
|
||||||
}
|
}
|
||||||
socket.send(&msg_out).await?;
|
socket.send(&msg_out).await?;
|
||||||
|
@ -261,8 +261,8 @@ function msgbox_(type, title, text, callback, height, width, retry, contentStyle
|
|||||||
} else if (res == "!alive") {
|
} else if (res == "!alive") {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else if (res.type == "input-password") {
|
} else if (res.type == "input-password") {
|
||||||
if (!is_port_forward) msgbox("connecting", "Connecting...", "Logging in...");
|
|
||||||
handler.login(res.password, res.remember);
|
handler.login(res.password, res.remember);
|
||||||
|
if (!is_port_forward) msgbox("connecting", "Connecting...", "Logging in...");
|
||||||
} else if (res.reconnect) {
|
} else if (res.reconnect) {
|
||||||
if (!is_port_forward) connecting();
|
if (!is_port_forward) connecting();
|
||||||
handler.reconnect();
|
handler.reconnect();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user