fix (#195) & opt.

- fix: debug provider color
- fix: can't write script through SFTP (#195)
- opt.: go next refresh only after current refresh task is done
This commit is contained in:
lollipopkit
2023-10-30 12:01:07 +08:00
parent eb0b219505
commit 2b52e8e6ee
6 changed files with 72 additions and 42 deletions

View File

@@ -49,6 +49,7 @@ Future<SSHClient> genClient(
/// [ServerPrivateInfo] of the jump server
ServerPrivateInfo? jumpSpi,
String? jumpPrivateKey,
}) async {
onStatus?.call(GenSSHClientStatus.socket);
SSHSocket? socket;
@@ -76,14 +77,13 @@ Future<SSHClient> genClient(
if (jumpSpi != null) {
final jumpClient = await genClient(
jumpSpi,
privateKey: privateKey,
privateKey: jumpPrivateKey,
timeout: timeout,
);
// Use `0.0.0.0` as localhost to use all interfaces.
return await jumpClient.forwardLocal(
spi.ip,
spi.port,
localHost: '0.0.0.0',
);
}
}();