interfaces.ts 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. import { ConnectableTerminalProfile, InputProcessingOptions, LoginScriptsOptions } from 'tabby-terminal'
  2. export enum SSHAlgorithmType {
  3. HMAC = 'hmac',
  4. KEX = 'kex',
  5. CIPHER = 'cipher',
  6. HOSTKEY = 'serverHostKey',
  7. }
  8. export interface SSHProfile extends ConnectableTerminalProfile {
  9. options: SSHProfileOptions
  10. }
  11. export interface SSHProfileOptions extends LoginScriptsOptions {
  12. host: string
  13. port?: number
  14. user: string
  15. auth?: null|'password'|'publicKey'|'agent'|'keyboardInteractive'
  16. password?: string
  17. privateKeys?: string[]
  18. keepaliveInterval?: number
  19. keepaliveCountMax?: number
  20. readyTimeout?: number
  21. x11?: boolean
  22. skipBanner?: boolean
  23. jumpHost?: string
  24. agentForward?: boolean
  25. warnOnClose?: boolean
  26. algorithms?: Record<string, string[]>
  27. proxyCommand?: string
  28. forwardedPorts?: ForwardedPortConfig[]
  29. socksProxyHost?: string
  30. socksProxyPort?: number
  31. httpProxyHost?: string
  32. httpProxyPort?: number
  33. reuseSession?: boolean
  34. input: InputProcessingOptions,
  35. }
  36. export enum PortForwardType {
  37. Local = 'Local',
  38. Remote = 'Remote',
  39. Dynamic = 'Dynamic',
  40. }
  41. export interface ForwardedPortConfig {
  42. type: PortForwardType
  43. host: string
  44. port: number
  45. targetAddress: string
  46. targetPort: number
  47. description: string
  48. }