дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-09 19:25:54 +02:00
feat(remote-dev): forward ports of the remote host (#1131)
Remote windows get a Ports tool window: forward localhost:<port> of the remote host to this machine (same port when free here), with Open in Browser / Copy / Stop. Forwarded ports are remembered per host and folder and forwarded again on reconnect. Tunnels reuse the window's SSH session (ide_ssh::Tunnel can prefer a local port) and close with the connection. Closes #819
Цей коміт міститься в:
1 джерело
a3bbbf90a4
коміт
53b8cdeb51
11 files changed
+469
-7
No files matched your search
@@ -1116,6 +1116,15 @@ export const commands = {
|
||||
commands: string[],
|
||||
} | null>("remote_current"),
|
||||
remoteDisconnect: () => __TAURI_INVOKE<void>("remote_disconnect"),
|
||||
/** The remote ports this window forwards to this machine. */
|
||||
remoteForwardedPorts: () => __TAURI_INVOKE<ForwardedPort[]>("remote_forwarded_ports"),
|
||||
/**
|
||||
* Forwards `localhost:<remote_port>` of the remote host to the same port here when it is free,
|
||||
* else to a free one. Nothing needs to listen there yet; connections are opened per use.
|
||||
*/
|
||||
remoteForwardPort: (remotePort: number) => typedError<ForwardedPort, IdeError>(__TAURI_INVOKE("remote_forward_port", { remotePort })),
|
||||
/** Stops forwarding `remote_port`. */
|
||||
remoteStopForwarding: (remotePort: number) => typedError<null, IdeError>(__TAURI_INVOKE("remote_stop_forwarding", { remotePort })),
|
||||
/**
|
||||
* Runs a command on the window's remote server; `args` and the result are JSON
|
||||
* text. Streaming arguments are `{ "$channel": id }`; their values arrive on
|
||||
@@ -3464,6 +3473,12 @@ export type FormatOptions = {
|
||||
tool?: ExternalFormatter | null,
|
||||
};
|
||||
|
||||
/** A port of the remote host reachable on this machine at `localhost:local_port`. */
|
||||
export type ForwardedPort = {
|
||||
remotePort: number,
|
||||
localPort: number,
|
||||
};
|
||||
|
||||
/** One occurrence of a duplicated code fragment. */
|
||||
export type Fragment = {
|
||||
path: IpcPath,
|
||||
|
||||
Reference in new issue
Заблокувати користувача