fix: temporarily disable jump server
This commit is contained in:
@@ -60,25 +60,28 @@ Future<SSHClient> genClient(
|
||||
onStatus?.call(GenSSHClientStatus.socket);
|
||||
|
||||
final socket = await () async {
|
||||
// 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,
|
||||
);
|
||||
/// Issues #210
|
||||
/// Temporarily comment out the proxy function
|
||||
|
||||
return await jumpClient.forwardLocal(
|
||||
spi.ip,
|
||||
spi.port,
|
||||
);
|
||||
}
|
||||
// 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,
|
||||
// );
|
||||
|
||||
// return await jumpClient.forwardLocal(
|
||||
// spi.ip,
|
||||
// spi.port,
|
||||
// );
|
||||
// }
|
||||
|
||||
// Direct
|
||||
try {
|
||||
|
||||
@@ -273,7 +273,7 @@ class ServerProvider extends ChangeNotifier {
|
||||
final time1 = DateTime.now();
|
||||
s.client = await genClient(
|
||||
spi,
|
||||
timeout: Stores.setting.timeoutD,
|
||||
timeout: Duration(seconds: Stores.setting.timeout.fetch()),
|
||||
);
|
||||
final time2 = DateTime.now();
|
||||
final spentTime = time2.difference(time1).inMilliseconds;
|
||||
|
||||
@@ -28,9 +28,6 @@ class SettingStore extends PersistentStore {
|
||||
5,
|
||||
);
|
||||
|
||||
/// Duration of [timeout]
|
||||
Duration get timeoutD => Duration(seconds: timeout.fetch());
|
||||
|
||||
/// Record history of SFTP path and etc.
|
||||
late final recordHistory = StoreProperty(
|
||||
box,
|
||||
@@ -65,6 +62,13 @@ class SettingStore extends PersistentStore {
|
||||
isDesktop,
|
||||
);
|
||||
|
||||
/// Disk view: amount / IO
|
||||
late final serverTabPreferDiskAmount = StoreProperty(
|
||||
box,
|
||||
'serverTabPreferDiskAmount',
|
||||
false,
|
||||
);
|
||||
|
||||
// ------END------
|
||||
|
||||
late final primaryColor = StoreProperty(
|
||||
@@ -224,13 +228,6 @@ class SettingStore extends PersistentStore {
|
||||
late final serverFuncBtnsDisplayName =
|
||||
StoreProperty(box, 'serverFuncBtnsDisplayName', true);
|
||||
|
||||
/// Disk view: amount / IO
|
||||
late final serverTabPreferDiskAmount = StoreProperty(
|
||||
box,
|
||||
'serverTabPreferDiskAmount',
|
||||
false,
|
||||
);
|
||||
|
||||
// Never show these settings for users
|
||||
//
|
||||
// ------BEGIN------
|
||||
|
||||
@@ -215,8 +215,10 @@ class _FullScreenPageState extends State<FullScreenPage> with AfterLayoutMixin {
|
||||
children: [
|
||||
Text(
|
||||
spi.name,
|
||||
style:
|
||||
const TextStyle(fontWeight: FontWeight.bold, fontSize: 19,),
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
fontSize: 19,
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const Icon(
|
||||
|
||||
@@ -378,6 +378,10 @@ class _ServerEditPageState extends State<ServerEditPage> {
|
||||
leading: const Icon(Icons.map),
|
||||
initiallyExpanded: _jumpServer.value != null,
|
||||
title: Text(l10n.jumpServer),
|
||||
subtitle: const Text(
|
||||
"It was temporarily disabled because it has some bugs (Issues #210)",
|
||||
style: UIs.textGrey,
|
||||
),
|
||||
children: children,
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user