Files
orca/src/main/ssh/ssh-relay-windows-launch-command.ts
T

20 lines
685 B
TypeScript

/** How the host census reaches a running Windows relay through its own bridge. */
import { commandWithNodePath } from './ssh-remote-commands'
import type { RemoteHostPlatform } from './ssh-remote-platform'
import { powerShellLiteral } from './ssh-remote-powershell'
export function windowsRelayConnectCommand(
hostPlatform: RemoteHostPlatform,
nodePath: string,
remoteDir: string,
sockPath: string,
credentialFile: string
): string {
return commandWithNodePath(
hostPlatform,
nodePath,
remoteDir,
`& ${powerShellLiteral(nodePath)} relay.js --connect --sock-path ${powerShellLiteral(sockPath)} --credential-file ${powerShellLiteral(credentialFile)}`
)
}