diff --git a/tabby-ssh/src/components/sshProfileSettings.component.ts b/tabby-ssh/src/components/sshProfileSettings.component.ts index 410014e3..50971607 100644 --- a/tabby-ssh/src/components/sshProfileSettings.component.ts +++ b/tabby-ssh/src/components/sshProfileSettings.component.ts @@ -2,7 +2,7 @@ import { Component, ViewChild } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' -import { ConfigService, FileProvidersService, Platform, HostAppService, PromptModalComponent } from 'tabby-core' +import { ConfigService, FileProvidersService, Platform, HostAppService, PromptModalComponent, PartialProfile } from 'tabby-core' import { LoginScriptsSettingsComponent } from 'tabby-terminal' import { PasswordStorageService } from '../services/passwordStorage.service' import { ForwardedPortConfig, SSHAlgorithmType, SSHProfile } from '../api' @@ -20,7 +20,7 @@ export class SSHProfileSettingsComponent { supportedAlgorithms = supportedAlgorithms algorithms: Record> = {} - jumpHosts: SSHProfile[] + jumpHosts: PartialProfile[] @ViewChild('loginScriptsSettings') loginScriptsSettings: LoginScriptsSettingsComponent|null constructor ( diff --git a/tabby-ssh/src/components/sshTab.component.ts b/tabby-ssh/src/components/sshTab.component.ts index 51a741ac..1246d53d 100644 --- a/tabby-ssh/src/components/sshTab.component.ts +++ b/tabby-ssh/src/components/sshTab.component.ts @@ -2,7 +2,7 @@ import colors from 'ansi-colors' import { Component, Injector, HostListener } from '@angular/core' import { NgbModal } from '@ng-bootstrap/ng-bootstrap' import { first } from 'rxjs' -import { Platform, RecoveryToken } from 'tabby-core' +import { PartialProfile, Platform, ProfilesService, RecoveryToken } from 'tabby-core' import { BaseTerminalTabComponent } from 'tabby-terminal' import { SSHService } from '../services/ssh.service' import { SSHSession } from '../session/ssh' @@ -32,6 +32,7 @@ export class SSHTabComponent extends BaseTerminalTabComponent { injector: Injector, public ssh: SSHService, private ngbModal: NgbModal, + private profilesService: ProfilesService, ) { super(injector) } @@ -78,13 +79,16 @@ export class SSHTabComponent extends BaseTerminalTabComponent { async setupOneSession (session: SSHSession): Promise { if (session.profile.options.jumpHost) { - const jumpConnection: SSHProfile|null = this.config.store.profiles.find(x => x.id === session.profile.options.jumpHost) + const jumpConnection: PartialProfile|null = this.config.store.profiles.find(x => x.id === session.profile.options.jumpHost) if (!jumpConnection) { throw new Error(`${session.profile.options.host}: jump host "${session.profile.options.jumpHost}" not found in your config`) } - const jumpSession = new SSHSession(this.injector, jumpConnection) + const jumpSession = new SSHSession( + this.injector, + this.profilesService.getConfigProxyForProfile(jumpConnection) + ) await this.setupOneSession(jumpSession)