dsh-ssh-hub 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +202 -0
- package/README.md +271 -2
- package/cordis.patch.yml +16 -0
- package/icon.svg +3 -0
- package/lib/client.js +13975 -0
- package/lib/index.js +6908 -0
- package/lib/types/activity/history.d.ts +50 -0
- package/lib/types/alerting/notify.d.ts +89 -0
- package/lib/types/alerting/prompt-summary.d.ts +28 -0
- package/lib/types/alerting/rules.d.ts +135 -0
- package/lib/types/alerting/tools.d.ts +30 -0
- package/lib/types/audit/audit-log.d.ts +84 -0
- package/lib/types/audit/recorder.d.ts +50 -0
- package/lib/types/client/api.d.ts +222 -0
- package/lib/types/client/index.d.ts +45 -0
- package/lib/types/client/locales.d.ts +319 -0
- package/lib/types/client/native-panel.d.ts +70 -0
- package/lib/types/client/panel/ClusterTab.d.ts +7 -0
- package/lib/types/client/panel/DeployTab.d.ts +10 -0
- package/lib/types/client/panel/FleetTab.d.ts +10 -0
- package/lib/types/client/panel/HostFormDialog.d.ts +12 -0
- package/lib/types/client/panel/HostsTab.d.ts +25 -0
- package/lib/types/client/panel/LogsTab.d.ts +10 -0
- package/lib/types/client/panel/SshPanel.d.ts +14 -0
- package/lib/types/client/panel/TerminalTab.d.ts +27 -0
- package/lib/types/client/panel/TransferTab.d.ts +7 -0
- package/lib/types/client/panel/TunnelEditDialog.d.ts +15 -0
- package/lib/types/client/panel/TunnelsTab.d.ts +27 -0
- package/lib/types/client/panel/controller.d.ts +253 -0
- package/lib/types/client/panel/helpers.d.ts +45 -0
- package/lib/types/client/panel/tabs.d.ts +62 -0
- package/lib/types/client/panel/xterm.css.d.ts +2 -0
- package/lib/types/client/settings-binding.d.ts +71 -0
- package/lib/types/deploy/orchestrator.d.ts +158 -0
- package/lib/types/deploy/tools.d.ts +14 -0
- package/lib/types/dsh-home.d.ts +16 -0
- package/lib/types/engine/cluster.d.ts +19 -0
- package/lib/types/engine/connection-pool.d.ts +183 -0
- package/lib/types/engine/proxy-command.d.ts +36 -0
- package/lib/types/engine/pty.d.ts +32 -0
- package/lib/types/engine/sftp.d.ts +20 -0
- package/lib/types/engine/terminal-sessions.d.ts +67 -0
- package/lib/types/engine/tunnel-discovery.d.ts +89 -0
- package/lib/types/engine/tunnel-remarks.d.ts +49 -0
- package/lib/types/engine/tunnel.d.ts +76 -0
- package/lib/types/engine.d.ts +103 -0
- package/lib/types/http.d.ts +59 -0
- package/lib/types/index.d.ts +128 -0
- package/lib/types/inspect/checks.d.ts +118 -0
- package/lib/types/inspect/inspection.d.ts +111 -0
- package/lib/types/inspect/tools.d.ts +50 -0
- package/lib/types/logs/search.d.ts +131 -0
- package/lib/types/logs/tools.d.ts +6 -0
- package/lib/types/loopback.d.ts +64 -0
- package/lib/types/monitor/loop.d.ts +133 -0
- package/lib/types/monitor/metrics.d.ts +151 -0
- package/lib/types/mount-once.d.ts +55 -0
- package/lib/types/protocol.d.ts +524 -0
- package/lib/types/routes.d.ts +82 -0
- package/lib/types/security/known-hosts.d.ts +153 -0
- package/lib/types/security/master-secret.d.ts +157 -0
- package/lib/types/security/redact.d.ts +44 -0
- package/lib/types/security/secrets.d.ts +70 -0
- package/lib/types/ssh-config.d.ts +42 -0
- package/lib/types/store.d.ts +183 -0
- package/lib/types/tool-surface.d.ts +72 -0
- package/lib/types/tools.d.ts +56 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +126 -6
- package/src/activity/history.ts +117 -0
- package/src/alerting/notify.ts +212 -0
- package/src/alerting/prompt-summary.ts +71 -0
- package/src/alerting/rules.ts +281 -0
- package/src/alerting/tools.ts +263 -0
- package/src/audit/audit-log.ts +199 -0
- package/src/audit/recorder.ts +73 -0
- package/src/client/api.ts +782 -0
- package/src/client/css-modules.d.ts +5 -0
- package/src/client/index.ts +150 -0
- package/src/client/locales.ts +654 -0
- package/src/client/native-panel.tsx +141 -0
- package/src/client/panel/ClusterTab.tsx +141 -0
- package/src/client/panel/DeployTab.tsx +314 -0
- package/src/client/panel/FleetTab.tsx +494 -0
- package/src/client/panel/HostFormDialog.tsx +289 -0
- package/src/client/panel/HostsTab.tsx +395 -0
- package/src/client/panel/LogsTab.tsx +208 -0
- package/src/client/panel/SshPanel.tsx +105 -0
- package/src/client/panel/TerminalTab.tsx +550 -0
- package/src/client/panel/TransferTab.tsx +238 -0
- package/src/client/panel/TunnelEditDialog.tsx +174 -0
- package/src/client/panel/TunnelsTab.tsx +328 -0
- package/src/client/panel/controller.ts +507 -0
- package/src/client/panel/helpers.ts +84 -0
- package/src/client/panel/panel.module.css +1734 -0
- package/src/client/panel/tabs.ts +52 -0
- package/src/client/panel/xterm.css.ts +2 -0
- package/src/client/settings-binding.ts +184 -0
- package/src/deploy/orchestrator.ts +326 -0
- package/src/deploy/tools.ts +225 -0
- package/src/dsh-home.ts +42 -0
- package/src/engine/cluster.ts +60 -0
- package/src/engine/connection-pool.ts +721 -0
- package/src/engine/proxy-command.ts +248 -0
- package/src/engine/pty.ts +78 -0
- package/src/engine/sftp.ts +229 -0
- package/src/engine/terminal-sessions.ts +280 -0
- package/src/engine/tunnel-discovery.ts +353 -0
- package/src/engine/tunnel-remarks.ts +120 -0
- package/src/engine/tunnel.ts +300 -0
- package/src/engine.ts +195 -0
- package/src/http.ts +127 -0
- package/src/index.ts +690 -0
- package/src/inspect/checks.ts +251 -0
- package/src/inspect/inspection.ts +321 -0
- package/src/inspect/tools.ts +366 -0
- package/src/logs/search.ts +251 -0
- package/src/logs/tools.ts +160 -0
- package/src/loopback.ts +119 -0
- package/src/monitor/loop.ts +265 -0
- package/src/monitor/metrics.ts +333 -0
- package/src/mount-once.ts +142 -0
- package/src/protocol.ts +534 -0
- package/src/routes.ts +998 -0
- package/src/security/known-hosts.ts +342 -0
- package/src/security/master-secret.ts +334 -0
- package/src/security/redact.ts +119 -0
- package/src/security/secrets.ts +152 -0
- package/src/ssh-config.ts +182 -0
- package/src/store.ts +757 -0
- package/src/tool-surface.ts +96 -0
- package/src/tools.ts +550 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-side API client for the /api/dsh-ssh route family. The only data
|
|
3
|
+
* access path the panel components use — plain fetch/WebSocket, same origin.
|
|
4
|
+
*/
|
|
5
|
+
import { type AlertEventRow, type AlertStateRow, type DeployPlanPayload, type DeployRunRow, type LogSearchPayload, type LogSearchRow, type MasterSecretPayload, type MasterSecretResult, type ClusterResult, type ExecResult, type HostChange, type HostPayload, type ImportResult, type InspectionRound, type LocalConfigHost, type MetricBucketRow, type MonitorStatus, type MonitorTickResult, type RemoteDirEntry, type SecurityStatus, type SshHostSummary, type TestResult, type TransferProgress, type TunnelInfo } from '../protocol.ts';
|
|
6
|
+
/** Error carrying the route's JSON error message. */
|
|
7
|
+
export declare class SshApiError extends Error {
|
|
8
|
+
constructor(message: string);
|
|
9
|
+
}
|
|
10
|
+
/** The location facts a terminal socket URL is built from. */
|
|
11
|
+
interface PageLocation {
|
|
12
|
+
/** Page scheme with its colon (for example `https:` or `dsh-app:`). */
|
|
13
|
+
protocol: string;
|
|
14
|
+
/** Page authority, empty for a scheme that carries none. */
|
|
15
|
+
host: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The WebSocket URL the terminal route is reached at, or undefined when this
|
|
19
|
+
* page cannot carry one.
|
|
20
|
+
*
|
|
21
|
+
* A web page resolves the socket against its own origin, exactly as before.
|
|
22
|
+
*
|
|
23
|
+
* A page delivered by an application on this machine (the official DSH Desktop
|
|
24
|
+
* shell serves its Web GUI from `dsh-app://app/`) cannot carry a socket on its
|
|
25
|
+
* own scheme: the protocol handler forwards HTTP to the local Host but has no
|
|
26
|
+
* upgrade to forward. That is exactly the case the official transport hook
|
|
27
|
+
* covers - the shell publishes `__DSH_TRANSPORT__.streamBaseUrl`, the loopback
|
|
28
|
+
* authority of the Host it owns and already forwards every other request to
|
|
29
|
+
* (issue #1744). The socket is therefore dialed there instead, with the `ws`/
|
|
30
|
+
* `wss` scheme derived from that base, which is what the shell's
|
|
31
|
+
* `onBeforeSendHeaders` hook expects to see before it attaches its
|
|
32
|
+
* authority-bound credential.
|
|
33
|
+
*
|
|
34
|
+
* The base is used only on an application-delivered page. A web page that
|
|
35
|
+
* somehow carries the hook (the remote channel grants `ownsHost` to a paired
|
|
36
|
+
* LAN page, and that page is fenced behind a pairing channel) keeps resolving
|
|
37
|
+
* against its own origin, so this cannot reroute gated traffic onto a host the
|
|
38
|
+
* page is not entitled to reach. A blank authority is treated the same as an
|
|
39
|
+
* application scheme with no base: there is nothing to dial, and the caller
|
|
40
|
+
* gets the actionable reason instead of a socket that can only fail.
|
|
41
|
+
*
|
|
42
|
+
* @param location - the page location to read.
|
|
43
|
+
* @param search - the query string carrying `alias` or `session`.
|
|
44
|
+
* @param streamBaseUrl - `__DSH_TRANSPORT__.streamBaseUrl`, when the shell published one.
|
|
45
|
+
* @returns the absolute `ws:`/`wss:` URL, or undefined when the page cannot carry one.
|
|
46
|
+
*/
|
|
47
|
+
export declare function terminalSocketUrl(location: PageLocation, search: string, streamBaseUrl?: string | undefined): string | undefined;
|
|
48
|
+
/** One open terminal connection (WebSocket JSON frames). */
|
|
49
|
+
export interface TerminalConnection {
|
|
50
|
+
/** Fired on the ready frame (shell is up); carries the host session id and alias. */
|
|
51
|
+
onReady: ((sessionId: string, alias: string) => void) | undefined;
|
|
52
|
+
/** Fired on every output frame. */
|
|
53
|
+
onOutput: ((data: string) => void) | undefined;
|
|
54
|
+
/** Fired on the exit frame (or transport error). */
|
|
55
|
+
onExit: ((code: number | null, error?: string) => void) | undefined;
|
|
56
|
+
/** Fired when the server requests keyboard-interactive 2FA. */
|
|
57
|
+
onAuthPrompt: ((name: string, instructions: string, prompts: Array<{
|
|
58
|
+
prompt: string;
|
|
59
|
+
echo: boolean;
|
|
60
|
+
}>) => void) | undefined;
|
|
61
|
+
/** Send raw input to the remote shell. */
|
|
62
|
+
send(data: string): void;
|
|
63
|
+
/** Resize the remote PTY. */
|
|
64
|
+
resize(cols: number, rows: number): void;
|
|
65
|
+
/** Send interactive 2FA response codes to the remote server. */
|
|
66
|
+
sendAuthResponse(responses: string[]): void;
|
|
67
|
+
/**
|
|
68
|
+
* Leave the socket while the host keeps the remote shell alive, so a later
|
|
69
|
+
* {@link SshApi.attachTerminal} picks the session up where it left off.
|
|
70
|
+
* This is what a view does on unmount; it is not a disconnect.
|
|
71
|
+
*/
|
|
72
|
+
detach(): void;
|
|
73
|
+
/** Close the socket and end the remote session. */
|
|
74
|
+
close(): void;
|
|
75
|
+
}
|
|
76
|
+
/** The browser half's only data entry point. */
|
|
77
|
+
export declare class SshApi {
|
|
78
|
+
listHosts(queryText?: string): Promise<SshHostSummary[]>;
|
|
79
|
+
createHost(payload: HostPayload): Promise<SshHostSummary>;
|
|
80
|
+
updateHost(alias: string, patch: HostPayload): Promise<SshHostSummary>;
|
|
81
|
+
deleteHost(alias: string): Promise<void>;
|
|
82
|
+
importSshConfig(): Promise<ImportResult>;
|
|
83
|
+
/** ssh_config hosts that are not in the store yet (read-only preview). */
|
|
84
|
+
listLocalConfigHosts(): Promise<LocalConfigHost[]>;
|
|
85
|
+
testHost(alias: string): Promise<TestResult>;
|
|
86
|
+
exec(alias: string, command: string, timeoutMs?: number): Promise<ExecResult>;
|
|
87
|
+
cluster(options: {
|
|
88
|
+
command: string;
|
|
89
|
+
aliases?: string[];
|
|
90
|
+
environment?: string;
|
|
91
|
+
tags?: string[];
|
|
92
|
+
timeoutMs?: number;
|
|
93
|
+
maxWorkers?: number;
|
|
94
|
+
}): Promise<ClusterResult[]>;
|
|
95
|
+
/** The loop's health: armed, interval, host count, last tick. */
|
|
96
|
+
monitorStatus(): Promise<MonitorStatus>;
|
|
97
|
+
/** Run one round now, through the same path the timer takes. */
|
|
98
|
+
monitorTick(): Promise<MonitorTickResult>;
|
|
99
|
+
/** The retained inspection rounds, newest first. */
|
|
100
|
+
inspectionRounds(limit?: number): Promise<InspectionRound[]>;
|
|
101
|
+
/** What changed between the two most recent rounds. */
|
|
102
|
+
inspectionDiff(): Promise<HostChange[]>;
|
|
103
|
+
/** Alert states plus the recent event feed. */
|
|
104
|
+
alerts(): Promise<{
|
|
105
|
+
states: AlertStateRow[];
|
|
106
|
+
events: AlertEventRow[];
|
|
107
|
+
}>;
|
|
108
|
+
/** A metric series for one host and tier. */
|
|
109
|
+
metrics(alias: string, tier: string, metric?: string, limit?: number): Promise<MetricBucketRow[]>;
|
|
110
|
+
/** Whether credentials are actually encrypted, and why not when they are not. */
|
|
111
|
+
security(): Promise<SecurityStatus>;
|
|
112
|
+
/**
|
|
113
|
+
* Store or clear the master secret.
|
|
114
|
+
*
|
|
115
|
+
* The host decides whether a rotation is needed and refuses a change that
|
|
116
|
+
* would strand encrypted credentials, so the caller must surface `error`
|
|
117
|
+
* rather than assume success from a 200.
|
|
118
|
+
*/
|
|
119
|
+
setSecret(payload: MasterSecretPayload): Promise<MasterSecretResult>;
|
|
120
|
+
/** Recorded deployment runs, newest first. */
|
|
121
|
+
deployHistory(limit?: number): Promise<DeployRunRow[]>;
|
|
122
|
+
/** Run a deployment plan and receive the recorded run. */
|
|
123
|
+
deploy(plan: DeployPlanPayload, targets?: string[]): Promise<DeployRunRow>;
|
|
124
|
+
/** Recent cross-host log searches, newest first. */
|
|
125
|
+
logHistory(limit?: number): Promise<LogSearchRow[]>;
|
|
126
|
+
/** Run a cross-host log search. */
|
|
127
|
+
searchLogs(request: LogSearchPayload, targets?: string[]): Promise<LogSearchRow>;
|
|
128
|
+
ls(alias: string, path: string): Promise<RemoteDirEntry[]>;
|
|
129
|
+
listTunnels(): Promise<TunnelInfo[]>;
|
|
130
|
+
startTunnel(options: {
|
|
131
|
+
alias: string;
|
|
132
|
+
remotePort: number;
|
|
133
|
+
remoteHost?: string;
|
|
134
|
+
localPort?: number;
|
|
135
|
+
name?: string;
|
|
136
|
+
description?: string;
|
|
137
|
+
}): Promise<TunnelInfo>;
|
|
138
|
+
stopTunnel(tunnelId: string): Promise<boolean>;
|
|
139
|
+
/**
|
|
140
|
+
* Edit a tunnel this plugin owns. An empty name/remark clears it (the
|
|
141
|
+
* forwards.conf value shows through again); a routing change rebuilds the
|
|
142
|
+
* forward, which the response reports as `restarted`.
|
|
143
|
+
*/
|
|
144
|
+
updateTunnel(tunnelId: string, patch: {
|
|
145
|
+
name?: string;
|
|
146
|
+
description?: string;
|
|
147
|
+
remoteHost?: string;
|
|
148
|
+
remotePort?: number;
|
|
149
|
+
localPort?: number;
|
|
150
|
+
}): Promise<{
|
|
151
|
+
tunnel: TunnelInfo;
|
|
152
|
+
restarted: boolean;
|
|
153
|
+
}>;
|
|
154
|
+
/**
|
|
155
|
+
* Set or clear the name/remark of a forward another process owns. Keyed by
|
|
156
|
+
* local port so the annotation survives that process restarting.
|
|
157
|
+
*/
|
|
158
|
+
setTunnelRemark(localPort: number, remark: {
|
|
159
|
+
name?: string;
|
|
160
|
+
description?: string;
|
|
161
|
+
}): Promise<void>;
|
|
162
|
+
stopAllTunnels(alias?: string): Promise<number>;
|
|
163
|
+
/**
|
|
164
|
+
* Upload one file (raw bytes) to a remote path. Progress arrives through
|
|
165
|
+
* the NDJSON response stream; resolves when the result frame lands.
|
|
166
|
+
*/
|
|
167
|
+
uploadFile(file: File, alias: string, remotePath: string, onProgress?: (progress: TransferProgress) => void): Promise<{
|
|
168
|
+
transferredBytes: number;
|
|
169
|
+
}>;
|
|
170
|
+
/**
|
|
171
|
+
* Download a remote file with client-side progress. Streams straight to
|
|
172
|
+
* disk when the File System Access API is available (no full-file RAM
|
|
173
|
+
* copy); otherwise falls back to an in-memory Blob.
|
|
174
|
+
*/
|
|
175
|
+
downloadFile(alias: string, remotePath: string, onProgress?: (progress: TransferProgress) => void): Promise<{
|
|
176
|
+
blob?: Blob;
|
|
177
|
+
filename: string;
|
|
178
|
+
streamed: boolean;
|
|
179
|
+
bytes: number;
|
|
180
|
+
}>;
|
|
181
|
+
/**
|
|
182
|
+
* Open a new host terminal session for the alias.
|
|
183
|
+
* @param alias - the configured host alias.
|
|
184
|
+
* @param cols - initial PTY width.
|
|
185
|
+
* @param rows - initial PTY height.
|
|
186
|
+
* @returns the live connection; its ready callback carries the session id
|
|
187
|
+
* {@link attachTerminal} uses after a view detach.
|
|
188
|
+
*/
|
|
189
|
+
openTerminal(alias: string, cols: number, rows: number): TerminalConnection;
|
|
190
|
+
/**
|
|
191
|
+
* Reattach to a host-side session that outlived its view (a panel switch, a
|
|
192
|
+
* page navigation). The host replays its scrollback before the ready frame.
|
|
193
|
+
* @param sessionId - the id the previous connection reported on ready.
|
|
194
|
+
* @param cols - the view's current width.
|
|
195
|
+
* @param rows - the view's current height.
|
|
196
|
+
*/
|
|
197
|
+
attachTerminal(sessionId: string, cols: number, rows: number): TerminalConnection;
|
|
198
|
+
/**
|
|
199
|
+
* End a host session this view is not attached to (closing a background
|
|
200
|
+
* tab). The session has no other handle from the browser: giving it a
|
|
201
|
+
* dedicated HTTP route would widen the host's surface for one frame, so this
|
|
202
|
+
* opens one short-lived attach instead and sends the close frame as soon as
|
|
203
|
+
* the socket is open.
|
|
204
|
+
*
|
|
205
|
+
* The answer is "is this session no longer running", which has three
|
|
206
|
+
* truthful answers and one lie to avoid:
|
|
207
|
+
* - the frame went out on an open socket: the host ends the session;
|
|
208
|
+
* - the host answered with an exit frame: an unknown id is reported as
|
|
209
|
+
* `terminal session expired` and an ended shell also exits, and in both
|
|
210
|
+
* cases nothing is running, so the tab really is closed;
|
|
211
|
+
* - the socket errored, closed before opening, or never settled inside
|
|
212
|
+
* `timeoutMs`: delivery is unproven, so the session may still be alive and
|
|
213
|
+
* the caller must keep the tab instead of claiming it closed.
|
|
214
|
+
* @param sessionId - the session id the host reported on its ready frame.
|
|
215
|
+
* @param timeoutMs - bounded wait for the delivery signal (default 5000).
|
|
216
|
+
* @returns true when the session is known to be gone.
|
|
217
|
+
*/
|
|
218
|
+
closeTerminalSession(sessionId: string, timeoutMs?: number): Promise<boolean>;
|
|
219
|
+
/** One terminal socket over either an alias (open) or a session id (attach). */
|
|
220
|
+
private terminalSocket;
|
|
221
|
+
}
|
|
222
|
+
export {};
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Browser-half entry for the dsh-ssh plugin — runs inside the dsh web GUI.
|
|
3
|
+
*
|
|
4
|
+
* Registers the dsh-ssh locale dictionaries and mounts the two DOM surfaces:
|
|
5
|
+
* the sidebar entry row (toggles the panel) and the SSH operations panel in
|
|
6
|
+
* the center column. Failure policy: DOM mounting problems are logged, never
|
|
7
|
+
* thrown — the web shell fails the whole boot when a plugin apply throws, and
|
|
8
|
+
* an external plugin must not take the GUI down.
|
|
9
|
+
*
|
|
10
|
+
* Export discipline (packages/client rule): the /client surface carries what
|
|
11
|
+
* cordis loading needs plus types only — all value exports stay internal.
|
|
12
|
+
*/
|
|
13
|
+
import type { Context as ClientContext } from '@deepseek-ai/cordis';
|
|
14
|
+
import { type SshKey } from './locales.ts';
|
|
15
|
+
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
16
|
+
interface LocaleNamespaceMap {
|
|
17
|
+
/** dsh-ssh surface copy. */
|
|
18
|
+
'dsh-ssh': SshKey;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Required services (fiber inject waiting — the runtime must be up first).
|
|
23
|
+
*
|
|
24
|
+
* Only services this half truly cannot work without are listed. `configForms`
|
|
25
|
+
* is intentionally absent: it is optional (one terminal-font preference), and
|
|
26
|
+
* declaring it here makes the client fiber wait forever on a family that does
|
|
27
|
+
* not provide it, so `apply` never runs and the panel silently never appears.
|
|
28
|
+
* Optional services are read through `ctx.get` and degrade instead.
|
|
29
|
+
*/
|
|
30
|
+
export declare const inject: string[];
|
|
31
|
+
/** Type-only surface (export discipline: no value exports beyond the plugin contract). */
|
|
32
|
+
export type { PanelControllerSnapshot } from './panel/controller.ts';
|
|
33
|
+
export type { SshPanelProps } from './panel/SshPanel.tsx';
|
|
34
|
+
export type { HostsTabProps } from './panel/HostsTab.tsx';
|
|
35
|
+
export type { HostFormDialogProps } from './panel/HostFormDialog.tsx';
|
|
36
|
+
export type { TerminalTabProps } from './panel/TerminalTab.tsx';
|
|
37
|
+
export type { TransferTabProps } from './panel/TransferTab.tsx';
|
|
38
|
+
export type { TunnelsTabProps } from './panel/TunnelsTab.tsx';
|
|
39
|
+
export type { ClusterTabProps } from './panel/ClusterTab.tsx';
|
|
40
|
+
export type { SshKey } from './locales.ts';
|
|
41
|
+
/**
|
|
42
|
+
* Mount the SSH panel.
|
|
43
|
+
* @param ctx - client root context (locale service).
|
|
44
|
+
*/
|
|
45
|
+
export declare function apply(ctx: ClientContext): void;
|
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* dsh-ssh surface copy: zh is the key source, en mirrors every key.
|
|
3
|
+
*/
|
|
4
|
+
export declare const zh: {
|
|
5
|
+
readonly 'entry.label': "SSH";
|
|
6
|
+
readonly 'entry.tooltip': "远程 SSH 运维面板";
|
|
7
|
+
readonly 'panel.title': "远程 SSH";
|
|
8
|
+
readonly 'panel.backToConversation': "返回会话";
|
|
9
|
+
readonly 'tab.hosts': "主机";
|
|
10
|
+
readonly 'tab.terminal': "终端";
|
|
11
|
+
readonly 'tab.transfer': "传输";
|
|
12
|
+
readonly 'tab.tunnels': "隧道";
|
|
13
|
+
readonly 'tab.cluster': "集群";
|
|
14
|
+
readonly 'tab.fleet': "机群";
|
|
15
|
+
readonly 'tab.deploy': "发布";
|
|
16
|
+
readonly 'tab.logs': "日志";
|
|
17
|
+
readonly 'fleet.monitor': "监控状态";
|
|
18
|
+
readonly 'fleet.checkNow': "立即巡检";
|
|
19
|
+
readonly 'fleet.checking': "巡检中…";
|
|
20
|
+
readonly 'fleet.loading': "加载中…";
|
|
21
|
+
readonly 'fleet.armed': "监控已启动";
|
|
22
|
+
readonly 'fleet.notArmed': "监控未启动";
|
|
23
|
+
readonly 'fleet.interval': "间隔";
|
|
24
|
+
readonly 'fleet.hosts': "台主机";
|
|
25
|
+
readonly 'fleet.nextAt': "下次";
|
|
26
|
+
readonly 'fleet.security': "凭据加密";
|
|
27
|
+
readonly 'fleet.encrypted': "已加密";
|
|
28
|
+
readonly 'fleet.plaintext': "明文存储";
|
|
29
|
+
readonly 'fleet.switchOff': "未开启 encryptCredentials";
|
|
30
|
+
readonly 'fleet.noSecret': "未配置主密钥";
|
|
31
|
+
readonly 'fleet.hostKey': "指纹策略";
|
|
32
|
+
readonly 'fleet.audit': "审计";
|
|
33
|
+
readonly 'fleet.on': "开";
|
|
34
|
+
readonly 'fleet.off': "关";
|
|
35
|
+
readonly 'fleet.lastRound': "最近一轮巡检";
|
|
36
|
+
readonly 'fleet.noRound': "还没有巡检记录。启动监控,或点「立即巡检」。";
|
|
37
|
+
readonly 'fleet.breaches': "超限";
|
|
38
|
+
readonly 'fleet.blind': "探针失联";
|
|
39
|
+
readonly 'fleet.host': "主机";
|
|
40
|
+
readonly 'fleet.check': "检查项";
|
|
41
|
+
readonly 'fleet.value': "值";
|
|
42
|
+
readonly 'fleet.changes': "与上一轮的变化";
|
|
43
|
+
readonly 'fleet.noChanges': "与上一轮相比没有变化,或只有一个轮次可供比较。";
|
|
44
|
+
readonly 'fleet.before': "之前";
|
|
45
|
+
readonly 'fleet.after': "现在";
|
|
46
|
+
readonly 'fleet.alerts': "告警";
|
|
47
|
+
readonly 'fleet.noAlerts': "没有告警。注意:若监控未启动,这里为空并不代表健康。";
|
|
48
|
+
readonly 'fleet.rule': "规则";
|
|
49
|
+
readonly 'fleet.state': "状态";
|
|
50
|
+
readonly 'fleet.events': "最近事件";
|
|
51
|
+
readonly 'fleet.trigger': "触发";
|
|
52
|
+
readonly 'fleet.recover': "恢复";
|
|
53
|
+
readonly 'fleet.trend': "趋势";
|
|
54
|
+
readonly 'fleet.pickHost': "选择主机…";
|
|
55
|
+
readonly 'fleet.diskTrend': "磁盘使用率";
|
|
56
|
+
readonly 'fleet.buckets': "个数据点";
|
|
57
|
+
readonly 'fleet.secretTitle': "主密钥(凭据加密)";
|
|
58
|
+
readonly 'fleet.secretSource': "来源";
|
|
59
|
+
readonly 'fleet.secretHint': "设置主密钥后,凭据会加密存储。改密钥会重新加密所有已存凭据;密钥一旦丢失,已加密的凭据无法恢复,请先备份。";
|
|
60
|
+
readonly 'fleet.secretInput': "主密钥";
|
|
61
|
+
readonly 'fleet.secretPlaceholder': "留空则自动生成 32 字节随机密钥";
|
|
62
|
+
readonly 'fleet.secretApply': "设置 / 轮换密钥";
|
|
63
|
+
readonly 'fleet.secretGenerate': "生成一个";
|
|
64
|
+
readonly 'fleet.secretWorking': "处理中…";
|
|
65
|
+
readonly 'fleet.secretClear': "删除密钥文件";
|
|
66
|
+
readonly 'fleet.secretSaved': "已保存:来源 {source},重新加密 {rotated} 台主机的凭据。";
|
|
67
|
+
readonly 'fleet.secretCleared': "密钥文件已删除。";
|
|
68
|
+
readonly 'fleet.secretFailed': "操作失败。";
|
|
69
|
+
readonly 'fleet.plaintextList': "以下主机的凭据仍是明文:";
|
|
70
|
+
readonly 'fleet.keyPath': "密钥文件:";
|
|
71
|
+
readonly 'fleet.switchWithoutKey': "encryptCredentials 已开启,但没有主密钥 —— 凭据仍以明文存储。请设置主密钥。";
|
|
72
|
+
readonly 'deploy.form.title': "发布计划";
|
|
73
|
+
readonly 'deploy.form.hint': "按批次发布到机群;每一步都必须能回滚。批次之间默认遇错即停。";
|
|
74
|
+
readonly 'deploy.form.planId': "计划名称";
|
|
75
|
+
readonly 'deploy.form.step': "步骤";
|
|
76
|
+
readonly 'deploy.form.stepName': "步骤名";
|
|
77
|
+
readonly 'deploy.form.command': "执行命令";
|
|
78
|
+
readonly 'deploy.form.rollback': "回滚命令";
|
|
79
|
+
readonly 'deploy.form.rollbackWhy': "(必填:没有它就无法回滚)";
|
|
80
|
+
readonly 'deploy.form.addStep': "+ 添加步骤";
|
|
81
|
+
readonly 'deploy.form.removeStep': "删除";
|
|
82
|
+
readonly 'deploy.form.batchSize': "每批主机数";
|
|
83
|
+
readonly 'deploy.form.stopOnFailure': "遇错即停";
|
|
84
|
+
readonly 'deploy.form.health': "健康检查命令";
|
|
85
|
+
readonly 'deploy.form.healthOptional': "(可选)";
|
|
86
|
+
readonly 'deploy.form.targets': "目标主机";
|
|
87
|
+
readonly 'deploy.form.targetsHint': "(不选=全部)";
|
|
88
|
+
readonly 'deploy.form.noHosts': "还没有主机,请先在「主机」页添加。";
|
|
89
|
+
readonly 'deploy.form.run': "开始发布";
|
|
90
|
+
readonly 'deploy.form.running': "发布中…";
|
|
91
|
+
readonly 'deploy.error.noPlanId': "请填写计划名称。";
|
|
92
|
+
readonly 'deploy.error.noSteps': "至少需要一个执行命令。";
|
|
93
|
+
readonly 'deploy.error.noRollback': "每个步骤都必须填写回滚命令,否则失败批次无法撤销。";
|
|
94
|
+
readonly 'deploy.confirm': "确定发布计划「{plan}」到 {count} 台主机吗?命令会在这些远程服务器上真实执行;批次失败时会尝试回滚。";
|
|
95
|
+
readonly 'deploy.done': "发布完成:{ok}/{total} 台成功。";
|
|
96
|
+
readonly 'deploy.history.title': "发布记录";
|
|
97
|
+
readonly 'deploy.history.empty': "还没有发布记录。上面的表单可以发起一次。";
|
|
98
|
+
readonly 'deploy.col.time': "时间";
|
|
99
|
+
readonly 'deploy.col.plan': "计划";
|
|
100
|
+
readonly 'deploy.col.hosts': "主机数";
|
|
101
|
+
readonly 'deploy.col.result': "结果";
|
|
102
|
+
readonly 'deploy.col.failed': "失败";
|
|
103
|
+
readonly 'deploy.col.host': "主机";
|
|
104
|
+
readonly 'deploy.col.health': "健康";
|
|
105
|
+
readonly 'deploy.col.detail': "详情";
|
|
106
|
+
readonly 'deploy.ok': "成功";
|
|
107
|
+
readonly 'deploy.failed': "失败";
|
|
108
|
+
readonly 'deploy.rolledBack': "已回滚";
|
|
109
|
+
readonly 'deploy.show': "展开";
|
|
110
|
+
readonly 'deploy.hide': "收起";
|
|
111
|
+
readonly 'logs.form.title': "跨主机日志检索";
|
|
112
|
+
readonly 'logs.form.hint': "一次在多台主机上检索同一关键词,结果按主机归组,便于判断影响面。";
|
|
113
|
+
readonly 'logs.form.pattern': "关键词(固定文本,非正则)";
|
|
114
|
+
readonly 'logs.form.source': "来源";
|
|
115
|
+
readonly 'logs.source.journal': "systemd journal";
|
|
116
|
+
readonly 'logs.source.files': "目录下的日志文件";
|
|
117
|
+
readonly 'logs.form.unit': "unit 过滤";
|
|
118
|
+
readonly 'logs.form.optional': "(可选)";
|
|
119
|
+
readonly 'logs.form.directory': "日志目录";
|
|
120
|
+
readonly 'logs.form.since': "最近多少分钟";
|
|
121
|
+
readonly 'logs.form.maxLines': "每台最多返回行数";
|
|
122
|
+
readonly 'logs.form.targets': "目标主机";
|
|
123
|
+
readonly 'logs.form.targetsHint': "(不选=全部)";
|
|
124
|
+
readonly 'logs.form.noHosts': "还没有主机,请先在「主机」页添加。";
|
|
125
|
+
readonly 'logs.form.run': "开始检索";
|
|
126
|
+
readonly 'logs.form.running': "检索中…";
|
|
127
|
+
readonly 'logs.error.noPattern': "请填写关键词。";
|
|
128
|
+
readonly 'logs.results.title': "检索结果";
|
|
129
|
+
readonly 'logs.results.empty': "还没有检索记录。";
|
|
130
|
+
readonly 'logs.results.hosts': "台主机";
|
|
131
|
+
readonly 'logs.results.lines': "行";
|
|
132
|
+
readonly 'logs.results.matched': "命中";
|
|
133
|
+
readonly 'logs.results.failed': "失败";
|
|
134
|
+
readonly 'hosts.empty': "尚未配置主机。点击「新增主机」添加,或从 ~/.ssh/config 导入。";
|
|
135
|
+
readonly 'hosts.add': "新增主机";
|
|
136
|
+
readonly 'hosts.import': "导入 ~/.ssh/config";
|
|
137
|
+
readonly 'hosts.localConfigPending': "本地 ~/.ssh/config 中有 {count} 台主机尚未导入:";
|
|
138
|
+
readonly 'hosts.search': "搜索别名 / 描述 / 标签…";
|
|
139
|
+
readonly 'hosts.groupBy.label': "分组方式";
|
|
140
|
+
readonly 'hosts.groupBy.none': "不分组";
|
|
141
|
+
readonly 'hosts.groupBy.environment': "按环境分组";
|
|
142
|
+
readonly 'hosts.groupBy.tags': "按标签分组";
|
|
143
|
+
readonly 'hosts.group.ungrouped': "未设置环境";
|
|
144
|
+
readonly 'hosts.group.noTags': "无标签";
|
|
145
|
+
readonly 'hosts.group.count': "{count} 台";
|
|
146
|
+
readonly 'hosts.group.testAll': "测试全部";
|
|
147
|
+
readonly 'hosts.col.host': "主机";
|
|
148
|
+
readonly 'hosts.col.auth': "认证";
|
|
149
|
+
readonly 'hosts.col.environment': "环境";
|
|
150
|
+
readonly 'hosts.col.tags': "标签";
|
|
151
|
+
readonly 'hosts.col.description': "备注";
|
|
152
|
+
readonly 'hosts.col.actions': "操作";
|
|
153
|
+
readonly 'hosts.test': "测试";
|
|
154
|
+
readonly 'hosts.edit': "编辑";
|
|
155
|
+
readonly 'hosts.delete': "删除";
|
|
156
|
+
readonly 'hosts.deleteConfirm': "确定删除主机「{alias}」?将同时停止其隧道。";
|
|
157
|
+
readonly 'hosts.imported': "解析 {parsed} 个配置块,新增 {added} 台,修正 {updated} 台,跳过 {skipped} 个。";
|
|
158
|
+
readonly 'hosts.proxyBadge': "代理";
|
|
159
|
+
readonly 'hosts.forwardAgentBadge': "Agent 转发";
|
|
160
|
+
readonly 'hosts.forwardAgentHint': "仅对可信主机开启:远端可用本机私钥签名(等价 ssh -A)。";
|
|
161
|
+
readonly 'import.reason.wildcard': "通配符 pattern,需手动配置";
|
|
162
|
+
readonly 'import.reason.existing': "别名已存在";
|
|
163
|
+
readonly 'import.reason.match': "Match 条件块,不支持";
|
|
164
|
+
readonly 'import.reason.invalid': "字段不合法,无法导入";
|
|
165
|
+
readonly 'import.more': "其余 {count} 个未显示";
|
|
166
|
+
readonly 'hosts.testing': "连接测试中…";
|
|
167
|
+
readonly 'hosts.testOk': "连接成功({latency} ms)";
|
|
168
|
+
readonly 'hosts.testOkShort': "{latency} ms";
|
|
169
|
+
readonly 'hosts.testFailShort': "连接失败";
|
|
170
|
+
readonly 'hosts.testingShort': "测试中…";
|
|
171
|
+
readonly 'hosts.connected': "连接";
|
|
172
|
+
readonly 'hosts.notConnected': "未连接";
|
|
173
|
+
readonly 'form.title.create': "新增主机";
|
|
174
|
+
readonly 'form.title.edit': "编辑主机 {alias}";
|
|
175
|
+
readonly 'form.alias': "别名";
|
|
176
|
+
readonly 'form.aliasHint': "小写字母、数字与单连字符,操作时使用";
|
|
177
|
+
readonly 'form.host': "主机地址";
|
|
178
|
+
readonly 'form.port': "端口";
|
|
179
|
+
readonly 'form.user': "用户名";
|
|
180
|
+
readonly 'form.auth': "认证方式";
|
|
181
|
+
readonly 'form.auth.key': "密钥";
|
|
182
|
+
readonly 'form.auth.password': "密码";
|
|
183
|
+
readonly 'form.auth.agent': "SSH Agent";
|
|
184
|
+
readonly 'form.auth.none': "无认证(none)";
|
|
185
|
+
readonly 'form.auth.noneHint': "无需密码或私钥,通常用于基于用户名的沙箱或公开接入点。";
|
|
186
|
+
readonly 'form.agentPath': "Agent 路径";
|
|
187
|
+
readonly 'form.agentPathHint': "留空自动检测(SSH_AUTH_SOCK;Windows 上为原生 ssh-agent 命名管道);也可填 socket 路径或 pageant";
|
|
188
|
+
readonly 'form.authKeepHint': "编辑时密码 / 私钥留空将保留已存凭据;Agent 路径留空是合法的自动检测,选「SSH Agent」即切换到 agent 认证。";
|
|
189
|
+
readonly 'form.keyPath': "私钥路径";
|
|
190
|
+
readonly 'form.keyPathHint': "如 ~/.ssh/id_ed25519";
|
|
191
|
+
readonly 'form.passphrase': "密钥口令";
|
|
192
|
+
readonly 'form.password': "密码";
|
|
193
|
+
readonly 'form.passwordHint': "明文保存在 $DSH_HOME/dsh-ssh.json(本机私有文件)";
|
|
194
|
+
readonly 'form.passwordRequired': "密码认证需要填写密码。";
|
|
195
|
+
readonly 'form.proxyJump': "跳板机别名";
|
|
196
|
+
readonly 'form.proxyJumpHint': "逗号分隔的本地主机别名,或 [user@]host[:port] 地址,按顺序连接";
|
|
197
|
+
readonly 'form.proxyCommand': "ProxyCommand";
|
|
198
|
+
readonly 'form.proxyCommandHint': "OpenSSH ProxyCommand:%h 主机、%p 端口、%r 用户、%n 别名;留空或填 none 表示不使用。与跳板机别名互斥。";
|
|
199
|
+
readonly 'form.forwardAgent': "启用 Agent 转发";
|
|
200
|
+
readonly 'form.forwardAgentHint': "把本机 SSH Agent 转发到该主机(等价 ssh -A):远端可用本机私钥签名。仅对可信主机开启。";
|
|
201
|
+
readonly 'form.description': "备注";
|
|
202
|
+
readonly 'form.environment': "环境";
|
|
203
|
+
readonly 'form.environmentHint': "如 development / production";
|
|
204
|
+
readonly 'form.tags': "标签";
|
|
205
|
+
readonly 'form.tagsHint': "逗号分隔";
|
|
206
|
+
readonly 'form.location': "位置";
|
|
207
|
+
readonly 'form.save': "保存";
|
|
208
|
+
readonly 'form.cancel': "取消";
|
|
209
|
+
readonly 'form.required': "请填写必填字段:别名、主机地址、用户名。";
|
|
210
|
+
readonly 'form.portInvalid': "端口必须是 1-65535 之间的整数。";
|
|
211
|
+
readonly 'terminal.selectHost': "选择主机";
|
|
212
|
+
readonly 'terminal.connect': "连接";
|
|
213
|
+
readonly 'terminal.disconnect': "断开";
|
|
214
|
+
readonly 'terminal.placeholder': "选择主机后点击「连接」打开远程终端。";
|
|
215
|
+
readonly 'terminal.connecting': "正在连接…";
|
|
216
|
+
readonly 'terminal.ready': "终端已连接({alias})";
|
|
217
|
+
readonly 'terminal.exited': "终端已退出({alias})";
|
|
218
|
+
readonly 'terminal.error': "终端错误:{error}";
|
|
219
|
+
readonly 'terminal.noWebSocket': "当前页面不支持 WebSocket(应用外壳没有可连接的本地主机地址),请改用浏览器打开的 Web 界面使用终端。";
|
|
220
|
+
readonly 'terminal.auth.title': "二次身份验证 (2FA / 交互式认证)";
|
|
221
|
+
readonly 'terminal.auth.submit': "提交验证码";
|
|
222
|
+
readonly 'terminal.auth.cancel': "取消";
|
|
223
|
+
readonly 'terminal.auth.placeholder': "请输入验证码或口令";
|
|
224
|
+
readonly 'terminal.auth.hint': "服务器请求进行交互式二次验证(输入仅本次生效,不落盘):";
|
|
225
|
+
readonly 'terminal.tabs': "终端标签";
|
|
226
|
+
readonly 'terminal.newTab': "按当前主机新开标签";
|
|
227
|
+
readonly 'terminal.closeTab': "关闭标签";
|
|
228
|
+
readonly 'terminal.authPending': "待验证";
|
|
229
|
+
readonly 'terminal.tabExited': "已退出";
|
|
230
|
+
readonly 'terminal.tabError': "出错";
|
|
231
|
+
readonly 'terminal.closeFailed': "无法确认该标签已关闭:关闭帧未送达宿主。标签已保留——可重试,或切到该标签前台,用它自己的连接关闭。";
|
|
232
|
+
readonly 'transfer.selectHost': "选择主机";
|
|
233
|
+
readonly 'transfer.remotePath': "远程路径";
|
|
234
|
+
readonly 'transfer.remotePathHint': "如 /tmp/ 或 /home/user/app.tar.gz";
|
|
235
|
+
readonly 'transfer.upload': "上传";
|
|
236
|
+
readonly 'transfer.uploading': "正在上传 {file}…";
|
|
237
|
+
readonly 'transfer.download': "下载";
|
|
238
|
+
readonly 'transfer.downloading': "正在下载…";
|
|
239
|
+
readonly 'transfer.done': "完成:{bytes} 字节";
|
|
240
|
+
readonly 'transfer.failed': "传输失败:{error}";
|
|
241
|
+
readonly 'transfer.browseRemote': "浏览远程目录";
|
|
242
|
+
readonly 'transfer.refresh': "刷新";
|
|
243
|
+
readonly 'transfer.name': "名称";
|
|
244
|
+
readonly 'transfer.upLevel': "上级目录";
|
|
245
|
+
readonly 'transfer.size': "大小";
|
|
246
|
+
readonly 'transfer.modified': "修改时间";
|
|
247
|
+
readonly 'transfer.bytes': "{value} B";
|
|
248
|
+
readonly 'transfer.kib': "{value} KB";
|
|
249
|
+
readonly 'transfer.mib': "{value} MB";
|
|
250
|
+
readonly 'transfer.gib': "{value} GB";
|
|
251
|
+
readonly 'transfer.percent': "{value}%";
|
|
252
|
+
readonly 'transfer.speed': "{value}/s";
|
|
253
|
+
readonly 'transfer.dir': "目录";
|
|
254
|
+
readonly 'transfer.emptyDir': "此目录为空。";
|
|
255
|
+
readonly 'transfer.file': "文件";
|
|
256
|
+
readonly 'tunnel.empty': "没有活跃的隧道。";
|
|
257
|
+
readonly 'tunnel.start': "新建隧道";
|
|
258
|
+
readonly 'tunnel.alias': "主机别名";
|
|
259
|
+
readonly 'tunnel.remotePort': "远程端口";
|
|
260
|
+
readonly 'tunnel.remoteHost': "远程主机";
|
|
261
|
+
readonly 'tunnel.remoteHostHint': "默认 127.0.0.1(服务器自身)";
|
|
262
|
+
readonly 'tunnel.localPort': "本地端口";
|
|
263
|
+
readonly 'tunnel.localPortHint': "留空自动分配";
|
|
264
|
+
readonly 'tunnel.name': "服务名称";
|
|
265
|
+
readonly 'tunnel.nameHint': "可选项目或服务名称(如 redis、api)";
|
|
266
|
+
readonly 'tunnel.description': "备注说明";
|
|
267
|
+
readonly 'tunnel.descriptionHint': "可选说明信息";
|
|
268
|
+
readonly 'tunnel.stop': "停止";
|
|
269
|
+
readonly 'tunnel.stopAll': "全部停止";
|
|
270
|
+
readonly 'tunnel.stopAllConfirm': "确定停止全部隧道吗?";
|
|
271
|
+
readonly 'tunnel.row': "{alias}: 127.0.0.1:{localPort} -> {remoteHost}:{remotePort}";
|
|
272
|
+
readonly 'tunnel.started': "隧道已建立:127.0.0.1:{localPort}";
|
|
273
|
+
readonly 'tunnel.failed': "隧道启动失败:{error}";
|
|
274
|
+
readonly 'tunnel.externalRow': "{alias}: 127.0.0.1:{localPort} -> {remoteHost}:{remotePort}(外部进程 pid {pid})";
|
|
275
|
+
readonly 'tunnel.externalLive': "外部进程 · 端口可连通";
|
|
276
|
+
readonly 'tunnel.externalDead': "外部进程 · 端口未监听";
|
|
277
|
+
readonly 'tunnel.externalMeta': "外部进程 pid {pid}";
|
|
278
|
+
readonly 'tunnel.externalHint': "以下转发由本插件之外的程序建立,只能查看、不能在此停止。";
|
|
279
|
+
readonly 'tunnel.edit': "编辑";
|
|
280
|
+
readonly 'tunnel.editTitle': "编辑隧道 · {alias}";
|
|
281
|
+
readonly 'tunnel.editRestartHint': "修改远程主机、远程端口或本地端口会先停止当前隧道,再按新参数重建;已有连接会中断。";
|
|
282
|
+
readonly 'tunnel.editExternalHint': "这条转发由本插件之外的程序建立,转发参数不能在这里修改;名称与备注会写入本机备注库,该进程重启后依然保留。留空保存即恢复为 forwards.conf 的默认名称。";
|
|
283
|
+
readonly 'tunnel.remoteHostRequired': "远程主机不能为空。";
|
|
284
|
+
readonly 'tunnel.customRemark': "自定义";
|
|
285
|
+
readonly 'tunnel.updated': "隧道已更新。";
|
|
286
|
+
readonly 'tunnel.rebuilt': "隧道已按新参数重建:127.0.0.1:{localPort}";
|
|
287
|
+
readonly 'tunnel.remarkSaved': "备注已保存。";
|
|
288
|
+
readonly 'tunnel.remarkCleared': "备注已清除,恢复为默认名称。";
|
|
289
|
+
readonly 'cluster.command': "命令";
|
|
290
|
+
readonly 'cluster.run': "执行";
|
|
291
|
+
readonly 'cluster.confirm': "确定在匹配的主机上执行该命令吗?该操作会真实运行在远程服务器上。";
|
|
292
|
+
readonly 'cluster.aliases': "主机别名(逗号分隔,与环境、标签至少填一项)";
|
|
293
|
+
readonly 'cluster.environment': "环境过滤";
|
|
294
|
+
readonly 'cluster.tags': "标签过滤(逗号分隔)";
|
|
295
|
+
readonly 'cluster.results': "执行结果";
|
|
296
|
+
readonly 'cluster.empty': "输入命令后点击「执行」。";
|
|
297
|
+
readonly 'cluster.needSelector': "请先填写主机别名、环境或标签中的至少一项,以免误在整个机群上执行。";
|
|
298
|
+
readonly 'cluster.noMatch': "没有匹配的主机。";
|
|
299
|
+
readonly 'cluster.ok': "成功";
|
|
300
|
+
readonly 'cluster.fail': "失败";
|
|
301
|
+
readonly 'cluster.timeout': "超时";
|
|
302
|
+
readonly 'cluster.col.alias': "主机";
|
|
303
|
+
readonly 'cluster.col.status': "状态";
|
|
304
|
+
readonly 'cluster.col.exit': "退出码";
|
|
305
|
+
readonly 'cluster.col.stdout': "标准输出";
|
|
306
|
+
readonly 'cluster.col.stderr': "标准错误";
|
|
307
|
+
readonly 'cluster.col.error': "错误";
|
|
308
|
+
readonly 'cluster.col.duration': "耗时";
|
|
309
|
+
readonly 'common.loading': "加载中…";
|
|
310
|
+
readonly 'common.error': "出错:{error}";
|
|
311
|
+
readonly 'common.refresh': "刷新";
|
|
312
|
+
readonly 'common.confirm': "确定";
|
|
313
|
+
readonly 'error.disabled': "SSH 插件在宿主端未启用。请前往「设置 → Web 插件 → SSH」打开 enabled 开关。";
|
|
314
|
+
};
|
|
315
|
+
export declare const en: Record<keyof typeof zh, string>;
|
|
316
|
+
/** Locale key union. */
|
|
317
|
+
export type SshKey = keyof typeof zh;
|
|
318
|
+
/** Tiny interpolation: {name} -> value. */
|
|
319
|
+
export declare function t(dictionary: Record<string, string>, key: string, values?: Record<string, string | number>): string;
|