Add an ssh client to Terminal, as an alternative to (or tunnel for) g2mirror

This commit is contained in:
James Babcock committed 2026-11-16 01:41:12 -08:00
1 parent ab692741f7
commit 2b75a9d66e
33 files changed
+4694 -99

No files matched your search

+9
View File
@@ -117,6 +117,12 @@ function terminal({ sessions = ['vim', 'top'], presets = '', bellWake = true } =
},
'../../ui/gestures': { GESTURE_DOUBLE_CLICK: 'double-tap' },
'../../native/g2mirror-client': { G2MirrorClient: FakeClient },
'../../native/ssh': {
copyToPhoneClipboard() {}, describeSshFailure: (failure) => failure.message, getSshSecret: () => '',
openSshChannel() { throw new Error('no SSH in this test'); }, removeSshSecret() {}, setSshSecret() {},
sshClientKey: () => ({ authorizedKey: 'ecdsa-sha2-nistp256 AAAA test', fingerprint: 'SHA256:test' }),
},
'./tmux-client': { TmuxClient: class {} },
'../../native/settings-store': { onSettingsStoreChanged() {} },
'../../ui/dashboard-settings': {
enumSettingMenuItem() {}, textSettingMenuItem() {}, toggleSettingMenuItem() {},
@@ -124,6 +130,7 @@ function terminal({ sessions = ['vim', 'top'], presets = '', bellWake = true } =
terminalDisplayLayoutSetting: setting('default'),
terminalLaunchPresetsSetting: setting(presets),
terminalNewConnectionSetting: setting(''),
terminalSshPasswordSetting: setting(''),
terminalWakeOnBellSetting: setting(bellWake),
},
'../../ui/font-picker': { terminalFontPickerMenuItem() {} },
@@ -132,6 +139,8 @@ function terminal({ sessions = ['vim', 'top'], presets = '', bellWake = true } =
connectionDisplayName: (config) => config.id,
loadConnections: () => [{ id: 'c1', url: 'ok', serverName: 'host', enabled: true }],
parseConnectionString: () => ({ host: 'host' }),
parseAnyConnectionString: () => ({ kind: 'g2mirror', secure: false, host: 'host', port: 8737, authToken: 'token' }),
connectionStringHostLabel: () => 'host',
saveConnections() {}, updateConnection() {},
},
'./terminal-emulator': { TerminalEmulator: FakeEmulator },