mirror of
https://github.com/lollipopkit/flutter_server_box.git
synced 2025-12-17 07:14:28 +01:00
readd: jump server
This commit is contained in:
@@ -60,28 +60,25 @@ Future<SSHClient> genClient(
|
||||
onStatus?.call(GenSSHClientStatus.socket);
|
||||
|
||||
final socket = await () async {
|
||||
/// Issues #210
|
||||
/// Temporarily comment out the proxy function
|
||||
|
||||
// Proxy
|
||||
// final jumpSpi_ = () {
|
||||
// // Multi-thread or key login
|
||||
// if (jumpSpi != null) return jumpSpi;
|
||||
// // Main thread
|
||||
// if (spi.jumpId != null) return Stores.server.box.get(spi.jumpId);
|
||||
// }();
|
||||
// if (jumpSpi_ != null) {
|
||||
// final jumpClient = await genClient(
|
||||
// jumpSpi_,
|
||||
// privateKey: jumpPrivateKey,
|
||||
// timeout: timeout,
|
||||
// );
|
||||
final jumpSpi_ = () {
|
||||
// Multi-thread or key login
|
||||
if (jumpSpi != null) return jumpSpi;
|
||||
// Main thread
|
||||
if (spi.jumpId != null) return Stores.server.box.get(spi.jumpId);
|
||||
}();
|
||||
if (jumpSpi_ != null) {
|
||||
final jumpClient = await genClient(
|
||||
jumpSpi_,
|
||||
privateKey: jumpPrivateKey,
|
||||
timeout: timeout,
|
||||
);
|
||||
|
||||
// return await jumpClient.forwardLocal(
|
||||
// spi.ip,
|
||||
// spi.port,
|
||||
// );
|
||||
// }
|
||||
return await jumpClient.forwardLocal(
|
||||
spi.ip,
|
||||
spi.port,
|
||||
);
|
||||
}
|
||||
|
||||
// Direct
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user