1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-26 03:51:49 +03:00

Merge pull request #2601 from JonathanBeverley/jmb/features

This commit is contained in:
Eugene 2020-07-29 17:45:05 +02:00 committed by GitHub
commit ae3870e297
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 14 additions and 15 deletions

2
.gitignore vendored
View File

@ -28,3 +28,5 @@ docs/api
.electron-symbols
sentry.properties
sentry-symbols.js
terminus-ssh/util/pagent.exe

View File

@ -9,10 +9,12 @@
"typings": "typings/index.d.ts",
"scripts": {
"build": "webpack --progress --color",
"watch": "webpack --progress --color --watch"
"watch": "webpack --progress --color --watch",
"postinstall": "xcopy /i node_modules\\ssh2\\util\\pagent.exe util\\"
},
"files": [
"dist"
"dist",
"util/pagent.exe"
],
"author": "Eugene Pankov",
"license": "MIT",

View File

@ -36,6 +36,7 @@ export interface SSHConnection {
skipBanner?: boolean
disableDynamicTitle?: boolean
jumpHost?: string
agentForward?: boolean
algorithms?: {[t: string]: string[]}
}

View File

@ -83,6 +83,11 @@
.title X11 forwarding
toggle([(ngModel)]='connection.x11')
.form-line
.header
.title Allow Agent Forwarding
toggle([(ngModel)]='connection.agentForward')
.form-line
.header
.title Tab color

View File

@ -16,10 +16,6 @@ import { PromptModalComponent } from '../components/promptModal.component'
import { PasswordStorageService } from './passwordStorage.service'
import { SSHTabComponent } from '../components/sshTab.component'
try {
var windowsProcessTreeNative = require('windows-process-tree/build/Release/windows_process_tree.node') // eslint-disable-line @typescript-eslint/no-var-requires, no-var
} catch { }
@Injectable({ providedIn: 'root' })
export class SSHService {
private logger: Logger
@ -187,14 +183,7 @@ export class SSHService {
let agent: string|null = null
if (this.hostApp.platform === Platform.Windows) {
const pageantRunning = new Promise<boolean>(resolve => {
windowsProcessTreeNative.getProcessList(list => { // eslint-disable-line block-scoped-var
resolve(list.some(x => x.name === 'pageant.exe'))
}, 0)
})
if (await pageantRunning) {
agent = 'pageant'
}
agent = 'pageant'
} else {
agent = process.env.SSH_AUTH_SOCK as string
}
@ -208,7 +197,7 @@ export class SSHService {
privateKey: privateKey || undefined,
tryKeyboard: true,
agent: agent || undefined,
agentForward: !!agent,
agentForward: session.connection.agentForward && !!agent,
keepaliveInterval: session.connection.keepaliveInterval,
keepaliveCountMax: session.connection.keepaliveCountMax,
readyTimeout: session.connection.readyTimeout,