fix: jump server (#190)

This commit is contained in:
lollipopkit
2023-10-30 17:10:29 +08:00
parent 4971239bfc
commit bff799afd9
9 changed files with 103 additions and 73 deletions

View File

@@ -81,7 +81,12 @@ Future<void> _download(
try {
mainSendPort.send(SftpWorkerStatus.preparing);
final watch = Stopwatch()..start();
final client = await genClient(req.spi, privateKey: req.privateKey);
final client = await genClient(
req.spi,
privateKey: req.privateKey,
jumpSpi: req.jumpSpi,
jumpPrivateKey: req.jumpPrivateKey,
);
mainSendPort.send(SftpWorkerStatus.sshConnectted);
/// Create the directory if not exists
@@ -131,7 +136,12 @@ Future<void> _upload(
try {
mainSendPort.send(SftpWorkerStatus.preparing);
final watch = Stopwatch()..start();
final client = await genClient(req.spi, privateKey: req.privateKey);
final client = await genClient(
req.spi,
privateKey: req.privateKey,
jumpSpi: req.jumpSpi,
jumpPrivateKey: req.jumpPrivateKey,
);
mainSendPort.send(SftpWorkerStatus.sshConnectted);
final local = File(req.localPath);