mirror of
https://github.com/Termix-SSH/Termix.git
synced 2026-10-29 22:55:24 +00:00
feat: tailscale add host and copy ip, fix outbound fetch hang and plugin ESM warning
This commit is contained in:
1 parent
c21bca8cf0
commit
fbe736bc20
70 files changed
+1117
-1139
No files matched your search
@@ -15,6 +15,16 @@ type QuickConnectInput = Pick<
|
||||
|
||||
const QUICK_CONNECT_ID_PREFIX = "quick-connect-";
|
||||
|
||||
// The auth types quickConnectHostToPayload carries over. A plugin auth type
|
||||
// keeps its fields elsewhere, so saving it here would lose them.
|
||||
const SAVABLE_AUTH_TYPES = new Set([
|
||||
"password",
|
||||
"key",
|
||||
"credential",
|
||||
"none",
|
||||
"agent",
|
||||
]);
|
||||
|
||||
export function isQuickConnectHost(host: Pick<Host, "id">): boolean {
|
||||
return host.id.startsWith(QUICK_CONNECT_ID_PREFIX);
|
||||
}
|
||||
@@ -33,6 +43,7 @@ export function createQuickConnectHost(input: QuickConnectInput): Host {
|
||||
...login,
|
||||
port: input.port,
|
||||
enableSsh: false,
|
||||
quickConnectSavable: false,
|
||||
domain: input.domain,
|
||||
pluginSettings: {
|
||||
[protocol.pluginId]: {
|
||||
@@ -62,6 +73,8 @@ export function createQuickConnectHost(input: QuickConnectInput): Host {
|
||||
quickActions: [],
|
||||
enableSsh: true,
|
||||
sshPort: input.port,
|
||||
quickConnectSavable:
|
||||
!input.authFields && SAVABLE_AUTH_TYPES.has(input.authType),
|
||||
...input.authFields,
|
||||
};
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user