diff --git a/docker/nginx-https.conf b/docker/nginx-https.conf index 56e01d9e5..07d714487 100644 --- a/docker/nginx-https.conf +++ b/docker/nginx-https.conf @@ -294,15 +294,6 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location ~ ^/c2s-tunnel-presets(/.*)?$ { - proxy_pass http://127.0.0.1:30001; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - } - location ~ ^/audit-logs(/.*)?$ { proxy_pass http://127.0.0.1:30001; proxy_http_version 1.1; @@ -564,30 +555,6 @@ http { proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; } - location /host/tunnel/ { - proxy_pass http://127.0.0.1:30003; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - } - - location /ssh/tunnel/ { - proxy_pass http://127.0.0.1:30003; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - proxy_read_timeout 86400s; - proxy_send_timeout 86400s; - proxy_buffering off; - proxy_cache off; - } - # File manager routes (recent/pinned/shortcuts, SFTP, transfers) moved # to the file-manager plugin, served under /plugin-api/file-manager/. diff --git a/docker/nginx.conf b/docker/nginx.conf index 9fa0157da..bbb45f9d7 100644 --- a/docker/nginx.conf +++ b/docker/nginx.conf @@ -274,15 +274,6 @@ http { proxy_set_header X-Forwarded-Proto $scheme; } - location ~ ^/c2s-tunnel-presets(/.*)?$ { - proxy_pass http://127.0.0.1:30001; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - } - location ~ ^/audit-logs(/.*)?$ { proxy_pass http://127.0.0.1:30001; proxy_http_version 1.1; @@ -542,30 +533,6 @@ http { proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; } - location /host/tunnel/ { - proxy_pass http://127.0.0.1:30003; - proxy_http_version 1.1; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - } - - location /ssh/tunnel/ { - proxy_pass http://127.0.0.1:30003; - proxy_http_version 1.1; - proxy_set_header Upgrade $http_upgrade; - proxy_set_header Connection "upgrade"; - proxy_set_header Host $http_host; - proxy_set_header X-Real-IP $remote_addr; - proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; - proxy_set_header X-Forwarded-Proto $proxy_x_forwarded_proto; - proxy_read_timeout 86400s; - proxy_send_timeout 86400s; - proxy_buffering off; - proxy_cache off; - } - # File manager routes (recent/pinned/shortcuts, SFTP, transfers) moved # to the file-manager plugin, served under /plugin-api/file-manager/. diff --git a/drizzle/mysql/0037_foamy_norman_osborn.sql b/drizzle/mysql/0037_foamy_norman_osborn.sql new file mode 100644 index 000000000..7ed6f9f96 --- /dev/null +++ b/drizzle/mysql/0037_foamy_norman_osborn.sql @@ -0,0 +1,5 @@ +-- c2s_tunnel_presets moved to the tunnels plugin, whose first migration renames +-- it to p_tunnels_presets. Dropping it here would lose every saved preset, so +-- this only stops drizzle tracking it. SELECT 1 because MySQL rejects an +-- empty query. +SELECT 1; diff --git a/drizzle/mysql/meta/0037_snapshot.json b/drizzle/mysql/meta/0037_snapshot.json new file mode 100644 index 000000000..da2c948a9 --- /dev/null +++ b/drizzle/mysql/meta/0037_snapshot.json @@ -0,0 +1,8602 @@ +{ + "version": "5", + "dialect": "mysql", + "id": "95cda11f-9a59-445a-bcd1-b106ce8adcec", + "prevId": "fac3c8a9-dffd-43df-ae9d-83424da7b030", + "tables": { + "ai_conversations": { + "name": "ai_conversations", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ai_conversations_user": { + "name": "idx_ai_conversations_user", + "columns": [ + "user_id", + "updated_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_conversations_user_id_users_id_fk": { + "name": "ai_conversations_user_id_users_id_fk", + "tableFrom": "ai_conversations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ai_conversations_id": { + "name": "ai_conversations_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ai_messages": { + "name": "ai_messages", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('')" + }, + "tool_calls": { + "name": "tool_calls", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ai_messages_conversation": { + "name": "idx_ai_messages_conversation", + "columns": [ + "conversation_id", + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_messages_conversation_id_ai_conversations_id_fk": { + "name": "ai_messages_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_messages", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ai_messages_id": { + "name": "ai_messages_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ai_proposals": { + "name": "ai_proposals", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "payload": { + "name": "payload", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('{}')" + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'pending'" + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ai_proposals_user": { + "name": "idx_ai_proposals_user", + "columns": [ + "user_id", + "status" + ], + "isUnique": false + }, + "idx_ai_proposals_conversation": { + "name": "idx_ai_proposals_conversation", + "columns": [ + "conversation_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_proposals_conversation_id_ai_conversations_id_fk": { + "name": "ai_proposals_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ai_proposals_user_id_users_id_fk": { + "name": "ai_proposals_user_id_users_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ai_proposals_id": { + "name": "ai_proposals_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ai_providers": { + "name": "ai_providers", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "provider_type": { + "name": "provider_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key": { + "name": "api_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key_prefix": { + "name": "api_key_prefix", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_model": { + "name": "default_model", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ai_providers_user_label": { + "name": "idx_ai_providers_user_label", + "columns": [ + "user_id", + "label" + ], + "isUnique": true + } + }, + "foreignKeys": { + "ai_providers_user_id_users_id_fk": { + "name": "ai_providers_user_id_users_id_fk", + "tableFrom": "ai_providers", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ai_providers_id": { + "name": "ai_providers_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "api_keys": { + "name": "api_keys", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "idx_api_keys_user_id": { + "name": "idx_api_keys_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "api_keys_user_id_users_id_fk": { + "name": "api_keys_user_id_users_id_fk", + "tableFrom": "api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "api_keys_id": { + "name": "api_keys_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "audit_logs": { + "name": "audit_logs", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "action": { + "name": "action", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "resource_type": { + "name": "resource_type", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "details": { + "name": "details", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "success": { + "name": "success", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_audit_logs_timestamp": { + "name": "idx_audit_logs_timestamp", + "columns": [ + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_user_ts": { + "name": "idx_audit_logs_user_ts", + "columns": [ + "user_id", + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_action_ts": { + "name": "idx_audit_logs_action_ts", + "columns": [ + "action", + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_resource_ts": { + "name": "idx_audit_logs_resource_ts", + "columns": [ + "resource_type", + "timestamp" + ], + "isUnique": false + } + }, + "foreignKeys": { + "audit_logs_user_id_users_id_fk": { + "name": "audit_logs_user_id_users_id_fk", + "tableFrom": "audit_logs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "audit_logs_id": { + "name": "audit_logs_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automation_channels": { + "name": "automation_channels", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "channel_id": { + "name": "channel_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_channels_pair": { + "name": "idx_automation_channels_pair", + "columns": [ + "automation_id", + "channel_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "automation_channels_automation_id_automations_id_fk": { + "name": "automation_channels_automation_id_automations_id_fk", + "tableFrom": "automation_channels", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_channels_channel_id_notification_channels_id_fk": { + "name": "automation_channels_channel_id_notification_channels_id_fk", + "tableFrom": "automation_channels", + "tableTo": "notification_channels", + "columnsFrom": [ + "channel_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automation_channels_id": { + "name": "automation_channels_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automation_run_steps": { + "name": "automation_run_steps", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "run_id": { + "name": "run_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_index": { + "name": "step_index", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_id": { + "name": "step_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_type": { + "name": "step_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "output": { + "name": "output", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "truncated": { + "name": "truncated", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": { + "idx_automation_run_steps_run": { + "name": "idx_automation_run_steps_run", + "columns": [ + "run_id", + "step_index" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_run_steps_run_id_automation_runs_id_fk": { + "name": "automation_run_steps_run_id_automation_runs_id_fk", + "tableFrom": "automation_run_steps", + "tableTo": "automation_runs", + "columnsFrom": [ + "run_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automation_run_steps_id": { + "name": "automation_run_steps_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automation_runs": { + "name": "automation_runs", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "trigger_context": { + "name": "trigger_context", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "dry_run": { + "name": "dry_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_runs_automation": { + "name": "idx_automation_runs_automation", + "columns": [ + "automation_id", + "started_at" + ], + "isUnique": false + }, + "idx_automation_runs_user": { + "name": "idx_automation_runs_user", + "columns": [ + "user_id", + "started_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_runs_automation_id_automations_id_fk": { + "name": "automation_runs_automation_id_automations_id_fk", + "tableFrom": "automation_runs", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_runs_user_id_users_id_fk": { + "name": "automation_runs_user_id_users_id_fk", + "tableFrom": "automation_runs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automation_runs_id": { + "name": "automation_runs_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automation_schedules": { + "name": "automation_schedules", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "cron": { + "name": "cron", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_tick_at": { + "name": "last_tick_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_schedules_automation": { + "name": "idx_automation_schedules_automation", + "columns": [ + "automation_id" + ], + "isUnique": true + }, + "idx_automation_schedules_due": { + "name": "idx_automation_schedules_due", + "columns": [ + "next_due_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_schedules_automation_id_automations_id_fk": { + "name": "automation_schedules_automation_id_automations_id_fk", + "tableFrom": "automation_schedules", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automation_schedules_id": { + "name": "automation_schedules_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automation_trigger_state": { + "name": "automation_trigger_state", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "state_key": { + "name": "state_key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "breach_started_at": { + "name": "breach_started_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_value": { + "name": "last_value", + "type": "double", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_observed_state": { + "name": "last_observed_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_automation_trigger_state_key": { + "name": "idx_automation_trigger_state_key", + "columns": [ + "automation_id", + "state_key" + ], + "isUnique": true + } + }, + "foreignKeys": { + "automation_trigger_state_automation_id_automations_id_fk": { + "name": "automation_trigger_state_automation_id_automations_id_fk", + "tableFrom": "automation_trigger_state", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automation_trigger_state_id": { + "name": "automation_trigger_state_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "automations": { + "name": "automations", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "definition": { + "name": "definition", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "definition_version": { + "name": "definition_version", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 1 + }, + "concurrency_policy": { + "name": "concurrency_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('skip')" + }, + "max_run_seconds": { + "name": "max_run_seconds", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 300 + }, + "dry_run": { + "name": "dry_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_run_status": { + "name": "last_run_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_automations_user": { + "name": "idx_automations_user", + "columns": [ + "user_id", + "enabled" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automations_user_id_users_id_fk": { + "name": "automations_user_id_users_id_fk", + "tableFrom": "automations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "automations_id": { + "name": "automations_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "collab_room_members": { + "name": "collab_room_members", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "room_id": { + "name": "room_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "room_role": { + "name": "room_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('member')" + }, + "added_by": { + "name": "added_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_collab_room_members_room_user": { + "name": "idx_collab_room_members_room_user", + "columns": [ + "room_id", + "user_id" + ], + "isUnique": true + }, + "idx_collab_room_members_user": { + "name": "idx_collab_room_members_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "collab_room_members_room_id_collab_rooms_id_fk": { + "name": "collab_room_members_room_id_collab_rooms_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "collab_rooms", + "columnsFrom": [ + "room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_user_id_users_id_fk": { + "name": "collab_room_members_user_id_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_added_by_users_id_fk": { + "name": "collab_room_members_added_by_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "added_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "collab_room_members_id": { + "name": "collab_room_members_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "collab_rooms": { + "name": "collab_rooms", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "persistent": { + "name": "persistent", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "presenter_user_id": { + "name": "presenter_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_protocol": { + "name": "stage_protocol", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_host_id": { + "name": "stage_host_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_share_id": { + "name": "stage_share_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "guest_link_token": { + "name": "guest_link_token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_collab_rooms_owner": { + "name": "idx_collab_rooms_owner", + "columns": [ + "owner_user_id" + ], + "isUnique": false + }, + "idx_collab_rooms_guest_token": { + "name": "idx_collab_rooms_guest_token", + "columns": [ + "guest_link_token" + ], + "isUnique": true + } + }, + "foreignKeys": { + "collab_rooms_owner_user_id_users_id_fk": { + "name": "collab_rooms_owner_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_rooms_presenter_user_id_users_id_fk": { + "name": "collab_rooms_presenter_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "presenter_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_host_id_ssh_data_id_fk": { + "name": "collab_rooms_stage_host_id_ssh_data_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "ssh_data", + "columnsFrom": [ + "stage_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_share_id_session_shares_id_fk": { + "name": "collab_rooms_stage_share_id_session_shares_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "session_shares", + "columnsFrom": [ + "stage_share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "collab_rooms_id": { + "name": "collab_rooms_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "command_history": { + "name": "command_history", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "command": { + "name": "command", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "executed_at": { + "name": "executed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_command_history_user_host": { + "name": "idx_command_history_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "command_history_user_id_users_id_fk": { + "name": "command_history_user_id_users_id_fk", + "tableFrom": "command_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "command_history_host_id_ssh_data_id_fk": { + "name": "command_history_host_id_ssh_data_id_fk", + "tableFrom": "command_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "command_history_id": { + "name": "command_history_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "credential_access": { + "name": "credential_access", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('use')" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_credential_access_user_id": { + "name": "idx_credential_access_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_credential_access_role_id": { + "name": "idx_credential_access_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + }, + "idx_credential_access_credential_id": { + "name": "idx_credential_access_credential_id", + "columns": [ + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "credential_access_credential_id_ssh_credentials_id_fk": { + "name": "credential_access_credential_id_ssh_credentials_id_fk", + "tableFrom": "credential_access", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_user_id_users_id_fk": { + "name": "credential_access_user_id_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_role_id_roles_id_fk": { + "name": "credential_access_role_id_roles_id_fk", + "tableFrom": "credential_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_granted_by_users_id_fk": { + "name": "credential_access_granted_by_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "credential_access_id": { + "name": "credential_access_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "credential_sidebar_preferences": { + "name": "credential_sidebar_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "credential_sidebar_preferences_user_id_users_id_fk": { + "name": "credential_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "credential_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "credential_sidebar_preferences_user_id": { + "name": "credential_sidebar_preferences_user_id", + "columns": [ + "user_id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "dashboard_service_links": { + "name": "dashboard_service_links", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "dashboard_service_links_user_id_users_id_fk": { + "name": "dashboard_service_links_user_id_users_id_fk", + "tableFrom": "dashboard_service_links", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "dashboard_service_links_id": { + "name": "dashboard_service_links_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "dashboard_service_links_sync_id_unique": { + "name": "dashboard_service_links_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "dismissed_alerts": { + "name": "dismissed_alerts", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "alert_id": { + "name": "alert_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "dismissed_at": { + "name": "dismissed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_dismissed_alerts_user_id": { + "name": "idx_dismissed_alerts_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "dismissed_alerts_user_id_users_id_fk": { + "name": "dismissed_alerts_user_id_users_id_fk", + "tableFrom": "dismissed_alerts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "dismissed_alerts_id": { + "name": "dismissed_alerts_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "folder_access": { + "name": "folder_access", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('connect')" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_folder_access_owner_folder": { + "name": "idx_folder_access_owner_folder", + "columns": [ + "owner_user_id", + "folder" + ], + "isUnique": false + } + }, + "foreignKeys": { + "folder_access_owner_user_id_users_id_fk": { + "name": "folder_access_owner_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_user_id_users_id_fk": { + "name": "folder_access_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_role_id_roles_id_fk": { + "name": "folder_access_role_id_roles_id_fk", + "tableFrom": "folder_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_granted_by_users_id_fk": { + "name": "folder_access_granted_by_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "folder_access_id": { + "name": "folder_access_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "homepage_items": { + "name": "homepage_items", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type_id": { + "name": "type_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('{}')" + }, + "folder_id": { + "name": "folder_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_homepage_items_user_id": { + "name": "idx_homepage_items_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "homepage_items_user_id_users_id_fk": { + "name": "homepage_items_user_id_users_id_fk", + "tableFrom": "homepage_items", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "homepage_items_id": { + "name": "homepage_items_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "homepage_items_sync_id_unique": { + "name": "homepage_items_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "homepage_layouts": { + "name": "homepage_layouts", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('{}')" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "homepage_layouts_user_id_users_id_fk": { + "name": "homepage_layouts_user_id_users_id_fk", + "tableFrom": "homepage_layouts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "homepage_layouts_id": { + "name": "homepage_layouts_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "homepage_layouts_user_id_unique": { + "name": "homepage_layouts_user_id_unique", + "columns": [ + "user_id" + ] + } + }, + "checkConstraint": {} + }, + "host_access": { + "name": "host_access", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('connect')" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "last_accessed_at": { + "name": "last_accessed_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "access_count": { + "name": "access_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + } + }, + "indexes": { + "idx_host_access_user_id": { + "name": "idx_host_access_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_host_access_role_id": { + "name": "idx_host_access_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + }, + "idx_host_access_host_id": { + "name": "idx_host_access_host_id", + "columns": [ + "host_id" + ], + "isUnique": false + }, + "idx_host_access_expires_at": { + "name": "idx_host_access_expires_at", + "columns": [ + "expires_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "host_access_host_id_ssh_data_id_fk": { + "name": "host_access_host_id_ssh_data_id_fk", + "tableFrom": "host_access", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_user_id_users_id_fk": { + "name": "host_access_user_id_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_role_id_roles_id_fk": { + "name": "host_access_role_id_roles_id_fk", + "tableFrom": "host_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_granted_by_users_id_fk": { + "name": "host_access_granted_by_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_access_id": { + "name": "host_access_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "host_health_checks": { + "name": "host_health_checks", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "checks": { + "name": "checks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 300 + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_host_health_checks_user_host": { + "name": "idx_host_health_checks_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "host_health_checks_user_id_users_id_fk": { + "name": "host_health_checks_user_id_users_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_checks_host_id_ssh_data_id_fk": { + "name": "host_health_checks_host_id_ssh_data_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_health_checks_id": { + "name": "host_health_checks_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "host_health_history": { + "name": "host_health_history", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "check_id": { + "name": "check_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "ok": { + "name": "ok", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_ms": { + "name": "latency_ms", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_health_history_user_id_users_id_fk": { + "name": "host_health_history_user_id_users_id_fk", + "tableFrom": "host_health_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_history_host_id_ssh_data_id_fk": { + "name": "host_health_history_host_id_ssh_data_id_fk", + "tableFrom": "host_health_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_health_history_id": { + "name": "host_health_history_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "host_metrics_history": { + "name": "host_metrics_history", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "cpu_percent": { + "name": "cpu_percent", + "type": "double", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mem_percent": { + "name": "mem_percent", + "type": "double", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "disk_percent": { + "name": "disk_percent", + "type": "double", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "net_rx_bytes": { + "name": "net_rx_bytes", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "net_tx_bytes": { + "name": "net_tx_bytes", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_metrics_history_host_id_ssh_data_id_fk": { + "name": "host_metrics_history_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_metrics_history_id": { + "name": "host_metrics_history_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "host_metrics_preferences": { + "name": "host_metrics_preferences", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_host_metrics_prefs_user_host": { + "name": "idx_host_metrics_prefs_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "host_metrics_preferences_user_id_users_id_fk": { + "name": "host_metrics_preferences_user_id_users_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_metrics_preferences_host_id_ssh_data_id_fk": { + "name": "host_metrics_preferences_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_metrics_preferences_id": { + "name": "host_metrics_preferences_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "host_sidebar_preferences": { + "name": "host_sidebar_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "host_sidebar_preferences_user_id_users_id_fk": { + "name": "host_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "host_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "host_sidebar_preferences_user_id": { + "name": "host_sidebar_preferences_user_id", + "columns": [ + "user_id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ssh_data": { + "name": "ssh_data", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "connection_type": { + "name": "connection_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('ssh')" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "port": { + "name": "port", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_host_id": { + "name": "parent_host_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin": { + "name": "pin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "use_warpgate": { + "name": "use_warpgate", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "share_ssh_auth": { + "name": "share_ssh_auth", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "force_keyboard_interactive": { + "name": "force_keyboard_interactive", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sudo_password": { + "name": "sudo_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_password": { + "name": "autostart_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_key": { + "name": "autostart_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_key_password": { + "name": "autostart_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "override_credential_username": { + "name": "override_credential_username", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vault_profile_id": { + "name": "vault_profile_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_terminal": { + "name": "enable_terminal", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_session_logging": { + "name": "enable_session_logging", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "allow_session_sharing": { + "name": "allow_session_sharing", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_command_history": { + "name": "enable_command_history", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_tunnel": { + "name": "enable_tunnel", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "tunnel_connections": { + "name": "tunnel_connections", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "jump_hosts": { + "name": "jump_hosts", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_file_manager": { + "name": "enable_file_manager", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "scp_legacy": { + "name": "scp_legacy", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_docker": { + "name": "enable_docker", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_web_ui": { + "name": "enable_web_ui", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_tmux_monitor": { + "name": "enable_tmux_monitor", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_terminal_toolbar": { + "name": "enable_terminal_toolbar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_ai_assistant": { + "name": "enable_ai_assistant", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_terminal_in_sidebar": { + "name": "show_terminal_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "show_file_manager_in_sidebar": { + "name": "show_file_manager_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_tunnel_in_sidebar": { + "name": "show_tunnel_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_docker_in_sidebar": { + "name": "show_docker_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_server_stats_in_sidebar": { + "name": "show_server_stats_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "default_path": { + "name": "default_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stats_config": { + "name": "stats_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "docker_config": { + "name": "docker_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "web_ui_config": { + "name": "web_ui_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_config": { + "name": "terminal_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "quick_actions": { + "name": "quick_actions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_ssh": { + "name": "enable_ssh", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_rdp": { + "name": "enable_rdp", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_vnc": { + "name": "enable_vnc", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_telnet": { + "name": "enable_telnet", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "ssh_port": { + "name": "ssh_port", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 22 + }, + "rdp_port": { + "name": "rdp_port", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 3389 + }, + "vnc_port": { + "name": "vnc_port", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 5900 + }, + "telnet_port": { + "name": "telnet_port", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 23 + }, + "rdp_credential_id": { + "name": "rdp_credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_user": { + "name": "rdp_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_password": { + "name": "rdp_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_domain": { + "name": "rdp_domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_security": { + "name": "rdp_security", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_ignore_cert": { + "name": "rdp_ignore_cert", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "vnc_credential_id": { + "name": "vnc_credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_password": { + "name": "vnc_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_user": { + "name": "vnc_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_user": { + "name": "telnet_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_password": { + "name": "telnet_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_credential_id": { + "name": "telnet_credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_auth_type": { + "name": "rdp_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_auth_type": { + "name": "vnc_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_auth_type": { + "name": "telnet_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "security": { + "name": "security", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ignore_cert": { + "name": "ignore_cert", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "guacamole_config": { + "name": "guacamole_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "use_socks5": { + "name": "use_socks5", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_host": { + "name": "socks5_host", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_port": { + "name": "socks5_port", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_username": { + "name": "socks5_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_password": { + "name": "socks5_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_proxy_chain": { + "name": "socks5_proxy_chain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "connection_origin": { + "name": "connection_origin", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mac_address": { + "name": "mac_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "wol_broadcast_address": { + "name": "wol_broadcast_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "port_knock_sequence": { + "name": "port_knock_sequence", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_fingerprint": { + "name": "host_key_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_type": { + "name": "host_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_algorithm": { + "name": "host_key_algorithm", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "('sha256')" + }, + "host_key_first_seen": { + "name": "host_key_first_seen", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_last_verified": { + "name": "host_key_last_verified", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_changed_count": { + "name": "host_key_changed_count", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ssh_data_user_id": { + "name": "idx_ssh_data_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_ssh_data_parent_host": { + "name": "idx_ssh_data_parent_host", + "columns": [ + "parent_host_id" + ], + "isUnique": false + }, + "idx_ssh_data_credential": { + "name": "idx_ssh_data_credential", + "columns": [ + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_data_user_id_users_id_fk": { + "name": "ssh_data_user_id_users_id_fk", + "tableFrom": "ssh_data", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_data_parent_host_id_ssh_data_id_fk": { + "name": "ssh_data_parent_host_id_ssh_data_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_data", + "columnsFrom": [ + "parent_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vault_profile_id_vault_profiles_id_fk": { + "name": "ssh_data_vault_profile_id_vault_profiles_id_fk", + "tableFrom": "ssh_data", + "tableTo": "vault_profiles", + "columnsFrom": [ + "vault_profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_rdp_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "rdp_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vnc_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "vnc_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_telnet_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "telnet_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ssh_data_id": { + "name": "ssh_data_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "ssh_data_sync_id_unique": { + "name": "ssh_data_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "notification_channels": { + "name": "notification_channels", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "notification_channels_user_id_users_id_fk": { + "name": "notification_channels_user_id_users_id_fk", + "tableFrom": "notification_channels", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "notification_channels_id": { + "name": "notification_channels_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "opkssh_tokens": { + "name": "opkssh_tokens", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sub": { + "name": "sub", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "audience": { + "name": "audience", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_opkssh_tokens_user_host": { + "name": "idx_opkssh_tokens_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "opkssh_tokens_user_id_users_id_fk": { + "name": "opkssh_tokens_user_id_users_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "opkssh_tokens_host_id_ssh_data_id_fk": { + "name": "opkssh_tokens_host_id_ssh_data_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "opkssh_tokens_id": { + "name": "opkssh_tokens_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_install_counts": { + "name": "plugin_install_counts", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "registry_id": { + "name": "registry_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "count": { + "name": "count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('aggregate-telemetry')" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_plugin_install_counts_plugin_registry": { + "name": "idx_plugin_install_counts_plugin_registry", + "columns": [ + "plugin_id", + "registry_id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "plugin_install_counts_id": { + "name": "plugin_install_counts_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_migrations": { + "name": "plugin_migrations", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "migration_id": { + "name": "migration_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "checksum": { + "name": "checksum", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_plugin_migrations_plugin_migration": { + "name": "idx_plugin_migrations_plugin_migration", + "columns": [ + "plugin_id", + "migration_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_migrations_plugin_id_plugins_id_fk": { + "name": "plugin_migrations_plugin_id_plugins_id_fk", + "tableFrom": "plugin_migrations", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "plugin_migrations_id": { + "name": "plugin_migrations_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_permission_grants": { + "name": "plugin_permission_grants", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "capability": { + "name": "capability", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('admin')" + } + }, + "indexes": { + "idx_plugin_permission_grants_plugin_capability": { + "name": "idx_plugin_permission_grants_plugin_capability", + "columns": [ + "plugin_id", + "capability" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_permission_grants_plugin_id_plugins_id_fk": { + "name": "plugin_permission_grants_plugin_id_plugins_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "plugin_permission_grants_granted_by_users_id_fk": { + "name": "plugin_permission_grants_granted_by_users_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "plugin_permission_grants_id": { + "name": "plugin_permission_grants_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_registries": { + "name": "plugin_registries", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('community')" + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "signing_key": { + "name": "signing_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_checked_at": { + "name": "last_checked_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_index_hash": { + "name": "last_index_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "plugin_registries_id": { + "name": "plugin_registries_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_settings": { + "name": "plugin_settings", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "scope": { + "name": "scope", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "scope_id": { + "name": "scope_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted": { + "name": "encrypted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_plugin_settings_scope_key": { + "name": "idx_plugin_settings_scope_key", + "columns": [ + "plugin_id", + "scope", + "scope_id", + "key" + ], + "isUnique": true + }, + "idx_plugin_settings_plugin_scope": { + "name": "idx_plugin_settings_plugin_scope", + "columns": [ + "plugin_id", + "scope" + ], + "isUnique": false + } + }, + "foreignKeys": { + "plugin_settings_plugin_id_plugins_id_fk": { + "name": "plugin_settings_plugin_id_plugins_id_fk", + "tableFrom": "plugin_settings", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "plugin_settings_id": { + "name": "plugin_settings_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugin_storage": { + "name": "plugin_storage", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_plugin_storage_plugin_key": { + "name": "idx_plugin_storage_plugin_key", + "columns": [ + "plugin_id", + "key" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_storage_plugin_id_plugins_id_fk": { + "name": "plugin_storage_plugin_id_plugins_id_fk", + "tableFrom": "plugin_storage", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "plugin_storage_id": { + "name": "plugin_storage_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "plugins": { + "name": "plugins", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tier": { + "name": "tier", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('available')" + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('community')" + }, + "registry_id": { + "name": "registry_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('disabled')" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "installed_at": { + "name": "installed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "auto_update": { + "name": "auto_update", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "manifest_json": { + "name": "manifest_json", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_plugins_registry_id": { + "name": "idx_plugins_registry_id", + "columns": [ + "registry_id" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "plugins_id": { + "name": "plugins_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "rbac_applied_defaults": { + "name": "rbac_applied_defaults", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "role_name": { + "name": "role_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission": { + "name": "permission", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_rbac_applied_defaults_role_permission": { + "name": "idx_rbac_applied_defaults_role_permission", + "columns": [ + "role_name", + "permission" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "rbac_applied_defaults_id": { + "name": "rbac_applied_defaults_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "rbac_known_permissions": { + "name": "rbac_known_permissions", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "permission": { + "name": "permission", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "first_seen_at": { + "name": "first_seen_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_rbac_known_permissions_permission": { + "name": "idx_rbac_known_permissions_permission", + "columns": [ + "permission" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "rbac_known_permissions_id": { + "name": "rbac_known_permissions_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "recent_activity": { + "name": "recent_activity", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_name": { + "name": "host_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_recent_activity_user_ts": { + "name": "idx_recent_activity_user_ts", + "columns": [ + "user_id", + "timestamp" + ], + "isUnique": false + } + }, + "foreignKeys": { + "recent_activity_user_id_users_id_fk": { + "name": "recent_activity_user_id_users_id_fk", + "tableFrom": "recent_activity", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "recent_activity_host_id_ssh_data_id_fk": { + "name": "recent_activity_host_id_ssh_data_id_fk", + "tableFrom": "recent_activity", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "recent_activity_id": { + "name": "recent_activity_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "roles": { + "name": "roles", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "roles_id": { + "name": "roles_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "roles_name_unique": { + "name": "roles_name_unique", + "columns": [ + "name" + ] + } + }, + "checkConstraint": {} + }, + "secret_sources": { + "name": "secret_sources", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('onepassword-connect')" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "shared": { + "name": "shared", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_secret_sources_user": { + "name": "idx_secret_sources_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "secret_sources_user_id_users_id_fk": { + "name": "secret_sources_user_id_users_id_fk", + "tableFrom": "secret_sources", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "secret_sources_id": { + "name": "secret_sources_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "session_recordings": { + "name": "session_recordings", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "access_id": { + "name": "access_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration": { + "name": "duration", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "commands": { + "name": "commands", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "dangerous_actions": { + "name": "dangerous_actions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "recording_path": { + "name": "recording_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "format": { + "name": "format", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('text')" + }, + "terminated_by_owner": { + "name": "terminated_by_owner", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "termination_reason": { + "name": "termination_reason", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_session_recordings_user_started": { + "name": "idx_session_recordings_user_started", + "columns": [ + "user_id", + "started_at" + ], + "isUnique": false + }, + "idx_session_recordings_host": { + "name": "idx_session_recordings_host", + "columns": [ + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "session_recordings_host_id_ssh_data_id_fk": { + "name": "session_recordings_host_id_ssh_data_id_fk", + "tableFrom": "session_recordings", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_recordings_user_id_users_id_fk": { + "name": "session_recordings_user_id_users_id_fk", + "tableFrom": "session_recordings", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "session_recordings_access_id_host_access_id_fk": { + "name": "session_recordings_access_id_host_access_id_fk", + "tableFrom": "session_recordings", + "tableTo": "host_access", + "columnsFrom": [ + "access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "session_recordings_id": { + "name": "session_recordings_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "session_share_participants": { + "name": "session_share_participants", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "share_id": { + "name": "share_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "guest_label": { + "name": "guest_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "joined_at": { + "name": "joined_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "left_at": { + "name": "left_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "session_share_participants_share_id_session_shares_id_fk": { + "name": "session_share_participants_share_id_session_shares_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "session_shares", + "columnsFrom": [ + "share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_share_participants_user_id_users_id_fk": { + "name": "session_share_participants_user_id_users_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "session_share_participants_id": { + "name": "session_share_participants_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "session_shares": { + "name": "session_shares", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "session_id": { + "name": "session_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_instance_id": { + "name": "tab_instance_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "share_type": { + "name": "share_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_token": { + "name": "link_token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('read-only')" + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_joined_at": { + "name": "last_joined_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "join_count": { + "name": "join_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + } + }, + "indexes": { + "idx_session_shares_session_id": { + "name": "idx_session_shares_session_id", + "columns": [ + "session_id" + ], + "isUnique": false + }, + "idx_session_shares_host_id": { + "name": "idx_session_shares_host_id", + "columns": [ + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "session_shares_host_id_ssh_data_id_fk": { + "name": "session_shares_host_id_ssh_data_id_fk", + "tableFrom": "session_shares", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_owner_user_id_users_id_fk": { + "name": "session_shares_owner_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_target_user_id_users_id_fk": { + "name": "session_shares_target_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "session_shares_id": { + "name": "session_shares_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "session_shares_link_token_unique": { + "name": "session_shares_link_token_unique", + "columns": [ + "link_token" + ] + } + }, + "checkConstraint": {} + }, + "sessions": { + "name": "sessions", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "jwt_token": { + "name": "jwt_token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "oidc_sub": { + "name": "oidc_sub", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_sid": { + "name": "oidc_sid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_active_at": { + "name": "last_active_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_sessions_user_id": { + "name": "idx_sessions_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_sessions_expires_at": { + "name": "idx_sessions_expires_at", + "columns": [ + "expires_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sessions_id": { + "name": "sessions_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "settings": { + "name": "settings", + "columns": { + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "settings_key": { + "name": "settings_key", + "columns": [ + "key" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "shared_credential_secrets": { + "name": "shared_credential_secrets", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "credential_access_id": { + "name": "credential_access_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('password')" + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_shared_credential_secrets_scope": { + "name": "idx_shared_credential_secrets_scope", + "columns": [ + "credential_access_id", + "target_user_id" + ], + "isUnique": true + }, + "idx_shared_credential_secrets_target": { + "name": "idx_shared_credential_secrets_target", + "columns": [ + "target_user_id", + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "shared_credential_secrets_target_user_id_users_id_fk": { + "name": "shared_credential_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_credential_secrets_credential_id_ssh_credentials_id_fk": { + "name": "shared_credential_secrets_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_cred_secrets_access_id_fk": { + "name": "shared_cred_secrets_access_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "credential_access", + "columnsFrom": [ + "credential_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "shared_credential_secrets_id": { + "name": "shared_credential_secrets_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "shared_host_auth_overrides": { + "name": "shared_host_auth_overrides", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "shared_host_auth_overrides_host_user_protocol_unique": { + "name": "shared_host_auth_overrides_host_user_protocol_unique", + "columns": [ + "host_id", + "user_id", + "protocol" + ], + "isUnique": true + } + }, + "foreignKeys": { + "shared_host_auth_overrides_host_id_ssh_data_id_fk": { + "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_user_id_users_id_fk": { + "name": "shared_host_auth_overrides_user_id_users_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "shared_host_auth_overrides_id": { + "name": "shared_host_auth_overrides_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "shared_host_secrets": { + "name": "shared_host_secrets", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "host_access_id": { + "name": "host_access_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('credential')" + }, + "original_credential_id": { + "name": "original_credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_auth_type": { + "name": "encrypted_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_type": { + "name": "encrypted_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_domain": { + "name": "encrypted_domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_shared_host_secrets_scope": { + "name": "idx_shared_host_secrets_scope", + "columns": [ + "host_access_id", + "target_user_id", + "protocol" + ], + "isUnique": true + } + }, + "foreignKeys": { + "shared_host_secrets_host_access_id_host_access_id_fk": { + "name": "shared_host_secrets_host_access_id_host_access_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "host_access", + "columnsFrom": [ + "host_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_target_user_id_users_id_fk": { + "name": "shared_host_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "original_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "shared_host_secrets_id": { + "name": "shared_host_secrets_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ssh_credential_usage": { + "name": "ssh_credential_usage", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "used_at": { + "name": "used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ssh_credential_usage_credential": { + "name": "idx_ssh_credential_usage_credential", + "columns": [ + "credential_id" + ], + "isUnique": false + }, + "idx_ssh_credential_usage_user": { + "name": "idx_ssh_credential_usage_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_credential_usage_credential_id_ssh_credentials_id_fk": { + "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_host_id_ssh_data_id_fk": { + "name": "ssh_credential_usage_host_id_ssh_data_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_user_id_users_id_fk": { + "name": "ssh_credential_usage_user_id_users_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ssh_credential_usage_id": { + "name": "ssh_credential_usage_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ssh_credentials": { + "name": "ssh_credentials", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin": { + "name": "pin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "detected_key_type": { + "name": "detected_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "usage_count": { + "name": "usage_count", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ssh_credentials_user_id": { + "name": "idx_ssh_credentials_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_credentials_user_id_users_id_fk": { + "name": "ssh_credentials_user_id_users_id_fk", + "tableFrom": "ssh_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ssh_credentials_id": { + "name": "ssh_credentials_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "ssh_credentials_sync_id_unique": { + "name": "ssh_credentials_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "ssh_folders": { + "name": "ssh_folders", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sort_order": { + "name": "sort_order", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_ssh_folders_user_id": { + "name": "idx_ssh_folders_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_folders_user_id_users_id_fk": { + "name": "ssh_folders_user_id_users_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_folders_credential_id_ssh_credentials_id_fk": { + "name": "ssh_folders_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ssh_folders_id": { + "name": "ssh_folders_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "ssh_folders_sync_id_unique": { + "name": "ssh_folders_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "sso_providers": { + "name": "sso_providers", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "display_order": { + "name": "display_order", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "sso_providers_id": { + "name": "sso_providers_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "sync_tombstones": { + "name": "sync_tombstones", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "sync_tombstones_user_id_users_id_fk": { + "name": "sync_tombstones_user_id_users_id_fk", + "tableFrom": "sync_tombstones", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sync_tombstones_id": { + "name": "sync_tombstones_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "termix_identities": { + "name": "termix_identities", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "handle": { + "name": "handle", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identities_user_id_users_id_fk": { + "name": "termix_identities_user_id_users_id_fk", + "tableFrom": "termix_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "termix_identities_id": { + "name": "termix_identities_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "termix_identities_user_id_unique": { + "name": "termix_identities_user_id_unique", + "columns": [ + "user_id" + ] + }, + "termix_identities_handle_unique": { + "name": "termix_identities_handle_unique", + "columns": [ + "handle" + ] + } + }, + "checkConstraint": {} + }, + "termix_identity_ca": { + "name": "termix_identity_ca", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "identity_id": { + "name": "identity_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "validity_days": { + "name": "validity_days", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 90 + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identity_ca_identity_id_termix_identities_id_fk": { + "name": "termix_identity_ca_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_ca_user_id_users_id_fk": { + "name": "termix_identity_ca_user_id_users_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "termix_identity_ca_id": { + "name": "termix_identity_ca_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "termix_identity_ca_identity_id_unique": { + "name": "termix_identity_ca_identity_id_unique", + "columns": [ + "identity_id" + ] + } + }, + "checkConstraint": {} + }, + "termix_identity_keys": { + "name": "termix_identity_keys", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "identity_id": { + "name": "identity_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "algorithm": { + "name": "algorithm", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('manual')" + }, + "credential_id": { + "name": "credential_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identity_keys_identity_id_termix_identities_id_fk": { + "name": "termix_identity_keys_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_user_id_users_id_fk": { + "name": "termix_identity_keys_user_id_users_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_credential_id_ssh_credentials_id_fk": { + "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "termix_identity_keys_id": { + "name": "termix_identity_keys_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "tmux_session_tags": { + "name": "tmux_session_tags", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "session_name": { + "name": "session_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "tmux_session_tags_user_id_users_id_fk": { + "name": "tmux_session_tags_user_id_users_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tmux_session_tags_host_id_ssh_data_id_fk": { + "name": "tmux_session_tags_host_id_ssh_data_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "tmux_session_tags_id": { + "name": "tmux_session_tags_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "trusted_devices": { + "name": "trusted_devices", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_fingerprint": { + "name": "device_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_trusted_devices_user_id": { + "name": "idx_trusted_devices_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "trusted_devices_user_id_users_id_fk": { + "name": "trusted_devices_user_id_users_id_fk", + "tableFrom": "trusted_devices", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "trusted_devices_id": { + "name": "trusted_devices_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "ui_preferences": { + "name": "ui_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "ui_preferences_user_id_users_id_fk": { + "name": "ui_preferences_user_id_users_id_fk", + "tableFrom": "ui_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "ui_preferences_user_id": { + "name": "ui_preferences_user_id", + "columns": [ + "user_id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "user_external_identities": { + "name": "user_external_identities", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subject": { + "name": "subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_user_external_identities_provider_subject": { + "name": "idx_user_external_identities_provider_subject", + "columns": [ + "provider_id", + "subject" + ], + "isUnique": true + }, + "idx_user_external_identities_user": { + "name": "idx_user_external_identities_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_external_identities_user_id_users_id_fk": { + "name": "user_external_identities_user_id_users_id_fk", + "tableFrom": "user_external_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "user_external_identities_id": { + "name": "user_external_identities_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "user_open_tabs": { + "name": "user_open_tabs", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_type": { + "name": "tab_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_order": { + "name": "tab_order", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "backend_session_id": { + "name": "backend_session_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_user_open_tabs_user_id": { + "name": "idx_user_open_tabs_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_open_tabs_user_id_users_id_fk": { + "name": "user_open_tabs_user_id_users_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_open_tabs_host_id_ssh_data_id_fk": { + "name": "user_open_tabs_host_id_ssh_data_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "user_open_tabs_id": { + "name": "user_open_tabs_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "user_preferences": { + "name": "user_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "reopen_tabs_on_login": { + "name": "reopen_tabs_on_login", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "font_size": { + "name": "font_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "accent_color": { + "name": "accent_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "language": { + "name": "language", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "storage_mode": { + "name": "storage_mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "command_autocomplete": { + "name": "command_autocomplete", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "command_palette_enabled": { + "name": "command_palette_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_host_tags": { + "name": "show_host_tags", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_tray_on_click": { + "name": "host_tray_on_click", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin_app_rail": { + "name": "pin_app_rail", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expand_app_rail_on_hover": { + "name": "expand_app_rail_on_hover", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_pin_app_rail_button": { + "name": "show_pin_app_rail_button", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folders_collapsed": { + "name": "folders_collapsed", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirm_snippet_execution": { + "name": "confirm_snippet_execution", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "disable_update_check": { + "name": "disable_update_check", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirm_tab_close": { + "name": "confirm_tab_close", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hidden_rail_tabs": { + "name": "hidden_rail_tabs", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ai_assistant_enabled": { + "name": "ai_assistant_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ai_read_only_commands": { + "name": "ai_read_only_commands", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "compact_host_view": { + "name": "compact_host_view", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status_color_scheme": { + "name": "status_color_scheme", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "custom_themes": { + "name": "custom_themes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "custom_keybindings": { + "name": "custom_keybindings", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_defaults": { + "name": "terminal_defaults", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_defaults": { + "name": "rdp_defaults", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_macros": { + "name": "terminal_macros", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "user_preferences_user_id_users_id_fk": { + "name": "user_preferences_user_id_users_id_fk", + "tableFrom": "user_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "user_preferences_user_id": { + "name": "user_preferences_user_id", + "columns": [ + "user_id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "user_roles": { + "name": "user_roles", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_user_roles_user_role": { + "name": "idx_user_roles_user_role", + "columns": [ + "user_id", + "role_id" + ], + "isUnique": true + }, + "idx_user_roles_role_id": { + "name": "idx_user_roles_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_roles_user_id_users_id_fk": { + "name": "user_roles_user_id_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_role_id_roles_id_fk": { + "name": "user_roles_role_id_roles_id_fk", + "tableFrom": "user_roles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_granted_by_users_id_fk": { + "name": "user_roles_granted_by_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "user_roles_id": { + "name": "user_roles_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "user_second_factors": { + "name": "user_second_factors", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "factor_id": { + "name": "factor_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enrolled_at": { + "name": "enrolled_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": { + "idx_user_second_factors_user_factor": { + "name": "idx_user_second_factors_user_factor", + "columns": [ + "user_id", + "plugin_id", + "factor_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "user_second_factors_user_id_users_id_fk": { + "name": "user_second_factors_user_id_users_id_fk", + "tableFrom": "user_second_factors", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "user_second_factors_id": { + "name": "user_second_factors_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_oidc": { + "name": "is_oidc", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "oidc_identifier": { + "name": "oidc_identifier", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "int", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "issuer_url": { + "name": "issuer_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "authorization_url": { + "name": "authorization_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "token_url": { + "name": "token_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "identifier_path": { + "name": "identifier_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name_path": { + "name": "name_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "('openid email profile')" + }, + "totp_secret": { + "name": "totp_secret", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "totp_enabled": { + "name": "totp_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "totp_backup_codes": { + "name": "totp_backup_codes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registered_at": { + "name": "registered_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "donation_modal_dismissed": { + "name": "donation_modal_dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": { + "users_id": { + "name": "users_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "vault_profiles": { + "name": "vault_profiles", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vault_addr": { + "name": "vault_addr", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "vault_namespace": { + "name": "vault_namespace", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_mount": { + "name": "oidc_mount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_role": { + "name": "oidc_role", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ssh_mount": { + "name": "ssh_mount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ssh_role": { + "name": "ssh_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "valid_principals": { + "name": "valid_principals", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "shared": { + "name": "shared", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + } + }, + "indexes": {}, + "foreignKeys": { + "vault_profiles_user_id_users_id_fk": { + "name": "vault_profiles_user_id_users_id_fk", + "tableFrom": "vault_profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "vault_profiles_id": { + "name": "vault_profiles_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": { + "vault_profiles_sync_id_unique": { + "name": "vault_profiles_sync_id_unique", + "columns": [ + "sync_id" + ] + } + }, + "checkConstraint": {} + }, + "vault_tokens": { + "name": "vault_tokens", + "columns": { + "id": { + "name": "id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "profile_id": { + "name": "profile_id", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_vault_tokens_user_profile": { + "name": "idx_vault_tokens_user_profile", + "columns": [ + "user_id", + "profile_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "vault_tokens_user_id_users_id_fk": { + "name": "vault_tokens_user_id_users_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vault_tokens_profile_id_vault_profiles_id_fk": { + "name": "vault_tokens_profile_id_vault_profiles_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "vault_profiles", + "columnsFrom": [ + "profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "vault_tokens_id": { + "name": "vault_tokens_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + }, + "webauthn_credentials": { + "name": "webauthn_credentials", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "counter": { + "name": "counter", + "type": "int", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "backed_up": { + "name": "backed_up", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "transports": { + "name": "transports", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_verification": { + "name": "user_verification", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "('preferred')" + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "(CURRENT_TIMESTAMP)" + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "webauthn_credentials_user_id_users_id_fk": { + "name": "webauthn_credentials_user_id_users_id_fk", + "tableFrom": "webauthn_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "webauthn_credentials_id": { + "name": "webauthn_credentials_id", + "columns": [ + "id" + ] + } + }, + "uniqueConstraints": {}, + "checkConstraint": {} + } + }, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "tables": {}, + "indexes": {} + } +} \ No newline at end of file diff --git a/drizzle/mysql/meta/_journal.json b/drizzle/mysql/meta/_journal.json index ed2f4bf21..0b2919ff8 100644 --- a/drizzle/mysql/meta/_journal.json +++ b/drizzle/mysql/meta/_journal.json @@ -260,6 +260,13 @@ "when": 1790189637531, "tag": "0036_dear_vapor", "breakpoints": true + }, + { + "idx": 37, + "version": "5", + "when": 1790201005569, + "tag": "0037_foamy_norman_osborn", + "breakpoints": true } ] } \ No newline at end of file diff --git a/drizzle/postgres/0038_cute_vermin.sql b/drizzle/postgres/0038_cute_vermin.sql new file mode 100644 index 000000000..7ed6f9f96 --- /dev/null +++ b/drizzle/postgres/0038_cute_vermin.sql @@ -0,0 +1,5 @@ +-- c2s_tunnel_presets moved to the tunnels plugin, whose first migration renames +-- it to p_tunnels_presets. Dropping it here would lose every saved preset, so +-- this only stops drizzle tracking it. SELECT 1 because MySQL rejects an +-- empty query. +SELECT 1; diff --git a/drizzle/postgres/meta/0038_snapshot.json b/drizzle/postgres/meta/0038_snapshot.json new file mode 100644 index 000000000..8a54325f9 --- /dev/null +++ b/drizzle/postgres/meta/0038_snapshot.json @@ -0,0 +1,8402 @@ +{ + "id": "062b236b-4538-4009-b895-01f157c52828", + "prevId": "59f4eaac-ecc6-4b3a-a985-f51a3540fb4a", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.ai_conversations": { + "name": "ai_conversations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_conversations_user": { + "name": "idx_ai_conversations_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ai_conversations_user_id_users_id_fk": { + "name": "ai_conversations_user_id_users_id_fk", + "tableFrom": "ai_conversations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ai_messages": { + "name": "ai_messages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "tool_calls": { + "name": "tool_calls", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_messages_conversation": { + "name": "idx_ai_messages_conversation", + "columns": [ + { + "expression": "conversation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ai_messages_conversation_id_ai_conversations_id_fk": { + "name": "ai_messages_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_messages", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ai_proposals": { + "name": "ai_proposals", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "payload": { + "name": "payload", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_proposals_user": { + "name": "idx_ai_proposals_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_ai_proposals_conversation": { + "name": "idx_ai_proposals_conversation", + "columns": [ + { + "expression": "conversation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ai_proposals_conversation_id_ai_conversations_id_fk": { + "name": "ai_proposals_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ai_proposals_user_id_users_id_fk": { + "name": "ai_proposals_user_id_users_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ai_providers": { + "name": "ai_providers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "provider_type": { + "name": "provider_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "api_key": { + "name": "api_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "api_key_prefix": { + "name": "api_key_prefix", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "default_model": { + "name": "default_model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_providers_user_label": { + "name": "idx_ai_providers_user_label", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "label", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ai_providers_user_id_users_id_fk": { + "name": "ai_providers_user_id_users_id_fk", + "tableFrom": "ai_providers", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.api_keys": { + "name": "api_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + } + }, + "indexes": { + "idx_api_keys_user_id": { + "name": "idx_api_keys_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "api_keys_user_id_users_id_fk": { + "name": "api_keys_user_id_users_id_fk", + "tableFrom": "api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.audit_logs": { + "name": "audit_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "action": { + "name": "action", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "details": { + "name": "details", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "success": { + "name": "success", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_audit_logs_timestamp": { + "name": "idx_audit_logs_timestamp", + "columns": [ + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_audit_logs_user_ts": { + "name": "idx_audit_logs_user_ts", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_audit_logs_action_ts": { + "name": "idx_audit_logs_action_ts", + "columns": [ + { + "expression": "action", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_audit_logs_resource_ts": { + "name": "idx_audit_logs_resource_ts", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "audit_logs_user_id_users_id_fk": { + "name": "audit_logs_user_id_users_id_fk", + "tableFrom": "audit_logs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automation_channels": { + "name": "automation_channels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "channel_id": { + "name": "channel_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_automation_channels_pair": { + "name": "idx_automation_channels_pair", + "columns": [ + { + "expression": "automation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "channel_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automation_channels_automation_id_automations_id_fk": { + "name": "automation_channels_automation_id_automations_id_fk", + "tableFrom": "automation_channels", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_channels_channel_id_notification_channels_id_fk": { + "name": "automation_channels_channel_id_notification_channels_id_fk", + "tableFrom": "automation_channels", + "tableTo": "notification_channels", + "columnsFrom": [ + "channel_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automation_run_steps": { + "name": "automation_run_steps", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "step_index": { + "name": "step_index", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "step_id": { + "name": "step_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "step_type": { + "name": "step_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "output": { + "name": "output", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "truncated": { + "name": "truncated", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "idx_automation_run_steps_run": { + "name": "idx_automation_run_steps_run", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "step_index", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automation_run_steps_run_id_automation_runs_id_fk": { + "name": "automation_run_steps_run_id_automation_runs_id_fk", + "tableFrom": "automation_run_steps", + "tableTo": "automation_runs", + "columnsFrom": [ + "run_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automation_runs": { + "name": "automation_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "trigger_context": { + "name": "trigger_context", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "dry_run": { + "name": "dry_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_automation_runs_automation": { + "name": "idx_automation_runs_automation", + "columns": [ + { + "expression": "automation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_automation_runs_user": { + "name": "idx_automation_runs_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automation_runs_automation_id_automations_id_fk": { + "name": "automation_runs_automation_id_automations_id_fk", + "tableFrom": "automation_runs", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_runs_user_id_users_id_fk": { + "name": "automation_runs_user_id_users_id_fk", + "tableFrom": "automation_runs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automation_schedules": { + "name": "automation_schedules", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "cron": { + "name": "cron", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "last_tick_at": { + "name": "last_tick_at", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_automation_schedules_automation": { + "name": "idx_automation_schedules_automation", + "columns": [ + { + "expression": "automation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_automation_schedules_due": { + "name": "idx_automation_schedules_due", + "columns": [ + { + "expression": "next_due_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automation_schedules_automation_id_automations_id_fk": { + "name": "automation_schedules_automation_id_automations_id_fk", + "tableFrom": "automation_schedules", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automation_trigger_state": { + "name": "automation_trigger_state", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "state_key": { + "name": "state_key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "breach_started_at": { + "name": "breach_started_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_value": { + "name": "last_value", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "last_observed_state": { + "name": "last_observed_state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_automation_trigger_state_key": { + "name": "idx_automation_trigger_state_key", + "columns": [ + { + "expression": "automation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "state_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automation_trigger_state_automation_id_automations_id_fk": { + "name": "automation_trigger_state_automation_id_automations_id_fk", + "tableFrom": "automation_trigger_state", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.automations": { + "name": "automations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "definition": { + "name": "definition", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "definition_version": { + "name": "definition_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "concurrency_policy": { + "name": "concurrency_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'skip'" + }, + "max_run_seconds": { + "name": "max_run_seconds", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 300 + }, + "dry_run": { + "name": "dry_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_run_status": { + "name": "last_run_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_automations_user": { + "name": "idx_automations_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "automations_user_id_users_id_fk": { + "name": "automations_user_id_users_id_fk", + "tableFrom": "automations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.collab_room_members": { + "name": "collab_room_members", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "room_id": { + "name": "room_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "room_role": { + "name": "room_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'member'" + }, + "added_by": { + "name": "added_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_collab_room_members_room_user": { + "name": "idx_collab_room_members_room_user", + "columns": [ + { + "expression": "room_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_collab_room_members_user": { + "name": "idx_collab_room_members_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "collab_room_members_room_id_collab_rooms_id_fk": { + "name": "collab_room_members_room_id_collab_rooms_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "collab_rooms", + "columnsFrom": [ + "room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_user_id_users_id_fk": { + "name": "collab_room_members_user_id_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_added_by_users_id_fk": { + "name": "collab_room_members_added_by_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "added_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.collab_rooms": { + "name": "collab_rooms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "persistent": { + "name": "persistent", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "presenter_user_id": { + "name": "presenter_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "stage_protocol": { + "name": "stage_protocol", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stage_host_id": { + "name": "stage_host_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "stage_share_id": { + "name": "stage_share_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "guest_link_token": { + "name": "guest_link_token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_collab_rooms_owner": { + "name": "idx_collab_rooms_owner", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_collab_rooms_guest_token": { + "name": "idx_collab_rooms_guest_token", + "columns": [ + { + "expression": "guest_link_token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "collab_rooms_owner_user_id_users_id_fk": { + "name": "collab_rooms_owner_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_rooms_presenter_user_id_users_id_fk": { + "name": "collab_rooms_presenter_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "presenter_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_host_id_ssh_data_id_fk": { + "name": "collab_rooms_stage_host_id_ssh_data_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "ssh_data", + "columnsFrom": [ + "stage_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_share_id_session_shares_id_fk": { + "name": "collab_rooms_stage_share_id_session_shares_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "session_shares", + "columnsFrom": [ + "stage_share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.command_history": { + "name": "command_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "command": { + "name": "command", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "executed_at": { + "name": "executed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_command_history_user_host": { + "name": "idx_command_history_user_host", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "command_history_user_id_users_id_fk": { + "name": "command_history_user_id_users_id_fk", + "tableFrom": "command_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "command_history_host_id_ssh_data_id_fk": { + "name": "command_history_host_id_ssh_data_id_fk", + "tableFrom": "command_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.credential_access": { + "name": "credential_access", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'use'" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_credential_access_user_id": { + "name": "idx_credential_access_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_credential_access_role_id": { + "name": "idx_credential_access_role_id", + "columns": [ + { + "expression": "role_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_credential_access_credential_id": { + "name": "idx_credential_access_credential_id", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_access_credential_id_ssh_credentials_id_fk": { + "name": "credential_access_credential_id_ssh_credentials_id_fk", + "tableFrom": "credential_access", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_user_id_users_id_fk": { + "name": "credential_access_user_id_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_role_id_roles_id_fk": { + "name": "credential_access_role_id_roles_id_fk", + "tableFrom": "credential_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_granted_by_users_id_fk": { + "name": "credential_access_granted_by_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.credential_sidebar_preferences": { + "name": "credential_sidebar_preferences", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "credential_sidebar_preferences_user_id_users_id_fk": { + "name": "credential_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "credential_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dashboard_service_links": { + "name": "dashboard_service_links", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "dashboard_service_links_user_id_users_id_fk": { + "name": "dashboard_service_links_user_id_users_id_fk", + "tableFrom": "dashboard_service_links", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "dashboard_service_links_sync_id_unique": { + "name": "dashboard_service_links_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dismissed_alerts": { + "name": "dismissed_alerts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "alert_id": { + "name": "alert_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dismissed_at": { + "name": "dismissed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_dismissed_alerts_user_id": { + "name": "idx_dismissed_alerts_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dismissed_alerts_user_id_users_id_fk": { + "name": "dismissed_alerts_user_id_users_id_fk", + "tableFrom": "dismissed_alerts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.folder_access": { + "name": "folder_access", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'connect'" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_folder_access_owner_folder": { + "name": "idx_folder_access_owner_folder", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "folder", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "folder_access_owner_user_id_users_id_fk": { + "name": "folder_access_owner_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_user_id_users_id_fk": { + "name": "folder_access_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_role_id_roles_id_fk": { + "name": "folder_access_role_id_roles_id_fk", + "tableFrom": "folder_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_granted_by_users_id_fk": { + "name": "folder_access_granted_by_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.homepage_items": { + "name": "homepage_items", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type_id": { + "name": "type_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_homepage_items_user_id": { + "name": "idx_homepage_items_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "homepage_items_user_id_users_id_fk": { + "name": "homepage_items_user_id_users_id_fk", + "tableFrom": "homepage_items", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "homepage_items_sync_id_unique": { + "name": "homepage_items_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.homepage_layouts": { + "name": "homepage_layouts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "homepage_layouts_user_id_users_id_fk": { + "name": "homepage_layouts_user_id_users_id_fk", + "tableFrom": "homepage_layouts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "homepage_layouts_user_id_unique": { + "name": "homepage_layouts_user_id_unique", + "nullsNotDistinct": false, + "columns": [ + "user_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_access": { + "name": "host_access", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'connect'" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "last_accessed_at": { + "name": "last_accessed_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_count": { + "name": "access_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "idx_host_access_user_id": { + "name": "idx_host_access_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_host_access_role_id": { + "name": "idx_host_access_role_id", + "columns": [ + { + "expression": "role_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_host_access_host_id": { + "name": "idx_host_access_host_id", + "columns": [ + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_host_access_expires_at": { + "name": "idx_host_access_expires_at", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "host_access_host_id_ssh_data_id_fk": { + "name": "host_access_host_id_ssh_data_id_fk", + "tableFrom": "host_access", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_user_id_users_id_fk": { + "name": "host_access_user_id_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_role_id_roles_id_fk": { + "name": "host_access_role_id_roles_id_fk", + "tableFrom": "host_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_granted_by_users_id_fk": { + "name": "host_access_granted_by_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_health_checks": { + "name": "host_health_checks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "checks": { + "name": "checks", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 300 + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_host_health_checks_user_host": { + "name": "idx_host_health_checks_user_host", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "host_health_checks_user_id_users_id_fk": { + "name": "host_health_checks_user_id_users_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_checks_host_id_ssh_data_id_fk": { + "name": "host_health_checks_host_id_ssh_data_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_health_history": { + "name": "host_health_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "check_id": { + "name": "check_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "ok": { + "name": "ok", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "latency_ms": { + "name": "latency_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_health_history_user_id_users_id_fk": { + "name": "host_health_history_user_id_users_id_fk", + "tableFrom": "host_health_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_history_host_id_ssh_data_id_fk": { + "name": "host_health_history_host_id_ssh_data_id_fk", + "tableFrom": "host_health_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_metrics_history": { + "name": "host_metrics_history", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "cpu_percent": { + "name": "cpu_percent", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "mem_percent": { + "name": "mem_percent", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "disk_percent": { + "name": "disk_percent", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "net_rx_bytes": { + "name": "net_rx_bytes", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "net_tx_bytes": { + "name": "net_tx_bytes", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_metrics_history_host_id_ssh_data_id_fk": { + "name": "host_metrics_history_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_metrics_preferences": { + "name": "host_metrics_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_host_metrics_prefs_user_host": { + "name": "idx_host_metrics_prefs_user_host", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "host_metrics_preferences_user_id_users_id_fk": { + "name": "host_metrics_preferences_user_id_users_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_metrics_preferences_host_id_ssh_data_id_fk": { + "name": "host_metrics_preferences_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.host_sidebar_preferences": { + "name": "host_sidebar_preferences", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "host_sidebar_preferences_user_id_users_id_fk": { + "name": "host_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "host_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ssh_data": { + "name": "ssh_data", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "connection_type": { + "name": "connection_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'ssh'" + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "port": { + "name": "port", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "parent_host_id": { + "name": "parent_host_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pin": { + "name": "pin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "use_warpgate": { + "name": "use_warpgate", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "share_ssh_auth": { + "name": "share_ssh_auth", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "force_keyboard_interactive": { + "name": "force_keyboard_interactive", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sudo_password": { + "name": "sudo_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "autostart_password": { + "name": "autostart_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "autostart_key": { + "name": "autostart_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "autostart_key_password": { + "name": "autostart_key_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "override_credential_username": { + "name": "override_credential_username", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "vault_profile_id": { + "name": "vault_profile_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "enable_terminal": { + "name": "enable_terminal", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enable_session_logging": { + "name": "enable_session_logging", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "allow_session_sharing": { + "name": "allow_session_sharing", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enable_command_history": { + "name": "enable_command_history", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enable_tunnel": { + "name": "enable_tunnel", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "tunnel_connections": { + "name": "tunnel_connections", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "jump_hosts": { + "name": "jump_hosts", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enable_file_manager": { + "name": "enable_file_manager", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "scp_legacy": { + "name": "scp_legacy", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_docker": { + "name": "enable_docker", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_web_ui": { + "name": "enable_web_ui", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_tmux_monitor": { + "name": "enable_tmux_monitor", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_terminal_toolbar": { + "name": "enable_terminal_toolbar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enable_ai_assistant": { + "name": "enable_ai_assistant", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "show_terminal_in_sidebar": { + "name": "show_terminal_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "show_file_manager_in_sidebar": { + "name": "show_file_manager_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "show_tunnel_in_sidebar": { + "name": "show_tunnel_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "show_docker_in_sidebar": { + "name": "show_docker_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "show_server_stats_in_sidebar": { + "name": "show_server_stats_in_sidebar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "default_path": { + "name": "default_path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stats_config": { + "name": "stats_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "docker_config": { + "name": "docker_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "web_ui_config": { + "name": "web_ui_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "terminal_config": { + "name": "terminal_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "quick_actions": { + "name": "quick_actions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enable_ssh": { + "name": "enable_ssh", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "enable_rdp": { + "name": "enable_rdp", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_vnc": { + "name": "enable_vnc", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "enable_telnet": { + "name": "enable_telnet", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "ssh_port": { + "name": "ssh_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 22 + }, + "rdp_port": { + "name": "rdp_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 3389 + }, + "vnc_port": { + "name": "vnc_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 5900 + }, + "telnet_port": { + "name": "telnet_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 23 + }, + "rdp_credential_id": { + "name": "rdp_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rdp_user": { + "name": "rdp_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rdp_password": { + "name": "rdp_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rdp_domain": { + "name": "rdp_domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rdp_security": { + "name": "rdp_security", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rdp_ignore_cert": { + "name": "rdp_ignore_cert", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "vnc_credential_id": { + "name": "vnc_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "vnc_password": { + "name": "vnc_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vnc_user": { + "name": "vnc_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "telnet_user": { + "name": "telnet_user", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "telnet_password": { + "name": "telnet_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "telnet_credential_id": { + "name": "telnet_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "rdp_auth_type": { + "name": "rdp_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vnc_auth_type": { + "name": "vnc_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "telnet_auth_type": { + "name": "telnet_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "security": { + "name": "security", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ignore_cert": { + "name": "ignore_cert", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "guacamole_config": { + "name": "guacamole_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "use_socks5": { + "name": "use_socks5", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "socks5_host": { + "name": "socks5_host", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "socks5_port": { + "name": "socks5_port", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "socks5_username": { + "name": "socks5_username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "socks5_password": { + "name": "socks5_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "socks5_proxy_chain": { + "name": "socks5_proxy_chain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "connection_origin": { + "name": "connection_origin", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mac_address": { + "name": "mac_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "wol_broadcast_address": { + "name": "wol_broadcast_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "port_knock_sequence": { + "name": "port_knock_sequence", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "host_key_fingerprint": { + "name": "host_key_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "host_key_type": { + "name": "host_key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "host_key_algorithm": { + "name": "host_key_algorithm", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'sha256'" + }, + "host_key_first_seen": { + "name": "host_key_first_seen", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "host_key_last_verified": { + "name": "host_key_last_verified", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "host_key_changed_count": { + "name": "host_key_changed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ssh_data_user_id": { + "name": "idx_ssh_data_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_ssh_data_parent_host": { + "name": "idx_ssh_data_parent_host", + "columns": [ + { + "expression": "parent_host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_ssh_data_credential": { + "name": "idx_ssh_data_credential", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ssh_data_user_id_users_id_fk": { + "name": "ssh_data_user_id_users_id_fk", + "tableFrom": "ssh_data", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_data_parent_host_id_ssh_data_id_fk": { + "name": "ssh_data_parent_host_id_ssh_data_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_data", + "columnsFrom": [ + "parent_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vault_profile_id_vault_profiles_id_fk": { + "name": "ssh_data_vault_profile_id_vault_profiles_id_fk", + "tableFrom": "ssh_data", + "tableTo": "vault_profiles", + "columnsFrom": [ + "vault_profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_rdp_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "rdp_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vnc_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "vnc_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_telnet_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "telnet_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "ssh_data_sync_id_unique": { + "name": "ssh_data_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.notification_channels": { + "name": "notification_channels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "notification_channels_user_id_users_id_fk": { + "name": "notification_channels_user_id_users_id_fk", + "tableFrom": "notification_channels", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.opkssh_tokens": { + "name": "opkssh_tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sub": { + "name": "sub", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "audience": { + "name": "audience", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_opkssh_tokens_user_host": { + "name": "idx_opkssh_tokens_user_host", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "opkssh_tokens_user_id_users_id_fk": { + "name": "opkssh_tokens_user_id_users_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "opkssh_tokens_host_id_ssh_data_id_fk": { + "name": "opkssh_tokens_host_id_ssh_data_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_install_counts": { + "name": "plugin_install_counts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "registry_id": { + "name": "registry_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "count": { + "name": "count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'aggregate-telemetry'" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_install_counts_plugin_registry": { + "name": "idx_plugin_install_counts_plugin_registry", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registry_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_migrations": { + "name": "plugin_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "migration_id": { + "name": "migration_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "checksum": { + "name": "checksum", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_migrations_plugin_migration": { + "name": "idx_plugin_migrations_plugin_migration", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "migration_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_migrations_plugin_id_plugins_id_fk": { + "name": "plugin_migrations_plugin_id_plugins_id_fk", + "tableFrom": "plugin_migrations", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_permission_grants": { + "name": "plugin_permission_grants", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "capability": { + "name": "capability", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'admin'" + } + }, + "indexes": { + "idx_plugin_permission_grants_plugin_capability": { + "name": "idx_plugin_permission_grants_plugin_capability", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "capability", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_permission_grants_plugin_id_plugins_id_fk": { + "name": "plugin_permission_grants_plugin_id_plugins_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "plugin_permission_grants_granted_by_users_id_fk": { + "name": "plugin_permission_grants_granted_by_users_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_registries": { + "name": "plugin_registries", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'community'" + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "signing_key": { + "name": "signing_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_checked_at": { + "name": "last_checked_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_index_hash": { + "name": "last_index_hash", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_settings": { + "name": "plugin_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "scope_id": { + "name": "scope_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted": { + "name": "encrypted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_settings_scope_key": { + "name": "idx_plugin_settings_scope_key", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_plugin_settings_plugin_scope": { + "name": "idx_plugin_settings_plugin_scope", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_settings_plugin_id_plugins_id_fk": { + "name": "plugin_settings_plugin_id_plugins_id_fk", + "tableFrom": "plugin_settings", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugin_storage": { + "name": "plugin_storage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_storage_plugin_key": { + "name": "idx_plugin_storage_plugin_key", + "columns": [ + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "plugin_storage_plugin_id_plugins_id_fk": { + "name": "plugin_storage_plugin_id_plugins_id_fk", + "tableFrom": "plugin_storage", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.plugins": { + "name": "plugins", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tier": { + "name": "tier", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'available'" + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'community'" + }, + "registry_id": { + "name": "registry_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'disabled'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "installed_at": { + "name": "installed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "auto_update": { + "name": "auto_update", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "manifest_json": { + "name": "manifest_json", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "idx_plugins_registry_id": { + "name": "idx_plugins_registry_id", + "columns": [ + { + "expression": "registry_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rbac_applied_defaults": { + "name": "rbac_applied_defaults", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "role_name": { + "name": "role_name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "permission": { + "name": "permission", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_rbac_applied_defaults_role_permission": { + "name": "idx_rbac_applied_defaults_role_permission", + "columns": [ + { + "expression": "role_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.rbac_known_permissions": { + "name": "rbac_known_permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "permission": { + "name": "permission", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "first_seen_at": { + "name": "first_seen_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_rbac_known_permissions_permission": { + "name": "idx_rbac_known_permissions_permission", + "columns": [ + { + "expression": "permission", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.recent_activity": { + "name": "recent_activity", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "host_name": { + "name": "host_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "timestamp": { + "name": "timestamp", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_recent_activity_user_ts": { + "name": "idx_recent_activity_user_ts", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "timestamp", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "recent_activity_user_id_users_id_fk": { + "name": "recent_activity_user_id_users_id_fk", + "tableFrom": "recent_activity", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "recent_activity_host_id_ssh_data_id_fk": { + "name": "recent_activity_host_id_ssh_data_id_fk", + "tableFrom": "recent_activity", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.roles": { + "name": "roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_system": { + "name": "is_system", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "roles_name_unique": { + "name": "roles_name_unique", + "nullsNotDistinct": false, + "columns": [ + "name" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.secret_sources": { + "name": "secret_sources", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'onepassword-connect'" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "shared": { + "name": "shared", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_secret_sources_user": { + "name": "idx_secret_sources_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "secret_sources_user_id_users_id_fk": { + "name": "secret_sources_user_id_users_id_fk", + "tableFrom": "secret_sources", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session_recordings": { + "name": "session_recordings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_id": { + "name": "access_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "commands": { + "name": "commands", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "dangerous_actions": { + "name": "dangerous_actions", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "recording_path": { + "name": "recording_path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "'ssh'" + }, + "format": { + "name": "format", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "terminated_by_owner": { + "name": "terminated_by_owner", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "termination_reason": { + "name": "termination_reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_session_recordings_user_started": { + "name": "idx_session_recordings_user_started", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_session_recordings_host": { + "name": "idx_session_recordings_host", + "columns": [ + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_recordings_host_id_ssh_data_id_fk": { + "name": "session_recordings_host_id_ssh_data_id_fk", + "tableFrom": "session_recordings", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_recordings_user_id_users_id_fk": { + "name": "session_recordings_user_id_users_id_fk", + "tableFrom": "session_recordings", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "session_recordings_access_id_host_access_id_fk": { + "name": "session_recordings_access_id_host_access_id_fk", + "tableFrom": "session_recordings", + "tableTo": "host_access", + "columnsFrom": [ + "access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session_share_participants": { + "name": "session_share_participants", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "share_id": { + "name": "share_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "guest_label": { + "name": "guest_label", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "joined_at": { + "name": "joined_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "left_at": { + "name": "left_at", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "session_share_participants_share_id_session_shares_id_fk": { + "name": "session_share_participants_share_id_session_shares_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "session_shares", + "columnsFrom": [ + "share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_share_participants_user_id_users_id_fk": { + "name": "session_share_participants_user_id_users_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session_shares": { + "name": "session_shares", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tab_instance_id": { + "name": "tab_instance_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "share_type": { + "name": "share_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "link_token": { + "name": "link_token", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'read-only'" + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "revoked_at": { + "name": "revoked_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_joined_at": { + "name": "last_joined_at", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "join_count": { + "name": "join_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "idx_session_shares_session_id": { + "name": "idx_session_shares_session_id", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_session_shares_host_id": { + "name": "idx_session_shares_host_id", + "columns": [ + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_shares_host_id_ssh_data_id_fk": { + "name": "session_shares_host_id_ssh_data_id_fk", + "tableFrom": "session_shares", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_owner_user_id_users_id_fk": { + "name": "session_shares_owner_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_target_user_id_users_id_fk": { + "name": "session_shares_target_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_shares_link_token_unique": { + "name": "session_shares_link_token_unique", + "nullsNotDistinct": false, + "columns": [ + "link_token" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sessions": { + "name": "sessions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "jwt_token": { + "name": "jwt_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oidc_sub": { + "name": "oidc_sub", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_sid": { + "name": "oidc_sid", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "last_active_at": { + "name": "last_active_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_sessions_user_id": { + "name": "idx_sessions_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_sessions_expires_at": { + "name": "idx_sessions_expires_at", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shared_credential_secrets": { + "name": "shared_credential_secrets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "credential_access_id": { + "name": "credential_access_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'password'" + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_shared_credential_secrets_scope": { + "name": "idx_shared_credential_secrets_scope", + "columns": [ + { + "expression": "credential_access_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_shared_credential_secrets_target": { + "name": "idx_shared_credential_secrets_target", + "columns": [ + { + "expression": "target_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shared_credential_secrets_target_user_id_users_id_fk": { + "name": "shared_credential_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_credential_secrets_credential_id_ssh_credentials_id_fk": { + "name": "shared_credential_secrets_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_cred_secrets_access_id_fk": { + "name": "shared_cred_secrets_access_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "credential_access", + "columnsFrom": [ + "credential_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shared_host_auth_overrides": { + "name": "shared_host_auth_overrides", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "'ssh'" + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "shared_host_auth_overrides_host_user_protocol_unique": { + "name": "shared_host_auth_overrides_host_user_protocol_unique", + "columns": [ + { + "expression": "host_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "protocol", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shared_host_auth_overrides_host_id_ssh_data_id_fk": { + "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_user_id_users_id_fk": { + "name": "shared_host_auth_overrides_user_id_users_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.shared_host_secrets": { + "name": "shared_host_secrets", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "host_access_id": { + "name": "host_access_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "target_user_id": { + "name": "target_user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "protocol": { + "name": "protocol", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "'ssh'" + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'credential'" + }, + "original_credential_id": { + "name": "original_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_auth_type": { + "name": "encrypted_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_key_type": { + "name": "encrypted_key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_domain": { + "name": "encrypted_domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_shared_host_secrets_scope": { + "name": "idx_shared_host_secrets_scope", + "columns": [ + { + "expression": "host_access_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "protocol", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "shared_host_secrets_host_access_id_host_access_id_fk": { + "name": "shared_host_secrets_host_access_id_host_access_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "host_access", + "columnsFrom": [ + "host_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_target_user_id_users_id_fk": { + "name": "shared_host_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "original_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ssh_credential_usage": { + "name": "ssh_credential_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "used_at": { + "name": "used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ssh_credential_usage_credential": { + "name": "idx_ssh_credential_usage_credential", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_ssh_credential_usage_user": { + "name": "idx_ssh_credential_usage_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ssh_credential_usage_credential_id_ssh_credentials_id_fk": { + "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_host_id_ssh_data_id_fk": { + "name": "ssh_credential_usage_host_id_ssh_data_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_user_id_users_id_fk": { + "name": "ssh_credential_usage_user_id_users_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ssh_credentials": { + "name": "ssh_credentials", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "pin": { + "name": "pin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "detected_key_type": { + "name": "detected_key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "usage_count": { + "name": "usage_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ssh_credentials_user_id": { + "name": "idx_ssh_credentials_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ssh_credentials_user_id_users_id_fk": { + "name": "ssh_credentials_user_id_users_id_fk", + "tableFrom": "ssh_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "ssh_credentials_sync_id_unique": { + "name": "ssh_credentials_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ssh_folders": { + "name": "ssh_folders", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ssh_folders_user_id": { + "name": "idx_ssh_folders_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "ssh_folders_user_id_users_id_fk": { + "name": "ssh_folders_user_id_users_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_folders_credential_id_ssh_credentials_id_fk": { + "name": "ssh_folders_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "ssh_folders_sync_id_unique": { + "name": "ssh_folders_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_providers": { + "name": "sso_providers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "display_order": { + "name": "display_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sync_tombstones": { + "name": "sync_tombstones", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "sync_tombstones_user_id_users_id_fk": { + "name": "sync_tombstones_user_id_users_id_fk", + "tableFrom": "sync_tombstones", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.termix_identities": { + "name": "termix_identities", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "handle": { + "name": "handle", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identities_user_id_users_id_fk": { + "name": "termix_identities_user_id_users_id_fk", + "tableFrom": "termix_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "termix_identities_user_id_unique": { + "name": "termix_identities_user_id_unique", + "nullsNotDistinct": false, + "columns": [ + "user_id" + ] + }, + "termix_identities_handle_unique": { + "name": "termix_identities_handle_unique", + "nullsNotDistinct": false, + "columns": [ + "handle" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.termix_identity_ca": { + "name": "termix_identity_ca", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "identity_id": { + "name": "identity_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "validity_days": { + "name": "validity_days", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 90 + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identity_ca_identity_id_termix_identities_id_fk": { + "name": "termix_identity_ca_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_ca_user_id_users_id_fk": { + "name": "termix_identity_ca_user_id_users_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "termix_identity_ca_identity_id_unique": { + "name": "termix_identity_ca_identity_id_unique", + "nullsNotDistinct": false, + "columns": [ + "identity_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.termix_identity_keys": { + "name": "termix_identity_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "identity_id": { + "name": "identity_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "algorithm": { + "name": "algorithm", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'manual'" + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identity_keys_identity_id_termix_identities_id_fk": { + "name": "termix_identity_keys_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_user_id_users_id_fk": { + "name": "termix_identity_keys_user_id_users_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_credential_id_ssh_credentials_id_fk": { + "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.tmux_session_tags": { + "name": "tmux_session_tags", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "session_name": { + "name": "session_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "tmux_session_tags_user_id_users_id_fk": { + "name": "tmux_session_tags_user_id_users_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tmux_session_tags_host_id_ssh_data_id_fk": { + "name": "tmux_session_tags_host_id_ssh_data_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.trusted_devices": { + "name": "trusted_devices", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "device_fingerprint": { + "name": "device_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_trusted_devices_user_id": { + "name": "idx_trusted_devices_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "trusted_devices_user_id_users_id_fk": { + "name": "trusted_devices_user_id_users_id_fk", + "tableFrom": "trusted_devices", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.ui_preferences": { + "name": "ui_preferences", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "ui_preferences_user_id_users_id_fk": { + "name": "ui_preferences_user_id_users_id_fk", + "tableFrom": "ui_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_external_identities": { + "name": "user_external_identities", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_external_identities_provider_subject": { + "name": "idx_user_external_identities_provider_subject", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_user_external_identities_user": { + "name": "idx_user_external_identities_user", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_external_identities_user_id_users_id_fk": { + "name": "user_external_identities_user_id_users_id_fk", + "tableFrom": "user_external_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_open_tabs": { + "name": "user_open_tabs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tab_type": { + "name": "tab_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "tab_order": { + "name": "tab_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "backend_session_id": { + "name": "backend_session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_open_tabs_user_id": { + "name": "idx_user_open_tabs_user_id", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_open_tabs_user_id_users_id_fk": { + "name": "user_open_tabs_user_id_users_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_open_tabs_host_id_ssh_data_id_fk": { + "name": "user_open_tabs_host_id_ssh_data_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_preferences": { + "name": "user_preferences", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "reopen_tabs_on_login": { + "name": "reopen_tabs_on_login", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "font_size": { + "name": "font_size", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "accent_color": { + "name": "accent_color", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "language": { + "name": "language", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "storage_mode": { + "name": "storage_mode", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "command_autocomplete": { + "name": "command_autocomplete", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "command_palette_enabled": { + "name": "command_palette_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "show_host_tags": { + "name": "show_host_tags", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "host_tray_on_click": { + "name": "host_tray_on_click", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "pin_app_rail": { + "name": "pin_app_rail", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "expand_app_rail_on_hover": { + "name": "expand_app_rail_on_hover", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "show_pin_app_rail_button": { + "name": "show_pin_app_rail_button", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "folders_collapsed": { + "name": "folders_collapsed", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "confirm_snippet_execution": { + "name": "confirm_snippet_execution", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "disable_update_check": { + "name": "disable_update_check", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "confirm_tab_close": { + "name": "confirm_tab_close", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "hidden_rail_tabs": { + "name": "hidden_rail_tabs", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ai_assistant_enabled": { + "name": "ai_assistant_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "ai_read_only_commands": { + "name": "ai_read_only_commands", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "compact_host_view": { + "name": "compact_host_view", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "status_color_scheme": { + "name": "status_color_scheme", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "custom_themes": { + "name": "custom_themes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "custom_keybindings": { + "name": "custom_keybindings", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "terminal_defaults": { + "name": "terminal_defaults", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rdp_defaults": { + "name": "rdp_defaults", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "terminal_macros": { + "name": "terminal_macros", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "user_preferences_user_id_users_id_fk": { + "name": "user_preferences_user_id_users_id_fk", + "tableFrom": "user_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_roles": { + "name": "user_roles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "granted_by": { + "name": "granted_by", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_roles_user_role": { + "name": "idx_user_roles_user_role", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "role_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_user_roles_role_id": { + "name": "idx_user_roles_role_id", + "columns": [ + { + "expression": "role_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_roles_user_id_users_id_fk": { + "name": "user_roles_user_id_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_role_id_roles_id_fk": { + "name": "user_roles_role_id_roles_id_fk", + "tableFrom": "user_roles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_granted_by_users_id_fk": { + "name": "user_roles_granted_by_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_second_factors": { + "name": "user_second_factors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "factor_id": { + "name": "factor_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "enrolled_at": { + "name": "enrolled_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_second_factors_user_factor": { + "name": "idx_user_second_factors_user_factor", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "plugin_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "factor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_second_factors_user_id_users_id_fk": { + "name": "user_second_factors_user_id_users_id_fk", + "tableFrom": "user_second_factors", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_admin": { + "name": "is_admin", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_oidc": { + "name": "is_oidc", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "oidc_identifier": { + "name": "oidc_identifier", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "issuer_url": { + "name": "issuer_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorization_url": { + "name": "authorization_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "token_url": { + "name": "token_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "identifier_path": { + "name": "identifier_path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name_path": { + "name": "name_path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'openid email profile'" + }, + "totp_secret": { + "name": "totp_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "totp_enabled": { + "name": "totp_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "totp_backup_codes": { + "name": "totp_backup_codes", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registered_at": { + "name": "registered_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "donation_modal_dismissed": { + "name": "donation_modal_dismissed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vault_profiles": { + "name": "vault_profiles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder": { + "name": "folder", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "vault_addr": { + "name": "vault_addr", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "vault_namespace": { + "name": "vault_namespace", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_mount": { + "name": "oidc_mount", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oidc_role": { + "name": "oidc_role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ssh_mount": { + "name": "ssh_mount", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ssh_role": { + "name": "ssh_role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "valid_principals": { + "name": "valid_principals", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "shared": { + "name": "shared", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sync_id": { + "name": "sync_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "vault_profiles_user_id_users_id_fk": { + "name": "vault_profiles_user_id_users_id_fk", + "tableFrom": "vault_profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "vault_profiles_sync_id_unique": { + "name": "vault_profiles_sync_id_unique", + "nullsNotDistinct": false, + "columns": [ + "sync_id" + ] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.vault_tokens": { + "name": "vault_tokens", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "profile_id": { + "name": "profile_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "private_key": { + "name": "private_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "idx_vault_tokens_user_profile": { + "name": "idx_vault_tokens_user_profile", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "profile_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "vault_tokens_user_id_users_id_fk": { + "name": "vault_tokens_user_id_users_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vault_tokens_profile_id_vault_profiles_id_fk": { + "name": "vault_tokens_profile_id_vault_profiles_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "vault_profiles", + "columnsFrom": [ + "profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.webauthn_credentials": { + "name": "webauthn_credentials", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "varchar(255)", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "counter": { + "name": "counter", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "backed_up": { + "name": "backed_up", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "transports": { + "name": "transports", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_verification": { + "name": "user_verification", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'preferred'" + }, + "created_at": { + "name": "created_at", + "type": "varchar(255)", + "primaryKey": false, + "notNull": true, + "default": "CURRENT_TIMESTAMP" + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "webauthn_credentials_user_id_users_id_fk": { + "name": "webauthn_credentials_user_id_users_id_fk", + "tableFrom": "webauthn_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": {}, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} \ No newline at end of file diff --git a/drizzle/postgres/meta/_journal.json b/drizzle/postgres/meta/_journal.json index 09cd90055..68c38092a 100644 --- a/drizzle/postgres/meta/_journal.json +++ b/drizzle/postgres/meta/_journal.json @@ -267,6 +267,13 @@ "when": 1790189637011, "tag": "0037_dizzy_sage", "breakpoints": true + }, + { + "idx": 38, + "version": "7", + "when": 1790201004950, + "tag": "0038_cute_vermin", + "breakpoints": true } ] } \ No newline at end of file diff --git a/drizzle/sqlite/0034_curious_molecule_man.sql b/drizzle/sqlite/0034_curious_molecule_man.sql new file mode 100644 index 000000000..7ed6f9f96 --- /dev/null +++ b/drizzle/sqlite/0034_curious_molecule_man.sql @@ -0,0 +1,5 @@ +-- c2s_tunnel_presets moved to the tunnels plugin, whose first migration renames +-- it to p_tunnels_presets. Dropping it here would lose every saved preset, so +-- this only stops drizzle tracking it. SELECT 1 because MySQL rejects an +-- empty query. +SELECT 1; diff --git a/drizzle/sqlite/meta/0034_snapshot.json b/drizzle/sqlite/meta/0034_snapshot.json new file mode 100644 index 000000000..33aaa5d5c --- /dev/null +++ b/drizzle/sqlite/meta/0034_snapshot.json @@ -0,0 +1,8112 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "de96f9d2-2ee6-4342-9e5a-c71ab3b3f752", + "prevId": "f12056c6-ae9b-4f88-b3fd-a2be424850ca", + "tables": { + "ai_conversations": { + "name": "ai_conversations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_conversations_user": { + "name": "idx_ai_conversations_user", + "columns": [ + "user_id", + "updated_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_conversations_user_id_users_id_fk": { + "name": "ai_conversations_user_id_users_id_fk", + "tableFrom": "ai_conversations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ai_messages": { + "name": "ai_messages", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "''" + }, + "tool_calls": { + "name": "tool_calls", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_messages_conversation": { + "name": "idx_ai_messages_conversation", + "columns": [ + "conversation_id", + "created_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_messages_conversation_id_ai_conversations_id_fk": { + "name": "ai_messages_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_messages", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ai_proposals": { + "name": "ai_proposals", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "conversation_id": { + "name": "conversation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "payload": { + "name": "payload", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'{}'" + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'pending'" + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_proposals_user": { + "name": "idx_ai_proposals_user", + "columns": [ + "user_id", + "status" + ], + "isUnique": false + }, + "idx_ai_proposals_conversation": { + "name": "idx_ai_proposals_conversation", + "columns": [ + "conversation_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ai_proposals_conversation_id_ai_conversations_id_fk": { + "name": "ai_proposals_conversation_id_ai_conversations_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "ai_conversations", + "columnsFrom": [ + "conversation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ai_proposals_user_id_users_id_fk": { + "name": "ai_proposals_user_id_users_id_fk", + "tableFrom": "ai_proposals", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ai_providers": { + "name": "ai_providers", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "provider_type": { + "name": "provider_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key": { + "name": "api_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "api_key_prefix": { + "name": "api_key_prefix", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "default_model": { + "name": "default_model", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ai_providers_user_label": { + "name": "idx_ai_providers_user_label", + "columns": [ + "user_id", + "label" + ], + "isUnique": true + } + }, + "foreignKeys": { + "ai_providers_user_id_users_id_fk": { + "name": "ai_providers_user_id_users_id_fk", + "tableFrom": "ai_providers", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "api_keys": { + "name": "api_keys", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_active": { + "name": "is_active", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + } + }, + "indexes": { + "idx_api_keys_user_id": { + "name": "idx_api_keys_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "api_keys_user_id_users_id_fk": { + "name": "api_keys_user_id_users_id_fk", + "tableFrom": "api_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "audit_logs": { + "name": "audit_logs", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "details": { + "name": "details", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "success": { + "name": "success", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_audit_logs_timestamp": { + "name": "idx_audit_logs_timestamp", + "columns": [ + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_user_ts": { + "name": "idx_audit_logs_user_ts", + "columns": [ + "user_id", + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_action_ts": { + "name": "idx_audit_logs_action_ts", + "columns": [ + "action", + "timestamp" + ], + "isUnique": false + }, + "idx_audit_logs_resource_ts": { + "name": "idx_audit_logs_resource_ts", + "columns": [ + "resource_type", + "timestamp" + ], + "isUnique": false + } + }, + "foreignKeys": { + "audit_logs_user_id_users_id_fk": { + "name": "audit_logs_user_id_users_id_fk", + "tableFrom": "audit_logs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automation_channels": { + "name": "automation_channels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "channel_id": { + "name": "channel_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_channels_pair": { + "name": "idx_automation_channels_pair", + "columns": [ + "automation_id", + "channel_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "automation_channels_automation_id_automations_id_fk": { + "name": "automation_channels_automation_id_automations_id_fk", + "tableFrom": "automation_channels", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_channels_channel_id_notification_channels_id_fk": { + "name": "automation_channels_channel_id_notification_channels_id_fk", + "tableFrom": "automation_channels", + "tableTo": "notification_channels", + "columnsFrom": [ + "channel_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automation_run_steps": { + "name": "automation_run_steps", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "run_id": { + "name": "run_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_index": { + "name": "step_index", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_id": { + "name": "step_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "step_type": { + "name": "step_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "output": { + "name": "output", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "truncated": { + "name": "truncated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": { + "idx_automation_run_steps_run": { + "name": "idx_automation_run_steps_run", + "columns": [ + "run_id", + "step_index" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_run_steps_run_id_automation_runs_id_fk": { + "name": "automation_run_steps_run_id_automation_runs_id_fk", + "tableFrom": "automation_run_steps", + "tableTo": "automation_runs", + "columnsFrom": [ + "run_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automation_runs": { + "name": "automation_runs", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "trigger_context": { + "name": "trigger_context", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "finished_at": { + "name": "finished_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "dry_run": { + "name": "dry_run", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_runs_automation": { + "name": "idx_automation_runs_automation", + "columns": [ + "automation_id", + "started_at" + ], + "isUnique": false + }, + "idx_automation_runs_user": { + "name": "idx_automation_runs_user", + "columns": [ + "user_id", + "started_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_runs_automation_id_automations_id_fk": { + "name": "automation_runs_automation_id_automations_id_fk", + "tableFrom": "automation_runs", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "automation_runs_user_id_users_id_fk": { + "name": "automation_runs_user_id_users_id_fk", + "tableFrom": "automation_runs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automation_schedules": { + "name": "automation_schedules", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "cron": { + "name": "cron", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "next_due_at": { + "name": "next_due_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_tick_at": { + "name": "last_tick_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_automation_schedules_automation": { + "name": "idx_automation_schedules_automation", + "columns": [ + "automation_id" + ], + "isUnique": true + }, + "idx_automation_schedules_due": { + "name": "idx_automation_schedules_due", + "columns": [ + "next_due_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automation_schedules_automation_id_automations_id_fk": { + "name": "automation_schedules_automation_id_automations_id_fk", + "tableFrom": "automation_schedules", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automation_trigger_state": { + "name": "automation_trigger_state", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "automation_id": { + "name": "automation_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "state_key": { + "name": "state_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "breach_started_at": { + "name": "breach_started_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_value": { + "name": "last_value", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_observed_state": { + "name": "last_observed_state", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_automation_trigger_state_key": { + "name": "idx_automation_trigger_state_key", + "columns": [ + "automation_id", + "state_key" + ], + "isUnique": true + } + }, + "foreignKeys": { + "automation_trigger_state_automation_id_automations_id_fk": { + "name": "automation_trigger_state_automation_id_automations_id_fk", + "tableFrom": "automation_trigger_state", + "tableTo": "automations", + "columnsFrom": [ + "automation_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "automations": { + "name": "automations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "definition": { + "name": "definition", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "definition_version": { + "name": "definition_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 1 + }, + "concurrency_policy": { + "name": "concurrency_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'skip'" + }, + "max_run_seconds": { + "name": "max_run_seconds", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 300 + }, + "dry_run": { + "name": "dry_run", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_run_status": { + "name": "last_run_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_automations_user": { + "name": "idx_automations_user", + "columns": [ + "user_id", + "enabled" + ], + "isUnique": false + } + }, + "foreignKeys": { + "automations_user_id_users_id_fk": { + "name": "automations_user_id_users_id_fk", + "tableFrom": "automations", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "collab_room_members": { + "name": "collab_room_members", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "room_id": { + "name": "room_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "room_role": { + "name": "room_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'member'" + }, + "added_by": { + "name": "added_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_collab_room_members_room_user": { + "name": "idx_collab_room_members_room_user", + "columns": [ + "room_id", + "user_id" + ], + "isUnique": true + }, + "idx_collab_room_members_user": { + "name": "idx_collab_room_members_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "collab_room_members_room_id_collab_rooms_id_fk": { + "name": "collab_room_members_room_id_collab_rooms_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "collab_rooms", + "columnsFrom": [ + "room_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_user_id_users_id_fk": { + "name": "collab_room_members_user_id_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_room_members_added_by_users_id_fk": { + "name": "collab_room_members_added_by_users_id_fk", + "tableFrom": "collab_room_members", + "tableTo": "users", + "columnsFrom": [ + "added_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "collab_rooms": { + "name": "collab_rooms", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "persistent": { + "name": "persistent", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "presenter_user_id": { + "name": "presenter_user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_protocol": { + "name": "stage_protocol", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_host_id": { + "name": "stage_host_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stage_share_id": { + "name": "stage_share_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "guest_link_token": { + "name": "guest_link_token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_collab_rooms_owner": { + "name": "idx_collab_rooms_owner", + "columns": [ + "owner_user_id" + ], + "isUnique": false + }, + "idx_collab_rooms_guest_token": { + "name": "idx_collab_rooms_guest_token", + "columns": [ + "guest_link_token" + ], + "isUnique": true + } + }, + "foreignKeys": { + "collab_rooms_owner_user_id_users_id_fk": { + "name": "collab_rooms_owner_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "collab_rooms_presenter_user_id_users_id_fk": { + "name": "collab_rooms_presenter_user_id_users_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "users", + "columnsFrom": [ + "presenter_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_host_id_ssh_data_id_fk": { + "name": "collab_rooms_stage_host_id_ssh_data_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "ssh_data", + "columnsFrom": [ + "stage_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "collab_rooms_stage_share_id_session_shares_id_fk": { + "name": "collab_rooms_stage_share_id_session_shares_id_fk", + "tableFrom": "collab_rooms", + "tableTo": "session_shares", + "columnsFrom": [ + "stage_share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "command_history": { + "name": "command_history", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "command": { + "name": "command", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "executed_at": { + "name": "executed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_command_history_user_host": { + "name": "idx_command_history_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "command_history_user_id_users_id_fk": { + "name": "command_history_user_id_users_id_fk", + "tableFrom": "command_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "command_history_host_id_ssh_data_id_fk": { + "name": "command_history_host_id_ssh_data_id_fk", + "tableFrom": "command_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "credential_access": { + "name": "credential_access", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'use'" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_credential_access_user_id": { + "name": "idx_credential_access_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_credential_access_role_id": { + "name": "idx_credential_access_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + }, + "idx_credential_access_credential_id": { + "name": "idx_credential_access_credential_id", + "columns": [ + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "credential_access_credential_id_ssh_credentials_id_fk": { + "name": "credential_access_credential_id_ssh_credentials_id_fk", + "tableFrom": "credential_access", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_user_id_users_id_fk": { + "name": "credential_access_user_id_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_role_id_roles_id_fk": { + "name": "credential_access_role_id_roles_id_fk", + "tableFrom": "credential_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_access_granted_by_users_id_fk": { + "name": "credential_access_granted_by_users_id_fk", + "tableFrom": "credential_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "credential_sidebar_preferences": { + "name": "credential_sidebar_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "credential_sidebar_preferences_user_id_users_id_fk": { + "name": "credential_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "credential_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "dashboard_service_links": { + "name": "dashboard_service_links", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "dashboard_service_links_sync_id_unique": { + "name": "dashboard_service_links_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "dashboard_service_links_user_id_users_id_fk": { + "name": "dashboard_service_links_user_id_users_id_fk", + "tableFrom": "dashboard_service_links", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "dismissed_alerts": { + "name": "dismissed_alerts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "alert_id": { + "name": "alert_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "dismissed_at": { + "name": "dismissed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_dismissed_alerts_user_id": { + "name": "idx_dismissed_alerts_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "dismissed_alerts_user_id_users_id_fk": { + "name": "dismissed_alerts_user_id_users_id_fk", + "tableFrom": "dismissed_alerts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "folder_access": { + "name": "folder_access", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'connect'" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_folder_access_owner_folder": { + "name": "idx_folder_access_owner_folder", + "columns": [ + "owner_user_id", + "folder" + ], + "isUnique": false + } + }, + "foreignKeys": { + "folder_access_owner_user_id_users_id_fk": { + "name": "folder_access_owner_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_user_id_users_id_fk": { + "name": "folder_access_user_id_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_role_id_roles_id_fk": { + "name": "folder_access_role_id_roles_id_fk", + "tableFrom": "folder_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_access_granted_by_users_id_fk": { + "name": "folder_access_granted_by_users_id_fk", + "tableFrom": "folder_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "homepage_items": { + "name": "homepage_items", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type_id": { + "name": "type_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'{}'" + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "homepage_items_sync_id_unique": { + "name": "homepage_items_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + }, + "idx_homepage_items_user_id": { + "name": "idx_homepage_items_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "homepage_items_user_id_users_id_fk": { + "name": "homepage_items_user_id_users_id_fk", + "tableFrom": "homepage_items", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "homepage_layouts": { + "name": "homepage_layouts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'{}'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "homepage_layouts_user_id_unique": { + "name": "homepage_layouts_user_id_unique", + "columns": [ + "user_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "homepage_layouts_user_id_users_id_fk": { + "name": "homepage_layouts_user_id_users_id_fk", + "tableFrom": "homepage_layouts", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_access": { + "name": "host_access", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'connect'" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "last_accessed_at": { + "name": "last_accessed_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "access_count": { + "name": "access_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + } + }, + "indexes": { + "idx_host_access_user_id": { + "name": "idx_host_access_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_host_access_role_id": { + "name": "idx_host_access_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + }, + "idx_host_access_host_id": { + "name": "idx_host_access_host_id", + "columns": [ + "host_id" + ], + "isUnique": false + }, + "idx_host_access_expires_at": { + "name": "idx_host_access_expires_at", + "columns": [ + "expires_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "host_access_host_id_ssh_data_id_fk": { + "name": "host_access_host_id_ssh_data_id_fk", + "tableFrom": "host_access", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_user_id_users_id_fk": { + "name": "host_access_user_id_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_role_id_roles_id_fk": { + "name": "host_access_role_id_roles_id_fk", + "tableFrom": "host_access", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_access_granted_by_users_id_fk": { + "name": "host_access_granted_by_users_id_fk", + "tableFrom": "host_access", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_health_checks": { + "name": "host_health_checks", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "checks": { + "name": "checks", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "interval_seconds": { + "name": "interval_seconds", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 300 + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_host_health_checks_user_host": { + "name": "idx_host_health_checks_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "host_health_checks_user_id_users_id_fk": { + "name": "host_health_checks_user_id_users_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_checks_host_id_ssh_data_id_fk": { + "name": "host_health_checks_host_id_ssh_data_id_fk", + "tableFrom": "host_health_checks", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_health_history": { + "name": "host_health_history", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "check_id": { + "name": "check_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "ok": { + "name": "ok", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "latency_ms": { + "name": "latency_ms", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_health_history_user_id_users_id_fk": { + "name": "host_health_history_user_id_users_id_fk", + "tableFrom": "host_health_history", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_health_history_host_id_ssh_data_id_fk": { + "name": "host_health_history_host_id_ssh_data_id_fk", + "tableFrom": "host_health_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_metrics_history": { + "name": "host_metrics_history", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ts": { + "name": "ts", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "cpu_percent": { + "name": "cpu_percent", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mem_percent": { + "name": "mem_percent", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "disk_percent": { + "name": "disk_percent", + "type": "real", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "net_rx_bytes": { + "name": "net_rx_bytes", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "net_tx_bytes": { + "name": "net_tx_bytes", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "host_metrics_history_host_id_ssh_data_id_fk": { + "name": "host_metrics_history_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_history", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_metrics_preferences": { + "name": "host_metrics_preferences", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "layout": { + "name": "layout", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_host_metrics_prefs_user_host": { + "name": "idx_host_metrics_prefs_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "host_metrics_preferences_user_id_users_id_fk": { + "name": "host_metrics_preferences_user_id_users_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "host_metrics_preferences_host_id_ssh_data_id_fk": { + "name": "host_metrics_preferences_host_id_ssh_data_id_fk", + "tableFrom": "host_metrics_preferences", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "host_sidebar_preferences": { + "name": "host_sidebar_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "host_sidebar_preferences_user_id_users_id_fk": { + "name": "host_sidebar_preferences_user_id_users_id_fk", + "tableFrom": "host_sidebar_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ssh_data": { + "name": "ssh_data", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "connection_type": { + "name": "connection_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ip": { + "name": "ip", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "port": { + "name": "port", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "parent_host_id": { + "name": "parent_host_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin": { + "name": "pin", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "use_warpgate": { + "name": "use_warpgate", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "share_ssh_auth": { + "name": "share_ssh_auth", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "force_keyboard_interactive": { + "name": "force_keyboard_interactive", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text(8192)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sudo_password": { + "name": "sudo_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_password": { + "name": "autostart_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_key": { + "name": "autostart_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "autostart_key_password": { + "name": "autostart_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "override_credential_username": { + "name": "override_credential_username", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vault_profile_id": { + "name": "vault_profile_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_terminal": { + "name": "enable_terminal", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_session_logging": { + "name": "enable_session_logging", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "allow_session_sharing": { + "name": "allow_session_sharing", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_command_history": { + "name": "enable_command_history", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_tunnel": { + "name": "enable_tunnel", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "tunnel_connections": { + "name": "tunnel_connections", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "jump_hosts": { + "name": "jump_hosts", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_file_manager": { + "name": "enable_file_manager", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "scp_legacy": { + "name": "scp_legacy", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_docker": { + "name": "enable_docker", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_web_ui": { + "name": "enable_web_ui", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_tmux_monitor": { + "name": "enable_tmux_monitor", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_terminal_toolbar": { + "name": "enable_terminal_toolbar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_ai_assistant": { + "name": "enable_ai_assistant", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_terminal_in_sidebar": { + "name": "show_terminal_in_sidebar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "show_file_manager_in_sidebar": { + "name": "show_file_manager_in_sidebar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_tunnel_in_sidebar": { + "name": "show_tunnel_in_sidebar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_docker_in_sidebar": { + "name": "show_docker_in_sidebar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "show_server_stats_in_sidebar": { + "name": "show_server_stats_in_sidebar", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "default_path": { + "name": "default_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "stats_config": { + "name": "stats_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "docker_config": { + "name": "docker_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "web_ui_config": { + "name": "web_ui_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_config": { + "name": "terminal_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "quick_actions": { + "name": "quick_actions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "notes": { + "name": "notes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enable_ssh": { + "name": "enable_ssh", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "enable_rdp": { + "name": "enable_rdp", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_vnc": { + "name": "enable_vnc", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "enable_telnet": { + "name": "enable_telnet", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "ssh_port": { + "name": "ssh_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 22 + }, + "rdp_port": { + "name": "rdp_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 3389 + }, + "vnc_port": { + "name": "vnc_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 5900 + }, + "telnet_port": { + "name": "telnet_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 23 + }, + "rdp_credential_id": { + "name": "rdp_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_user": { + "name": "rdp_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_password": { + "name": "rdp_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_domain": { + "name": "rdp_domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_security": { + "name": "rdp_security", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_ignore_cert": { + "name": "rdp_ignore_cert", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "vnc_credential_id": { + "name": "vnc_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_password": { + "name": "vnc_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_user": { + "name": "vnc_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_user": { + "name": "telnet_user", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_password": { + "name": "telnet_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_credential_id": { + "name": "telnet_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_auth_type": { + "name": "rdp_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vnc_auth_type": { + "name": "vnc_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "telnet_auth_type": { + "name": "telnet_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "security": { + "name": "security", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ignore_cert": { + "name": "ignore_cert", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "guacamole_config": { + "name": "guacamole_config", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "use_socks5": { + "name": "use_socks5", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_host": { + "name": "socks5_host", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_port": { + "name": "socks5_port", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_username": { + "name": "socks5_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_password": { + "name": "socks5_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "socks5_proxy_chain": { + "name": "socks5_proxy_chain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "connection_origin": { + "name": "connection_origin", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "mac_address": { + "name": "mac_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "wol_broadcast_address": { + "name": "wol_broadcast_address", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "port_knock_sequence": { + "name": "port_knock_sequence", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_fingerprint": { + "name": "host_key_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_type": { + "name": "host_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_algorithm": { + "name": "host_key_algorithm", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'sha256'" + }, + "host_key_first_seen": { + "name": "host_key_first_seen", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_last_verified": { + "name": "host_key_last_verified", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_key_changed_count": { + "name": "host_key_changed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": 0 + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "ssh_data_sync_id_unique": { + "name": "ssh_data_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + }, + "idx_ssh_data_user_id": { + "name": "idx_ssh_data_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_ssh_data_parent_host": { + "name": "idx_ssh_data_parent_host", + "columns": [ + "parent_host_id" + ], + "isUnique": false + }, + "idx_ssh_data_credential": { + "name": "idx_ssh_data_credential", + "columns": [ + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_data_user_id_users_id_fk": { + "name": "ssh_data_user_id_users_id_fk", + "tableFrom": "ssh_data", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_data_parent_host_id_ssh_data_id_fk": { + "name": "ssh_data_parent_host_id_ssh_data_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_data", + "columnsFrom": [ + "parent_host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vault_profile_id_vault_profiles_id_fk": { + "name": "ssh_data_vault_profile_id_vault_profiles_id_fk", + "tableFrom": "ssh_data", + "tableTo": "vault_profiles", + "columnsFrom": [ + "vault_profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_rdp_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_rdp_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "rdp_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_vnc_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_vnc_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "vnc_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "ssh_data_telnet_credential_id_ssh_credentials_id_fk": { + "name": "ssh_data_telnet_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_data", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "telnet_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "notification_channels": { + "name": "notification_channels", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "notification_channels_user_id_users_id_fk": { + "name": "notification_channels_user_id_users_id_fk", + "tableFrom": "notification_channels", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "opkssh_tokens": { + "name": "opkssh_tokens", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sub": { + "name": "sub", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "audience": { + "name": "audience", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_opkssh_tokens_user_host": { + "name": "idx_opkssh_tokens_user_host", + "columns": [ + "user_id", + "host_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "opkssh_tokens_user_id_users_id_fk": { + "name": "opkssh_tokens_user_id_users_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "opkssh_tokens_host_id_ssh_data_id_fk": { + "name": "opkssh_tokens_host_id_ssh_data_id_fk", + "tableFrom": "opkssh_tokens", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_install_counts": { + "name": "plugin_install_counts", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "registry_id": { + "name": "registry_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "count": { + "name": "count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'aggregate-telemetry'" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_install_counts_plugin_registry": { + "name": "idx_plugin_install_counts_plugin_registry", + "columns": [ + "plugin_id", + "registry_id" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_migrations": { + "name": "plugin_migrations", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "migration_id": { + "name": "migration_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "checksum": { + "name": "checksum", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_migrations_plugin_migration": { + "name": "idx_plugin_migrations_plugin_migration", + "columns": [ + "plugin_id", + "migration_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_migrations_plugin_id_plugins_id_fk": { + "name": "plugin_migrations_plugin_id_plugins_id_fk", + "tableFrom": "plugin_migrations", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_permission_grants": { + "name": "plugin_permission_grants", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "capability": { + "name": "capability", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "granted_by": { + "name": "granted_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'admin'" + } + }, + "indexes": { + "idx_plugin_permission_grants_plugin_capability": { + "name": "idx_plugin_permission_grants_plugin_capability", + "columns": [ + "plugin_id", + "capability" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_permission_grants_plugin_id_plugins_id_fk": { + "name": "plugin_permission_grants_plugin_id_plugins_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "plugin_permission_grants_granted_by_users_id_fk": { + "name": "plugin_permission_grants_granted_by_users_id_fk", + "tableFrom": "plugin_permission_grants", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_registries": { + "name": "plugin_registries", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'community'" + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "signing_key": { + "name": "signing_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_checked_at": { + "name": "last_checked_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_index_hash": { + "name": "last_index_hash", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_settings": { + "name": "plugin_settings", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "scope_id": { + "name": "scope_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted": { + "name": "encrypted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_settings_scope_key": { + "name": "idx_plugin_settings_scope_key", + "columns": [ + "plugin_id", + "scope", + "scope_id", + "key" + ], + "isUnique": true + }, + "idx_plugin_settings_plugin_scope": { + "name": "idx_plugin_settings_plugin_scope", + "columns": [ + "plugin_id", + "scope" + ], + "isUnique": false + } + }, + "foreignKeys": { + "plugin_settings_plugin_id_plugins_id_fk": { + "name": "plugin_settings_plugin_id_plugins_id_fk", + "tableFrom": "plugin_settings", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugin_storage": { + "name": "plugin_storage", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_plugin_storage_plugin_key": { + "name": "idx_plugin_storage_plugin_key", + "columns": [ + "plugin_id", + "key" + ], + "isUnique": true + } + }, + "foreignKeys": { + "plugin_storage_plugin_id_plugins_id_fk": { + "name": "plugin_storage_plugin_id_plugins_id_fk", + "tableFrom": "plugin_storage", + "tableTo": "plugins", + "columnsFrom": [ + "plugin_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "plugins": { + "name": "plugins", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tier": { + "name": "tier", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'available'" + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'community'" + }, + "registry_id": { + "name": "registry_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'disabled'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "installed_at": { + "name": "installed_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "auto_update": { + "name": "auto_update", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "manifest_json": { + "name": "manifest_json", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": { + "idx_plugins_registry_id": { + "name": "idx_plugins_registry_id", + "columns": [ + "registry_id" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "rbac_applied_defaults": { + "name": "rbac_applied_defaults", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "role_name": { + "name": "role_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "permission": { + "name": "permission", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "applied_at": { + "name": "applied_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_rbac_applied_defaults_role_permission": { + "name": "idx_rbac_applied_defaults_role_permission", + "columns": [ + "role_name", + "permission" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "rbac_known_permissions": { + "name": "rbac_known_permissions", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "permission": { + "name": "permission", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "first_seen_at": { + "name": "first_seen_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_rbac_known_permissions_permission": { + "name": "idx_rbac_known_permissions_permission", + "columns": [ + "permission" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "recent_activity": { + "name": "recent_activity", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_name": { + "name": "host_name", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "timestamp": { + "name": "timestamp", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_recent_activity_user_ts": { + "name": "idx_recent_activity_user_ts", + "columns": [ + "user_id", + "timestamp" + ], + "isUnique": false + } + }, + "foreignKeys": { + "recent_activity_user_id_users_id_fk": { + "name": "recent_activity_user_id_users_id_fk", + "tableFrom": "recent_activity", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "recent_activity_host_id_ssh_data_id_fk": { + "name": "recent_activity_host_id_ssh_data_id_fk", + "tableFrom": "recent_activity", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "roles": { + "name": "roles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "is_system": { + "name": "is_system", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "permissions": { + "name": "permissions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "roles_name_unique": { + "name": "roles_name_unique", + "columns": [ + "name" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "secret_sources": { + "name": "secret_sources", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'onepassword-connect'" + }, + "base_url": { + "name": "base_url", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "shared": { + "name": "shared", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_secret_sources_user": { + "name": "idx_secret_sources_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "secret_sources_user_id_users_id_fk": { + "name": "secret_sources_user_id_users_id_fk", + "tableFrom": "secret_sources", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "session_recordings": { + "name": "session_recordings", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "access_id": { + "name": "access_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "started_at": { + "name": "started_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "ended_at": { + "name": "ended_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "duration": { + "name": "duration", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "commands": { + "name": "commands", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "dangerous_actions": { + "name": "dangerous_actions", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "recording_path": { + "name": "recording_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "format": { + "name": "format", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'text'" + }, + "terminated_by_owner": { + "name": "terminated_by_owner", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": false + }, + "termination_reason": { + "name": "termination_reason", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_session_recordings_user_started": { + "name": "idx_session_recordings_user_started", + "columns": [ + "user_id", + "started_at" + ], + "isUnique": false + }, + "idx_session_recordings_host": { + "name": "idx_session_recordings_host", + "columns": [ + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "session_recordings_host_id_ssh_data_id_fk": { + "name": "session_recordings_host_id_ssh_data_id_fk", + "tableFrom": "session_recordings", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_recordings_user_id_users_id_fk": { + "name": "session_recordings_user_id_users_id_fk", + "tableFrom": "session_recordings", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "session_recordings_access_id_host_access_id_fk": { + "name": "session_recordings_access_id_host_access_id_fk", + "tableFrom": "session_recordings", + "tableTo": "host_access", + "columnsFrom": [ + "access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "session_share_participants": { + "name": "session_share_participants", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "share_id": { + "name": "share_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "guest_label": { + "name": "guest_label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "joined_at": { + "name": "joined_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "left_at": { + "name": "left_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "session_share_participants_share_id_session_shares_id_fk": { + "name": "session_share_participants_share_id_session_shares_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "session_shares", + "columnsFrom": [ + "share_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_share_participants_user_id_users_id_fk": { + "name": "session_share_participants_user_id_users_id_fk", + "tableFrom": "session_share_participants", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "session_shares": { + "name": "session_shares", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_instance_id": { + "name": "tab_instance_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "share_type": { + "name": "share_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "link_token": { + "name": "link_token", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "permission_level": { + "name": "permission_level", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'read-only'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "last_joined_at": { + "name": "last_joined_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "join_count": { + "name": "join_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + } + }, + "indexes": { + "session_shares_link_token_unique": { + "name": "session_shares_link_token_unique", + "columns": [ + "link_token" + ], + "isUnique": true + }, + "idx_session_shares_session_id": { + "name": "idx_session_shares_session_id", + "columns": [ + "session_id" + ], + "isUnique": false + }, + "idx_session_shares_host_id": { + "name": "idx_session_shares_host_id", + "columns": [ + "host_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "session_shares_host_id_ssh_data_id_fk": { + "name": "session_shares_host_id_ssh_data_id_fk", + "tableFrom": "session_shares", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_owner_user_id_users_id_fk": { + "name": "session_shares_owner_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "owner_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_shares_target_user_id_users_id_fk": { + "name": "session_shares_target_user_id_users_id_fk", + "tableFrom": "session_shares", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "sessions": { + "name": "sessions", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "jwt_token": { + "name": "jwt_token", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "oidc_sub": { + "name": "oidc_sub", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_sid": { + "name": "oidc_sid", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_active_at": { + "name": "last_active_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_sessions_user_id": { + "name": "idx_sessions_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + }, + "idx_sessions_expires_at": { + "name": "idx_sessions_expires_at", + "columns": [ + "expires_at" + ], + "isUnique": false + } + }, + "foreignKeys": { + "sessions_user_id_users_id_fk": { + "name": "sessions_user_id_users_id_fk", + "tableFrom": "sessions", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "settings": { + "name": "settings", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "shared_credential_secrets": { + "name": "shared_credential_secrets", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "credential_access_id": { + "name": "credential_access_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'password'" + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text(16384)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text(4096)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_shared_credential_secrets_scope": { + "name": "idx_shared_credential_secrets_scope", + "columns": [ + "credential_access_id", + "target_user_id" + ], + "isUnique": true + }, + "idx_shared_credential_secrets_target": { + "name": "idx_shared_credential_secrets_target", + "columns": [ + "target_user_id", + "credential_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "shared_credential_secrets_target_user_id_users_id_fk": { + "name": "shared_credential_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_credential_secrets_credential_id_ssh_credentials_id_fk": { + "name": "shared_credential_secrets_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_cred_secrets_access_id_fk": { + "name": "shared_cred_secrets_access_id_fk", + "tableFrom": "shared_credential_secrets", + "tableTo": "credential_access", + "columnsFrom": [ + "credential_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "shared_host_auth_overrides": { + "name": "shared_host_auth_overrides", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "shared_host_auth_overrides_host_user_protocol_unique": { + "name": "shared_host_auth_overrides_host_user_protocol_unique", + "columns": [ + "host_id", + "user_id", + "protocol" + ], + "isUnique": true + } + }, + "foreignKeys": { + "shared_host_auth_overrides_host_id_ssh_data_id_fk": { + "name": "shared_host_auth_overrides_host_id_ssh_data_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_user_id_users_id_fk": { + "name": "shared_host_auth_overrides_user_id_users_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_auth_overrides_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_auth_overrides", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "shared_host_secrets": { + "name": "shared_host_secrets", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "host_access_id": { + "name": "host_access_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_user_id": { + "name": "target_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "protocol": { + "name": "protocol", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'ssh'" + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'credential'" + }, + "original_credential_id": { + "name": "original_credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_username": { + "name": "encrypted_username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_auth_type": { + "name": "encrypted_auth_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_password": { + "name": "encrypted_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key": { + "name": "encrypted_key", + "type": "text(16384)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_password": { + "name": "encrypted_key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_key_type": { + "name": "encrypted_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "encrypted_domain": { + "name": "encrypted_domain", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_shared_host_secrets_scope": { + "name": "idx_shared_host_secrets_scope", + "columns": [ + "host_access_id", + "target_user_id", + "protocol" + ], + "isUnique": true + } + }, + "foreignKeys": { + "shared_host_secrets_host_access_id_host_access_id_fk": { + "name": "shared_host_secrets_host_access_id_host_access_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "host_access", + "columnsFrom": [ + "host_access_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_target_user_id_users_id_fk": { + "name": "shared_host_secrets_target_user_id_users_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "users", + "columnsFrom": [ + "target_user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "shared_host_secrets_original_credential_id_ssh_credentials_id_fk": { + "name": "shared_host_secrets_original_credential_id_ssh_credentials_id_fk", + "tableFrom": "shared_host_secrets", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "original_credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ssh_credential_usage": { + "name": "ssh_credential_usage", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "used_at": { + "name": "used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_ssh_credential_usage_credential": { + "name": "idx_ssh_credential_usage_credential", + "columns": [ + "credential_id" + ], + "isUnique": false + }, + "idx_ssh_credential_usage_user": { + "name": "idx_ssh_credential_usage_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_credential_usage_credential_id_ssh_credentials_id_fk": { + "name": "ssh_credential_usage_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_host_id_ssh_data_id_fk": { + "name": "ssh_credential_usage_host_id_ssh_data_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_credential_usage_user_id_users_id_fk": { + "name": "ssh_credential_usage_user_id_users_id_fk", + "tableFrom": "ssh_credential_usage", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ssh_credentials": { + "name": "ssh_credentials", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin": { + "name": "pin", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key": { + "name": "key", + "type": "text(16384)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text(16384)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text(4096)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_password": { + "name": "key_password", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "detected_key_type": { + "name": "detected_key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "cert_public_key": { + "name": "cert_public_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "usage_count": { + "name": "usage_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "ssh_credentials_sync_id_unique": { + "name": "ssh_credentials_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + }, + "idx_ssh_credentials_user_id": { + "name": "idx_ssh_credentials_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_credentials_user_id_users_id_fk": { + "name": "ssh_credentials_user_id_users_id_fk", + "tableFrom": "ssh_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ssh_folders": { + "name": "ssh_folders", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "ssh_folders_sync_id_unique": { + "name": "ssh_folders_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + }, + "idx_ssh_folders_user_id": { + "name": "idx_ssh_folders_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "ssh_folders_user_id_users_id_fk": { + "name": "ssh_folders_user_id_users_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "ssh_folders_credential_id_ssh_credentials_id_fk": { + "name": "ssh_folders_credential_id_ssh_credentials_id_fk", + "tableFrom": "ssh_folders", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "sso_providers": { + "name": "sso_providers", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "display_order": { + "name": "display_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "config": { + "name": "config", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "sync_tombstones": { + "name": "sync_tombstones", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "sync_tombstones_user_id_users_id_fk": { + "name": "sync_tombstones_user_id_users_id_fk", + "tableFrom": "sync_tombstones", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "termix_identities": { + "name": "termix_identities", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "handle": { + "name": "handle", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "termix_identities_user_id_unique": { + "name": "termix_identities_user_id_unique", + "columns": [ + "user_id" + ], + "isUnique": true + }, + "termix_identities_handle_unique": { + "name": "termix_identities_handle_unique", + "columns": [ + "handle" + ], + "isUnique": true + } + }, + "foreignKeys": { + "termix_identities_user_id_users_id_fk": { + "name": "termix_identities_user_id_users_id_fk", + "tableFrom": "termix_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "termix_identity_ca": { + "name": "termix_identity_ca", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "identity_id": { + "name": "identity_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text(4096)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "validity_days": { + "name": "validity_days", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 90 + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "termix_identity_ca_identity_id_unique": { + "name": "termix_identity_ca_identity_id_unique", + "columns": [ + "identity_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "termix_identity_ca_identity_id_termix_identities_id_fk": { + "name": "termix_identity_ca_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_ca_user_id_users_id_fk": { + "name": "termix_identity_ca_user_id_users_id_fk", + "tableFrom": "termix_identity_ca", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "termix_identity_keys": { + "name": "termix_identity_keys", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "identity_id": { + "name": "identity_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "algorithm": { + "name": "algorithm", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "comment": { + "name": "comment", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'manual'" + }, + "credential_id": { + "name": "credential_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "enabled": { + "name": "enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": true + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "termix_identity_keys_identity_id_termix_identities_id_fk": { + "name": "termix_identity_keys_identity_id_termix_identities_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "termix_identities", + "columnsFrom": [ + "identity_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_user_id_users_id_fk": { + "name": "termix_identity_keys_user_id_users_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "termix_identity_keys_credential_id_ssh_credentials_id_fk": { + "name": "termix_identity_keys_credential_id_ssh_credentials_id_fk", + "tableFrom": "termix_identity_keys", + "tableTo": "ssh_credentials", + "columnsFrom": [ + "credential_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "tmux_session_tags": { + "name": "tmux_session_tags", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "session_name": { + "name": "session_name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tag": { + "name": "tag", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "tmux_session_tags_user_id_users_id_fk": { + "name": "tmux_session_tags_user_id_users_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "tmux_session_tags_host_id_ssh_data_id_fk": { + "name": "tmux_session_tags_host_id_ssh_data_id_fk", + "tableFrom": "tmux_session_tags", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "trusted_devices": { + "name": "trusted_devices", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_fingerprint": { + "name": "device_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "device_info": { + "name": "device_info", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_trusted_devices_user_id": { + "name": "idx_trusted_devices_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "trusted_devices_user_id_users_id_fk": { + "name": "trusted_devices_user_id_users_id_fk", + "tableFrom": "trusted_devices", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "ui_preferences": { + "name": "ui_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "data": { + "name": "data", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "ui_preferences_user_id_users_id_fk": { + "name": "ui_preferences_user_id_users_id_fk", + "tableFrom": "ui_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_external_identities": { + "name": "user_external_identities", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_external_identities_provider_subject": { + "name": "idx_user_external_identities_provider_subject", + "columns": [ + "provider_id", + "subject" + ], + "isUnique": true + }, + "idx_user_external_identities_user": { + "name": "idx_user_external_identities_user", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_external_identities_user_id_users_id_fk": { + "name": "user_external_identities_user_id_users_id_fk", + "tableFrom": "user_external_identities", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_open_tabs": { + "name": "user_open_tabs", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_type": { + "name": "tab_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "host_id": { + "name": "host_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "tab_order": { + "name": "tab_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "backend_session_id": { + "name": "backend_session_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_open_tabs_user_id": { + "name": "idx_user_open_tabs_user_id", + "columns": [ + "user_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_open_tabs_user_id_users_id_fk": { + "name": "user_open_tabs_user_id_users_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_open_tabs_host_id_ssh_data_id_fk": { + "name": "user_open_tabs_host_id_ssh_data_id_fk", + "tableFrom": "user_open_tabs", + "tableTo": "ssh_data", + "columnsFrom": [ + "host_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_preferences": { + "name": "user_preferences", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "reopen_tabs_on_login": { + "name": "reopen_tabs_on_login", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "font_size": { + "name": "font_size", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "accent_color": { + "name": "accent_color", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "language": { + "name": "language", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "storage_mode": { + "name": "storage_mode", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "command_autocomplete": { + "name": "command_autocomplete", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "command_palette_enabled": { + "name": "command_palette_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_host_tags": { + "name": "show_host_tags", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "host_tray_on_click": { + "name": "host_tray_on_click", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "pin_app_rail": { + "name": "pin_app_rail", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "expand_app_rail_on_hover": { + "name": "expand_app_rail_on_hover", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "show_pin_app_rail_button": { + "name": "show_pin_app_rail_button", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folders_collapsed": { + "name": "folders_collapsed", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirm_snippet_execution": { + "name": "confirm_snippet_execution", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "disable_update_check": { + "name": "disable_update_check", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "confirm_tab_close": { + "name": "confirm_tab_close", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "hidden_rail_tabs": { + "name": "hidden_rail_tabs", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ai_assistant_enabled": { + "name": "ai_assistant_enabled", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ai_read_only_commands": { + "name": "ai_read_only_commands", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "compact_host_view": { + "name": "compact_host_view", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "status_color_scheme": { + "name": "status_color_scheme", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "custom_themes": { + "name": "custom_themes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "custom_keybindings": { + "name": "custom_keybindings", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_defaults": { + "name": "terminal_defaults", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "rdp_defaults": { + "name": "rdp_defaults", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "terminal_macros": { + "name": "terminal_macros", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": {}, + "foreignKeys": { + "user_preferences_user_id_users_id_fk": { + "name": "user_preferences_user_id_users_id_fk", + "tableFrom": "user_preferences", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_roles": { + "name": "user_roles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "role_id": { + "name": "role_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "granted_by": { + "name": "granted_by", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "granted_at": { + "name": "granted_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_roles_user_role": { + "name": "idx_user_roles_user_role", + "columns": [ + "user_id", + "role_id" + ], + "isUnique": true + }, + "idx_user_roles_role_id": { + "name": "idx_user_roles_role_id", + "columns": [ + "role_id" + ], + "isUnique": false + } + }, + "foreignKeys": { + "user_roles_user_id_users_id_fk": { + "name": "user_roles_user_id_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_role_id_roles_id_fk": { + "name": "user_roles_role_id_roles_id_fk", + "tableFrom": "user_roles", + "tableTo": "roles", + "columnsFrom": [ + "role_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_roles_granted_by_users_id_fk": { + "name": "user_roles_granted_by_users_id_fk", + "tableFrom": "user_roles", + "tableTo": "users", + "columnsFrom": [ + "granted_by" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "user_second_factors": { + "name": "user_second_factors", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "plugin_id": { + "name": "plugin_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "factor_id": { + "name": "factor_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "enrolled_at": { + "name": "enrolled_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "idx_user_second_factors_user_factor": { + "name": "idx_user_second_factors_user_factor", + "columns": [ + "user_id", + "plugin_id", + "factor_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "user_second_factors_user_id_users_id_fk": { + "name": "user_second_factors_user_id_users_id_fk", + "tableFrom": "user_second_factors", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "users": { + "name": "users", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "username": { + "name": "username", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "password_hash": { + "name": "password_hash", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "is_admin": { + "name": "is_admin", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "is_oidc": { + "name": "is_oidc", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "oidc_identifier": { + "name": "oidc_identifier", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "sso_provider_id": { + "name": "sso_provider_id", + "type": "integer", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "issuer_url": { + "name": "issuer_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "authorization_url": { + "name": "authorization_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "token_url": { + "name": "token_url", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "identifier_path": { + "name": "identifier_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "name_path": { + "name": "name_path", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "scopes": { + "name": "scopes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false, + "default": "'openid email profile'" + }, + "totp_secret": { + "name": "totp_secret", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "totp_enabled": { + "name": "totp_enabled", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "totp_backup_codes": { + "name": "totp_backup_codes", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "registered_at": { + "name": "registered_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "donation_modal_dismissed": { + "name": "donation_modal_dismissed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "vault_profiles": { + "name": "vault_profiles", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "folder": { + "name": "folder", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "tags": { + "name": "tags", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "vault_addr": { + "name": "vault_addr", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "vault_namespace": { + "name": "vault_namespace", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_mount": { + "name": "oidc_mount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "oidc_role": { + "name": "oidc_role", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ssh_mount": { + "name": "ssh_mount", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "ssh_role": { + "name": "ssh_role", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "valid_principals": { + "name": "valid_principals", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "key_type": { + "name": "key_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "shared": { + "name": "shared", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "sync_id": { + "name": "sync_id", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "updated_at": { + "name": "updated_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + } + }, + "indexes": { + "vault_profiles_sync_id_unique": { + "name": "vault_profiles_sync_id_unique", + "columns": [ + "sync_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "vault_profiles_user_id_users_id_fk": { + "name": "vault_profiles_user_id_users_id_fk", + "tableFrom": "vault_profiles", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "vault_tokens": { + "name": "vault_tokens", + "columns": { + "id": { + "name": "id", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "profile_id": { + "name": "profile_id", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "ssh_cert": { + "name": "ssh_cert", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "private_key": { + "name": "private_key", + "type": "text(8192)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "expires_at": { + "name": "expires_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "last_used": { + "name": "last_used", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "idx_vault_tokens_user_profile": { + "name": "idx_vault_tokens_user_profile", + "columns": [ + "user_id", + "profile_id" + ], + "isUnique": true + } + }, + "foreignKeys": { + "vault_tokens_user_id_users_id_fk": { + "name": "vault_tokens_user_id_users_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "vault_tokens_profile_id_vault_profiles_id_fk": { + "name": "vault_tokens_profile_id_vault_profiles_id_fk", + "tableFrom": "vault_tokens", + "tableTo": "vault_profiles", + "columnsFrom": [ + "profile_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + }, + "webauthn_credentials": { + "name": "webauthn_credentials", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "public_key": { + "name": "public_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "counter": { + "name": "counter", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": 0 + }, + "device_type": { + "name": "device_type", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "backed_up": { + "name": "backed_up", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": false + }, + "transports": { + "name": "transports", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "user_verification": { + "name": "user_verification", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "'preferred'" + }, + "created_at": { + "name": "created_at", + "type": "text", + "primaryKey": false, + "notNull": true, + "autoincrement": false, + "default": "CURRENT_TIMESTAMP" + }, + "last_used_at": { + "name": "last_used_at", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": {}, + "foreignKeys": { + "webauthn_credentials_user_id_users_id_fk": { + "name": "webauthn_credentials_user_id_users_id_fk", + "tableFrom": "webauthn_credentials", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "checkConstraints": {} + } + }, + "views": {}, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/drizzle/sqlite/meta/_journal.json b/drizzle/sqlite/meta/_journal.json index e5ad7a8a1..2cd3071c9 100644 --- a/drizzle/sqlite/meta/_journal.json +++ b/drizzle/sqlite/meta/_journal.json @@ -239,6 +239,13 @@ "when": 1790189636471, "tag": "0033_careful_random", "breakpoints": true + }, + { + "idx": 34, + "version": "6", + "when": 1790201004314, + "tag": "0034_curious_molecule_man", + "breakpoints": true } ] } \ No newline at end of file diff --git a/electron/main.cjs b/electron/main.cjs index 4f65748b3..498fb696d 100644 --- a/electron/main.cjs +++ b/electron/main.cjs @@ -1024,7 +1024,7 @@ function getBackendPidFilePath() { // Manager) rather than through the normal quit flow, will-quit never fires // and stopBackendServer() never runs -- the forked backend child is a // genuinely separate OS process on Windows/mac/Linux, so it keeps running -// and holding every port the backend binds (30001, 30003, 30004, 30006, +// and holding every port the backend binds (30001, 30004, 30006, // 30010-30012). Every subsequent launch's own backend then fails outright // with EADDRINUSE and the app is stuck until something manually kills the // orphan. Reap any such leftover process, identified by PID file, before @@ -2031,7 +2031,7 @@ function getC2SRelayUrl() { } const base = serverUrl.replace(/\/$/, ""); - const relayHttpUrl = `${base}/ssh/tunnel/c2s/stream`; + const relayHttpUrl = `${base}/plugin-ws/tunnels/c2s/stream`; return relayHttpUrl.replace(/^http:/, "ws:").replace(/^https:/, "wss:"); } @@ -2062,7 +2062,9 @@ function isC2SAuthError(message) { value === "missing authentication token" || value === "invalid token" || value === "session expired" || - value === "session not found" + value === "session not found" || + // The plugin relay refuses an unauthenticated upgrade before any message. + value === "unexpected server response: 401" ); } diff --git a/package-lock.json b/package-lock.json index 2d70a1cf3..c0791ecaf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6989,6 +6989,10 @@ "resolved": "plugins/docker", "link": true }, + "node_modules/@termix-plugin/file-manager": { + "resolved": "plugins/file-manager", + "link": true + }, "node_modules/@termix-plugin/fleets": { "resolved": "plugins/fleets", "link": true @@ -7021,6 +7025,10 @@ "resolved": "plugins/tailscale", "link": true }, + "node_modules/@termix-plugin/tunnels": { + "resolved": "plugins/tunnels", + "link": true + }, "node_modules/@termix-plugin/web-endpoint": { "resolved": "plugins/web-endpoint", "link": true @@ -18509,11 +18517,15 @@ "termix-plugin": "cli/index.mjs" }, "peerDependencies": { - "drizzle-orm": "*" + "drizzle-orm": "*", + "ssh2": "*" }, "peerDependenciesMeta": { "drizzle-orm": { "optional": true + }, + "ssh2": { + "optional": true } } }, @@ -18538,6 +18550,13 @@ "@termix/plugin-sdk": "*" } }, + "plugins/file-manager": { + "name": "@termix-plugin/file-manager", + "version": "1.0.0", + "devDependencies": { + "@termix/plugin-sdk": "*" + } + }, "plugins/fleets": { "name": "@termix-plugin/fleets", "version": "1.0.0", @@ -18598,6 +18617,13 @@ "@termix/plugin-sdk": "*" } }, + "plugins/tunnels": { + "name": "@termix-plugin/tunnels", + "version": "1.0.0", + "devDependencies": { + "@termix/plugin-sdk": "*" + } + }, "plugins/web-endpoint": { "name": "@termix-plugin/web-endpoint", "version": "1.0.0", diff --git a/packages/plugin-sdk/ARCHITECTURE.md b/packages/plugin-sdk/ARCHITECTURE.md index 3cbc75a30..92b5fa92d 100644 --- a/packages/plugin-sdk/ARCHITECTURE.md +++ b/packages/plugin-sdk/ARCHITECTURE.md @@ -433,7 +433,10 @@ and `session.remoteDisplay`. `host-metrics.managers` (component slot, **B3**) is host-metrics's own: tailscale contributes its manager card there instead of host-metrics knowing tailscale exists, and host-metrics works with or without tailscale enabled. Cross-plugin frontend calls go through actions: -`automations.list`, `fleets.list`, `session.remoteDisplay.token`. +`automations.list`, `fleets.list`, `session.remoteDisplay.token`. Core calls +plugin actions the same way when a core view shows a plugin's data: +`files.openHost`, and **B7**'s `tunnels.statuses` and `tunnels.open` behind the +dashboard's active tunnel counter, which reads as zero while tunnels is off. **B2** added a live-terminal-session surface, for a plugin that needs to push resolved text into an open SSH session rather than just fill a slot with a @@ -499,6 +502,15 @@ the caller. The workspaces plugin provides `workspaces.saved` (`list()`), which the AI assistant's `list_workspaces` tool reaches through an optional entry in its `requires`, answering `unavailable: true` while workspaces is off. +**B7**'s `tunnels.access` is the first service with a hard consumer: +web-endpoint lists tunnels in `dependencies` and a non-optional `requires`, +because its tunnel endpoints cannot work without it, while automations keeps +it optional for its one tunnel step. `forward()` resolves only once the +forward is listening and the target answered a probe, so a caller never has +to poll the plugin's state. A plugin can also listen for another plugin's +`plugin..*` events without any capability: automations turns +`plugin.tunnels.tunnel_disconnected` into its `tunnel_disconnected` trigger. + ### 10. Lifecycle `activate(ctx)` creates all state. Everything registered through `ctx` or `app` @@ -1076,6 +1088,13 @@ connect pipeline instead of importing ssh2 helpers from core: since the file-manager plugin's interactive connect route and its dedicated transfer sessions both need their own keepalive/timeout defaults rather than falling back to the generic `"plugin"` purpose. +- **B7** added `sock` to the connect options: an already-open stream to the + host, such as a `forwardOut` channel through another host. `connect` then + skips the transport step (port knocking, proxy, jump hosts, DNS) and runs + the host key check and auth over that stream. The tunnels plugin opens the + endpoint leg of a source-to-endpoint tunnel this way, so both legs go + through the pipeline; before B7 tunnels built their own ssh2 `Client` and + never checked host keys at all. Each new connection is audited and runs as the current actor; pooled reuse is not. Connections and pool entries are closed on deactivate. @@ -1644,10 +1663,12 @@ Known specifics: degrade silently when automations is absent, so host-metrics declares it as an `optionalDependency` (added in A2; it previously declared nothing, and the loader had no reason to order the two). -- Core feature servers that are not plugins yet still own ports: tunnel 30003, - dashboard 30006, tmux 30010, serial 30011 and homepage 30012. Each keeps its - nginx block until its own Phase B step. No plugin owns a port any more (A4). - **B6** moved file-manager off port 30004 onto `/plugin-api/file-manager/`. +- Core feature servers that are not plugins yet still own ports: dashboard + 30006, tmux 30010, serial 30011 and homepage 30012. Each keeps its nginx + block until its own Phase B step. No plugin owns a port any more (A4). + **B6** moved file-manager off port 30004 onto `/plugin-api/file-manager/`, + and **B7** moved tunnels off port 30003 onto `/plugin-api/tunnels/` and + `/plugin-ws/tunnels/c2s/stream`. - The terminal component and `TerminalTabContent` stay in core until the terminal's Phase B step (session manager, split view). ssh-terminal registers them through the legacy alias; **B6** switched every core caller diff --git a/packages/plugin-sdk/FINISH-LIST.md b/packages/plugin-sdk/FINISH-LIST.md index 437197248..3a90ac619 100644 --- a/packages/plugin-sdk/FINISH-LIST.md +++ b/packages/plugin-sdk/FINISH-LIST.md @@ -80,3 +80,33 @@ build`'s esbuild step has no static-asset-copy pipeline the way core's Vite dialect, `schema:generate`) is real, separate work this step didn't attempt, since none of those reads block the plugin conversion itself. Owner: a dedicated follow-up step, or D0. +- **B7 (tunnels):** `enable_tunnel` and `tunnel_connections` are still live + `ssh_data` columns; only the copy-into-plugin-settings migration shipped + (`tunnels-settings-migration.ts`), and the plugin reads its host settings + now. Core still carries the columns through the host routes, the + encrypt/decrypt round trip, `SidebarTree.tsx`'s host duplicate payload, the + quick-connect mapping and the `Host`/`SSHHost` types, none of which the + plugin reads any more. Dropping them in lockstep (`schema.ts`, `db/index.ts`, + a drizzle migration per dialect, `schema:generate`) is the same follow-up the + B6 file-manager line above describes. Owner: a dedicated follow-up step, or D0. +- **B7 (tunnels):** host export/import, host duplicate, the Hosts panel + feature filter and the bulk enable/disable menu all work off `ssh_data` + columns, so none of them can see a plugin's host settings. For tunnels the + "Tunnel" filter and the bulk enable/disable entries were removed, and the + export's "Tunnels" group became "Proxy" (SOCKS5 fields only) since + `tunnelConnections` there is now stale. Bringing these back needs a way for + core to read and write host-scope plugin settings generically (keyed off + `contributes.settings.host` or `hostCapability`) rather than per column. + Owner: D1. +- **B7 (tunnels):** the tunnel tab no longer writes a recent-activity entry: + `logActivity` is a core `@/main-axios` call and the plugin imports nothing + from `@/`. Old "tunnel" entries still reopen the tab through the plugin's + `activityTypes`. An `app.logActivity` (or equivalent bridge member) would + restore it for this plugin and let docker, file-manager and host-metrics drop + their own `@/main-axios` import for it too. Owner: D1. +- **B7 (tunnels):** on the desktop app, tunnel statuses from a connected + remote server are no longer merged into the tab: the old code polled the + remote tunnel service through `getRemoteTunnelApi()`, and the SDK has no + remote-origin plugin API client. `subscribeTunnelStatuses` already takes a + `fetchRemote` and merges with local statuses winning, so it only needs a + client for `/plugin-api/tunnels/status` on the remote server. Owner: D1. diff --git a/packages/plugin-sdk/src/backend.ts b/packages/plugin-sdk/src/backend.ts index d48ef7ede..5fff6b7c2 100644 --- a/packages/plugin-sdk/src/backend.ts +++ b/packages/plugin-sdk/src/backend.ts @@ -661,6 +661,12 @@ export interface PluginSshConnectOptions { prompt?: PluginSshPromptChannel; /** Config fields to force, e.g. a longer readyTimeout. */ overrides?: Record; + /** + * An already-open stream to the host, such as a forwardOut channel through + * another host. The transport step is skipped: no port knocking, proxy, + * jump hosts or DNS lookup. Host key checks and auth still run. + */ + sock?: unknown; } export interface PluginSshConnection { diff --git a/packages/plugin-sdk/src/testing.ts b/packages/plugin-sdk/src/testing.ts index cd7e48d7f..84dc077e4 100644 --- a/packages/plugin-sdk/src/testing.ts +++ b/packages/plugin-sdk/src/testing.ts @@ -22,6 +22,7 @@ import type { PluginLoginMethod, PluginSecondFactor, PluginSshAuthProvider, + PluginSshConnectOptions, PluginSshHost, PluginHostSummary, PluginHostRecord, @@ -94,7 +95,11 @@ export interface FakePluginContext { /** Core settings readable through ctx.settings.readCore. */ coreSettings: Map; /** Every ctx.ssh.connect and withConnection call, in order. */ - sshConnections: Array<{ host: number | PluginSshHost; pool?: string }>; + sshConnections: Array<{ + host: number | PluginSshHost; + pool?: string; + options?: PluginSshConnectOptions; + }>; /** Every ctx.hosts.share call, in order. */ hostShares: Array<{ hostId: number; @@ -467,8 +472,8 @@ export function createFakeContext( }, ssh: { - connect: async (host) => { - sshConnections.push({ host }); + connect: async (host, connectOptions) => { + sshConnections.push({ host, options: connectOptions }); return { client: sshClient as never, jumpClient: null, diff --git a/plugins/automations/manifest.json b/plugins/automations/manifest.json index 93fad7079..1ac744966 100644 --- a/plugins/automations/manifest.json +++ b/plugins/automations/manifest.json @@ -28,7 +28,8 @@ ], "optionalDependencies": { "snippets": "^1.0.0", - "fleets": "^1.0.0" + "fleets": "^1.0.0", + "tunnels": "^1.0.0" }, "requires": [ { @@ -40,6 +41,11 @@ "service": "fleets.access", "versionRange": "^1.0.0", "optional": true + }, + { + "service": "tunnels.access", + "versionRange": "^1.0.0", + "optional": true } ], "contributes": { diff --git a/plugins/automations/src/backend/actions/index.ts b/plugins/automations/src/backend/actions/index.ts index aeecbbcf6..4b25c8f35 100644 --- a/plugins/automations/src/backend/actions/index.ts +++ b/plugins/automations/src/backend/actions/index.ts @@ -10,6 +10,7 @@ import { import { withSshConnection } from "../ssh.js"; import { createCurrentNotificationChannelRepository } from "../../../../../src/backend/database/repositories/factory.js"; import { getSnippet, resolveSnippetCommandFor } from "../snippets.js"; +import { runTunnelAction } from "../tunnels.js"; import { sendAutomationNotification } from "../notify.js"; import { automationFetch } from "../http.js"; import { renderRecord, renderTemplate } from "../template.js"; @@ -241,25 +242,15 @@ async function runTunnel( const name = renderTemplate(step.tunnelName, context.template); if (context.dryRun) return ok(`Would ${step.action} tunnel ${name}`); - try { - const manager = - await import("../../../../../src/backend/hosts/tunnel/manager.js"); - const config = manager.tunnelConfigs?.get(name); - if (!config) return fail(`Tunnel "${name}" is not configured`); - - if (step.action === "connect") { - await manager.connectSSHTunnel(config); - return ok(`Tunnel ${name} connected`); - } - - // shouldRetry false, otherwise the manager immediately reconnects the - // tunnel the automation just asked it to drop. - manager.manualDisconnects.add(name); - await manager.handleDisconnect(name, config, false); - return ok(`Tunnel ${name} disconnected`); - } catch (error) { - return fail(error instanceof Error ? error.message : String(error)); - } + // A disconnect goes through the tunnels plugin's manual stop, which also + // holds off its retries, so the tunnel stays down. + const result = await runTunnelAction(context.userId, step.action, name); + if (!result.ok) return fail(result.error); + return ok( + step.action === "connect" + ? `Tunnel ${name} connected` + : `Tunnel ${name} disconnected`, + ); } async function runWol( diff --git a/plugins/automations/src/backend/index.ts b/plugins/automations/src/backend/index.ts index ef67ba29f..cd827e220 100644 --- a/plugins/automations/src/backend/index.ts +++ b/plugins/automations/src/backend/index.ts @@ -1,17 +1,48 @@ import type { PluginContext } from "@termix/plugin-sdk/backend"; import { setPluginSsh } from "./ssh.js"; import { setPluginServices } from "./snippets.js"; +import { setTunnelServices } from "./tunnels.js"; import { startAutomationsService, stopAutomationsService } from "./routes.js"; import { startAutomationScheduler, stopAutomationScheduler, } from "./scheduler.js"; +import { onInternalEvent } from "./triggers.js"; + +/** What the tunnels plugin emits when a tunnel drops without being asked to. */ +interface TunnelDisconnectedEvent { + userId?: string; + hostId?: number; + tunnelName?: string; +} export async function activate(ctx: PluginContext) { setPluginSsh(ctx.ssh); ctx.disposables.add(() => setPluginSsh(null)); setPluginServices(ctx.services); ctx.disposables.add(() => setPluginServices(null)); + setTunnelServices(ctx.services); + ctx.disposables.add(() => setTunnelServices(null)); + + // Nothing arrives here while the tunnels plugin is off, which is the whole + // of the optional dependency. + ctx.events.on("plugin.tunnels.tunnel_disconnected", (payload) => { + const event = payload as TunnelDisconnectedEvent; + if (!event?.userId) return; + void onInternalEvent({ + event: "tunnel_disconnected", + userId: event.userId, + hostId: event.hostId, + details: { tunnelName: event.tunnelName }, + }).catch((error: unknown) => { + ctx.log.warn( + `Tunnel disconnect trigger failed: ${ + error instanceof Error ? error.message : String(error) + }`, + ); + }); + }); + startAutomationsService( // The webhook route authenticates on its own per-automation token rather // than a session, which is the point of an inbound webhook. diff --git a/plugins/automations/src/backend/tunnels.ts b/plugins/automations/src/backend/tunnels.ts new file mode 100644 index 000000000..1716edcdb --- /dev/null +++ b/plugins/automations/src/backend/tunnels.ts @@ -0,0 +1,63 @@ +import type { PluginServices } from "@termix/plugin-sdk/backend"; + +let current: PluginServices | null = null; + +/** Set in activate, cleared on deactivate. */ +export function setTunnelServices(services: PluginServices | null): void { + current = services; +} + +/** The tunnels plugin, as ctx.services.get("tunnels.access") returns it. */ +interface TunnelsAccess { + start: (name: string) => Promise; + stop: (name: string) => Promise; +} + +export interface TunnelActionResult { + ok: boolean; + /** True when the tunnels plugin is off or the user may not use it. */ + unavailable?: boolean; + error?: string; +} + +/** + * Connects or disconnects a saved tunnel as userId. Optional: without the + * tunnels plugin the step fails with a clear message rather than the plugin + * failing to activate. + */ +export async function runTunnelAction( + userId: string, + action: "connect" | "disconnect", + name: string, +): Promise { + if (!current) { + return { + ok: false, + unavailable: true, + error: "The tunnels plugin is not available", + }; + } + + let tunnels: TunnelsAccess; + try { + tunnels = current.get("tunnels.access", { userId }); + } catch { + return { + ok: false, + unavailable: true, + error: "The tunnels plugin is not available", + }; + } + + try { + if (action === "connect") await tunnels.start(name); + else await tunnels.stop(name); + return { ok: true }; + } catch (error) { + return { + ok: false, + unavailable: false, + error: error instanceof Error ? error.message : String(error), + }; + } +} diff --git a/plugins/automations/tests/backend/tunnels.test.ts b/plugins/automations/tests/backend/tunnels.test.ts new file mode 100644 index 000000000..a5715c3ef --- /dev/null +++ b/plugins/automations/tests/backend/tunnels.test.ts @@ -0,0 +1,90 @@ +import { afterEach, describe, expect, it, vi } from "vitest"; +import { createFakeContext } from "@termix/plugin-sdk/testing"; + +vi.mock("../../../../src/backend/database/repositories/factory.js", () => ({ + createCurrentNotificationChannelRepository: vi.fn(), +})); + +const { setTunnelServices } = await import("../../src/backend/tunnels.js"); +const { executeStep } = await import("../../src/backend/actions/index.js"); + +afterEach(() => { + setTunnelServices(null); +}); + +function context(dryRun = false) { + return { + userId: "user-1", + automationId: 1, + runId: 1, + dryRun, + template: {}, + } as never; +} + +const step = (action: "connect" | "disconnect") => + ({ + id: "s1", + type: "tunnel", + action, + tunnelName: "7::0::web::8080::db::5432", + }) as never; + +describe("the tunnel step", () => { + it("starts and stops the tunnel through tunnels.access as the automation's owner", async () => { + const fake = createFakeContext({ pluginId: "automations" }); + const tunnels = { + start: vi.fn(async () => undefined), + stop: vi.fn(async () => undefined), + }; + fake.ctx.services.provide("tunnels.access", tunnels); + const get = vi.spyOn(fake.ctx.services, "get"); + setTunnelServices(fake.ctx.services); + + const connected = await executeStep(step("connect"), context()); + expect(connected.success).toBe(true); + expect(tunnels.start).toHaveBeenCalledWith("7::0::web::8080::db::5432"); + expect(get).toHaveBeenCalledWith("tunnels.access", { userId: "user-1" }); + + const stopped = await executeStep(step("disconnect"), context()); + expect(stopped.success).toBe(true); + expect(tunnels.stop).toHaveBeenCalledWith("7::0::web::8080::db::5432"); + }); + + it("reports the tunnel plugin's own error", async () => { + const fake = createFakeContext({ pluginId: "automations" }); + fake.ctx.services.provide("tunnels.access", { + start: vi.fn(async () => { + throw new Error('Tunnel "x" is not configured'); + }), + stop: vi.fn(), + }); + setTunnelServices(fake.ctx.services); + + const result = await executeStep(step("connect"), context()); + expect(result.success).toBe(false); + expect(result.error ?? result.output).toMatch(/not configured/); + }); + + it("fails the step cleanly while the tunnels plugin is off", async () => { + // No provider: the optional dependency is missing. + setTunnelServices( + createFakeContext({ pluginId: "automations" }).ctx.services, + ); + const withoutProvider = await executeStep(step("connect"), context()); + expect(withoutProvider.success).toBe(false); + expect(withoutProvider.error ?? withoutProvider.output).toMatch( + /tunnels plugin is not available/, + ); + + setTunnelServices(null); + const inactive = await executeStep(step("disconnect"), context()); + expect(inactive.success).toBe(false); + }); + + it("only describes what it would do on a dry run", async () => { + const result = await executeStep(step("connect"), context(true)); + expect(result.success).toBe(true); + expect(result.output).toMatch(/Would connect tunnel/); + }); +}); diff --git a/plugins/tunnels/CHANGELOG.md b/plugins/tunnels/CHANGELOG.md new file mode 100644 index 000000000..52c146013 --- /dev/null +++ b/plugins/tunnels/CHANGELOG.md @@ -0,0 +1,18 @@ +# Changelog + +## 1.0.0 + +Bundled with Termix 2.9.0. + +- Tunnels moved out of core's own server on port 30003 and now serve under + `/plugin-api/tunnels` and `/plugin-ws/tunnels`. +- Both SSH legs of a tunnel now go through core's connect pipeline, so a host + with an unknown or changed host key is refused the same way every other + connection refuses it. +- Owns its data: core's `c2s_tunnel_presets` table is renamed to + `p_tunnels_presets` on first activation, and each host's tunnel switch and + saved tunnels move into this plugin's host settings. +- New `tunnels.use` permission, given to the admin and user roles. +- Offers `tunnels.access` to other plugins, used by web-endpoint and + automations. A tunnel that drops on its own emits + `plugin.tunnels.tunnel_disconnected`. diff --git a/plugins/tunnels/README.md b/plugins/tunnels/README.md new file mode 100644 index 000000000..330c4f17f --- /dev/null +++ b/plugins/tunnels/README.md @@ -0,0 +1,44 @@ +# Tunnels + +SSH port forwarding between servers, and client tunnels from the desktop app. + +Bundled with Termix and enabled by default. It imports only +`@termix/plugin-sdk`. + +## What it does + +- **Server tunnels**: local, remote and dynamic (SOCKS5) forwards saved on a + host, started from the Tunnels tab, the host editor or at boot when marked + auto-start. A tunnel either rides the source host's connection alone, or + opens a second SSH leg to a Termix endpoint host through a channel on the + source connection. +- **Client tunnels**: the desktop app listens locally and relays each + connection over `/plugin-ws/tunnels/c2s/stream`; presets of that list are + saved per user. +- **`tunnels.access`**: a service other plugins call. `forward()` opens an + on-demand forward and resolves once it works (web-endpoint uses it); + `start`/`stop`/`status`/`list` work on saved tunnels by name (automations). + +Both SSH legs go through `ctx.ssh.connect`, so tunnels get host key checks, +auth providers, proxies and jump hosts like every other transport. The +endpoint leg passes its forwardOut channel as `sock`. + +## Layout + + manifest.json id, capabilities and what this plugin contributes + src/backend/ activate(ctx), the tunnel manager, routes, relay, service + src/shared/ types and tunnel naming used by both bundles + migrations/ one .sql per dialect, generated from src/backend/tables.ts + src/frontend/ the tab, host editor section, rail panel and widget + locales/en.json its strings (English only; the rest are translated) + tests/backend/ vitest, node + tests/frontend/ vitest, jsdom + +## Data + +- `p_tunnels_presets`, adopted from core's `c2s_tunnel_presets`. +- Host settings `enableTunnel` and `tunnelConnections`, copied from the + `ssh_data` columns of the same names by core's + `tunnels-settings-migration.ts`. + +See packages/plugin-sdk/ARCHITECTURE.md for the contract this follows. diff --git a/plugins/tunnels/locales/en.json b/plugins/tunnels/locales/en.json new file mode 100644 index 000000000..4ca4a459f --- /dev/null +++ b/plugins/tunnels/locales/en.json @@ -0,0 +1,159 @@ +{ + "hosts": { + "addTunnelBtn": "Add Tunnel", + "autoStartDesc": "Automatically connect this tunnel when the host is loaded", + "autoStartLabel": "Auto-start", + "connectBtn": "Connect", + "disconnectBtn": "Disconnect", + "enableTunneling": "Enable Tunneling", + "enableTunnelingDesc": "Enable SSH tunnel functionality for this host", + "endpointHost": "Endpoint Host", + "endpointHostPlaceholder": "Same host, SSH host, or reachable host/IP", + "endpointPort": "Endpoint Port", + "failedToConnectTunnel": "Failed to connect", + "failedToDisconnectTunnel": "Failed to disconnect", + "maxRetries": "Max Retries", + "noTunnelsConfigured": "No tunnels configured.", + "retryIntervalS": "Retry Interval (s)", + "serverTunnelsSection": "Server Tunnels", + "sourcePort": "Source Port", + "tabTunnels": "Tunnels", + "tunnelConnecting": "Tunnel connecting...", + "tunnelDisconnected": "Tunnel disconnected", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Create a SOCKS5 proxy on a local port for dynamic port forwarding.", + "tunnelModeLocalDesc": "Forward a local port to a port on the remote server (or a host reachable from it).", + "tunnelModeRemoteDesc": "Forward a port on the remote server back to a local port on your machine.", + "tunnelRequirementsText": "The SSH server must have GatewayPorts yes, AllowTcpForwarding yes, and PermitRootLogin yes set in /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnel Settings", + "tunnelType": "Tunnel Type" + }, + "nav": { + "portForwarding": "Forwarding", + "tunnels": "Tunnels" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (listen locally)", + "localTargetHost": "127.0.0.1 (target on this computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (listen on endpoint)", + "remoteTargetHost": "127.0.0.1 (target from endpoint)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS listener)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} local client tunnel(s) configured on this desktop.", + "c2sLoadPreset": "Load", + "c2sNoPresetSelected": "No preset selected", + "c2sNoPresets": "No presets saved", + "c2sPresetDeleted": "Client tunnel preset deleted", + "c2sPresetLoadError": "Failed to load client tunnel presets", + "c2sPresetLoaded": "Client tunnel preset loaded locally", + "c2sPresetName": "Preset Name", + "c2sPresetNamePlaceholder": "Client preset name", + "c2sPresetRenamed": "Client tunnel preset renamed", + "c2sPresetSaved": "Client tunnel preset saved", + "c2sPresetSyncNote": "Presets are explicit snapshots; loading one replaces this desktop client's local client tunnel list.", + "c2sPresetToLoad": "Preset To Load", + "c2sTunnelPresets": "Client Tunnel Presets", + "c2sTunnelPresetsUnavailable": "Client tunnel presets are only available in the desktop client.", + "c2sPresetRenameError": "Failed to rename the preset", + "c2sPresetDeleteError": "Failed to delete the preset" + }, + "tunnels": { + "attempt": "Attempt {{current}} of {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Auto Start", + "cancel": "Cancel", + "canceling": "Canceling...", + "clientAutoStartDesc": "Starts when this desktop client opens and stays connected.", + "clientManualStartDesc": "Use Start and Stop from this row. Termix will not open it automatically.", + "clientRemoteServerNote": "Remote forwarding may require AllowTcpForwarding and GatewayPorts on the endpoint SSH server. The remote port closes when this desktop disconnects.", + "clientTunnelStarted": "Client tunnel started", + "clientTunnelStopped": "Client tunnel stopped", + "clientTunnels": "Client Tunnels", + "connected": "Connected", + "connecting": "Connecting...", + "createFirstTunnelMessage": "You haven't created any SSH tunnels yet. Configure tunnel connections in the Host Manager to get started.", + "currentHostPort": "Current Host Port", + "destination": "Destination", + "destinationAddress": "Destination Address", + "destinationPort": "Destination Port", + "disconnected": "Disconnected", + "duplicateAutoStartBind": "Only one auto-start client tunnel can use {{bind}}.", + "endpointPort": "Endpoint Port", + "endpointSshHost": "Endpoint SSH Host", + "endpointSshHostPlaceholder": "Select a configured host", + "endpointSshHostRequired": "Select an endpoint SSH host for each client tunnel.", + "error": "Error", + "forwardDescriptionClientDynamic": "SOCKS on local port {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → remote {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remote {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS on current host {{sourcePort}}.", + "forwardDescriptionServerLocal": "Current host {{sourcePort}} → endpoint {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endpoint {{endpointPort}} → current host {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Intermediate Host", + "invalidBindIp": "Local IP must be a valid IPv4 address.", + "invalidEndpointPort": "Endpoint port must be between 1 and 65535.", + "invalidLocalPort": "Local port must be between 1 and 65535.", + "invalidLocalTargetIp": "Local target IP must be a valid IPv4 address.", + "invalidLocalTargetPort": "Local target port must be between 1 and 65535.", + "invalidRemoteAddress": "Remote address is required.", + "invalidRemotePort": "Remote port must be between 1 and 65535.", + "lastError": "Last error", + "lastStarted": "Last started", + "lastTested": "Last tested", + "localAddress": "Local Address", + "localPort": "Local Port", + "localSaveError": "Failed to save local client tunnels", + "localSaved": "Client tunnels saved", + "manualControlError": "Failed to update tunnel state.", + "maxRetries": "Max Retries", + "mode": "Mode", + "nextRetryIn": "Next retry in {{seconds}} seconds", + "noClientTunnels": "No client tunnels configured on this desktop.", + "noHostSelected": "No host selected", + "noSshTunnels": "No SSH Tunnels", + "port": "Port", + "remoteBindAddress": "Remote Bind Address", + "remoteHost": "Remote Host", + "remotePort": "Remote Port", + "retryInterval": "Retry Interval (seconds)", + "route": "Route:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Tunnel Name", + "tunnelTestFailed": "Tunnel test failed", + "tunnelTestSucceeded": "Tunnel test succeeded", + "type": "Tunnel Type", + "typeDynamic": "Dynamic (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Remote (-R)", + "working": "Working...", + "activeCount": "{{connected}}/{{total}} active", + "listensOn": "Bound to localhost:{{port}}", + "socksProxy": "SOCKS5 proxy", + "waiting": "Waiting", + "remoteSessionExpired": "Remote Sync session expired. Reconnect Remote Sync and try again." + }, + "permissions": { + "use": { + "title": "Use tunnels", + "description": "Start, stop and watch SSH tunnels, and save client tunnel presets." + } + }, + "settings": { + "host": { + "enable": { + "label": "Enable tunnels" + } + } + } +} diff --git a/plugins/tunnels/locales/translated/af_ZA.json b/plugins/tunnels/locales/translated/af_ZA.json new file mode 100644 index 000000000..95d9bd530 --- /dev/null +++ b/plugins/tunnels/locales/translated/af_ZA.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Voeg tonnel by", + "autoStartDesc": "Koppel outomaties hierdie tonnel wanneer die gasheer gelaai is", + "autoStartLabel": "Outomatiese begin", + "connectBtn": "Verbind", + "disconnectBtn": "Ontkoppel", + "enableTunneling": "Aktiveer Tonnelbou", + "enableTunnelingDesc": "Aktiveer SSH-tonnelfunksionaliteit vir hierdie gasheer", + "endpointHost": "Eindpuntgasheer", + "endpointHostPlaceholder": "Dieselfde gasheer, SSH-gasheer of bereikbare gasheer/IP", + "endpointPort": "Eindpuntpoort", + "failedToConnectTunnel": "Kon nie koppel nie", + "failedToDisconnectTunnel": "Kon nie ontkoppel nie", + "maxRetries": "Maksimum herprobeer", + "noTunnelsConfigured": "Geen tonnels gekonfigureer nie.", + "retryIntervalS": "Herprobeerinterval (s)", + "serverTunnelsSection": "Bedienertonnels", + "sourcePort": "Bronpoort", + "tabTunnels": "Tonnels", + "tunnelConnecting": "Tonnel verbind...", + "tunnelDisconnected": "Tonnel ontkoppel", + "tunnelLabel": "Tonnel {{number}}", + "tunnelModeDynamicDesc": "Skep 'n SOCKS5-instaanbediener op 'n plaaslike poort vir dinamiese poortaanstuuring.", + "tunnelModeLocalDesc": "Stuur 'n plaaslike poort aan na 'n poort op die afstandbediener (of 'n gasheer wat daarvandaan bereik kan word).", + "tunnelModeRemoteDesc": "Stuur 'n poort op die afgeleë bediener terug na 'n plaaslike poort op jou masjien.", + "tunnelRequirementsText": "Die SSH-bediener moet GatewayPorts ja, AllowTcpForwarding ja, en PermitRootLogin ja gestel hê in /etc/ssh/sshd_config.", + "tunnelSettings": "Tonnelinstellings", + "tunnelType": "Tonnel Tipe" + }, + "nav": { + "portForwarding": "Aanstuur", + "tunnels": "Tonnels" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (luister plaaslik)", + "localTargetHost": "127.0.0.1 (teiken op hierdie rekenaar)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (luister op eindpunt)", + "remoteTargetHost": "127.0.0.1 (teiken vanaf eindpunt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-luisteraar)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} plaaslike kliënttonnel(s) gekonfigureer op hierdie lessenaar.", + "c2sLoadPreset": "Laai", + "c2sNoPresetSelected": "Geen voorafinstelling gekies nie", + "c2sNoPresets": "Geen voorinstellings gestoor nie", + "c2sPresetDeleted": "Kliënttonnel-voorinstelling verwyder", + "c2sPresetLoadError": "Kon nie kliënttonnelvoorinstellings laai nie", + "c2sPresetLoaded": "Kliënttonnelvoorinstelling plaaslik gelaai", + "c2sPresetName": "Voorafingestelde Naam", + "c2sPresetNamePlaceholder": "Kliëntvooringestelde naam", + "c2sPresetRenamed": "Kliënttonnel-voorinstelling hernoem", + "c2sPresetSaved": "Kliënttonnelvoorinstelling gestoor", + "c2sPresetSyncNote": "Voorinstellings is eksplisiete kiekies; die laai van een vervang hierdie lessenaarkliënt se plaaslike kliënttonnellys.", + "c2sPresetToLoad": "Voorafinstelling om te laai", + "c2sTunnelPresets": "Kliënttonnelvoorinstellings", + "c2sTunnelPresetsUnavailable": "Kliënttunnelvoorinstellings is slegs beskikbaar in die rekenaarkliënt." + }, + "tunnels": { + "attempt": "Poging {{current}} van {{max}}", + "autoNameClientDynamic": "SOKKIES {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Plaaslik {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → plaaslik {{localPort}}", + "autoStart": "Outomatiese Begin", + "cancel": "Kanselleer", + "canceling": "Kanselleer tans...", + "clientAutoStartDesc": "Begin wanneer hierdie rekenaarkliënt oopmaak en gekoppel bly.", + "clientManualStartDesc": "Gebruik Begin en Stop vanaf hierdie ry. Termix sal dit nie outomaties oopmaak nie.", + "clientRemoteServerNote": "Afstandsaanstuuring mag AllowTcpForwarding en GatewayPorts op die eindpunt SSH-bediener vereis. Die afstandspoort sluit wanneer hierdie lessenaar ontkoppel.", + "clientTunnelStarted": "Kliënttonnel het begin", + "clientTunnelStopped": "Kliënttonnel gestop", + "clientTunnels": "Kliënttonnels", + "connected": "Verbonde", + "connecting": "Verbind...", + "createFirstTunnelMessage": "Jy het nog geen SSH-tonnels geskep nie. Konfigureer tonnelverbindings in die Gasheerbestuurder om te begin.", + "currentHostPort": "Huidige gasheerpoort", + "destination": "Bestemming", + "destinationAddress": "Bestemmingsadres", + "destinationPort": "Bestemmingshawe", + "disconnected": "Ontkoppel", + "duplicateAutoStartBind": "Slegs een outomatiese begin-kliënttonnel kan {{bind}} gebruik.", + "endpointPort": "Eindpuntpoort", + "endpointSshHost": "Eindpunt SSH-gasheer", + "endpointSshHostPlaceholder": "Kies 'n gekonfigureerde gasheer", + "endpointSshHostRequired": "Kies 'n eindpunt SSH-gasheer vir elke kliënttunnel.", + "error": "Fout", + "forwardDescriptionClientDynamic": "SOCKS op plaaslike poort {{sourcePort}}.", + "forwardDescriptionClientLocal": "Plaaslik {{sourcePort}} → afgeleë {{endpointPort}}.", + "forwardDescriptionClientRemote": "Afstand {{sourcePort}} → plaaslik {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS op huidige gasheer {{sourcePort}}.", + "forwardDescriptionServerLocal": "Huidige gasheer {{sourcePort}} → eindpunt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Eindpunt {{endpointPort}} → huidige gasheer {{sourcePort}}.", + "host": "Gasheer", + "intermediateHost": "Intermediêre gasheer", + "invalidBindIp": "Plaaslike IP moet 'n geldige IPv4-adres wees.", + "invalidEndpointPort": "Eindpuntpoort moet tussen 1 en 65535 wees.", + "invalidLocalPort": "Plaaslike poort moet tussen 1 en 65535 wees.", + "invalidLocalTargetIp": "Die plaaslike teiken-IP moet 'n geldige IPv4-adres wees.", + "invalidLocalTargetPort": "Die plaaslike teikenpoort moet tussen 1 en 65535 wees.", + "invalidRemoteAddress": "Afstandadres word vereis.", + "invalidRemotePort": "Afstandpoort moet tussen 1 en 65535 wees.", + "lastError": "Laaste fout", + "lastStarted": "Laas begin", + "lastTested": "Laas getoets", + "localAddress": "Plaaslike Adres", + "localPort": "Plaaslike Hawe", + "localSaveError": "Kon nie plaaslike kliënttonnels stoor nie", + "localSaved": "Kliënttonnels gestoor", + "manualControlError": "Kon nie tonnelstatus opdateer nie.", + "maxRetries": "Maksimum herprobeer", + "mode": "Modus", + "nextRetryIn": "Volgende herprobeer oor {{seconds}} sekondes", + "noClientTunnels": "Geen kliënttunnels is op hierdie lessenaar gekonfigureer nie.", + "noHostSelected": "Geen gasheer gekies nie", + "noSshTunnels": "Geen SSH-tonnels nie", + "port": "Hawe", + "remoteBindAddress": "Afstandsbindadres", + "remoteHost": "Afstandgasheer", + "remotePort": "Afstandpoort", + "retryInterval": "Herprobeerinterval (sekondes)", + "route": "Roete:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOKKIES via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} op {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Toets", + "tunnelName": "Tonnelnaam", + "tunnelTestFailed": "Tonneltoets het misluk", + "tunnelTestSucceeded": "Tonneltoets het geslaag", + "type": "Tonnel Tipe", + "typeDynamic": "Dinamiese (-D)", + "typeLocal": "Plaaslik (-L)", + "typeRemote": "Afstandbeheer (-R)", + "working": "Werk..." + } +} diff --git a/plugins/tunnels/locales/translated/ar_SA.json b/plugins/tunnels/locales/translated/ar_SA.json new file mode 100644 index 000000000..4a97b20b3 --- /dev/null +++ b/plugins/tunnels/locales/translated/ar_SA.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "إضافة نفق", + "autoStartDesc": "الاتصال بهذا النفق تلقائياً عند تحميل المضيف", + "autoStartLabel": "تشغيل تلقائي", + "connectBtn": "اتصال", + "disconnectBtn": "قطع الاتصال", + "enableTunneling": "تمكين الأنفاق", + "enableTunnelingDesc": "تمكين وظيفة نفق SSH لهذا المضيف", + "endpointHost": "مضيف نقطة النهاية", + "endpointHostPlaceholder": "نفس المضيف، مضيف SSH، أو مضيف/IP يمكن الوصول إليه", + "endpointPort": "منفذ نقطة النهاية", + "failedToConnectTunnel": "فشل الاتصال", + "failedToDisconnectTunnel": "فشل قطع الاتصال", + "maxRetries": "الحد الأقصى لإعادة المحاولات", + "noTunnelsConfigured": "لم يتم تكوين أي أنفاق.", + "retryIntervalS": "فترة إعادة المحاولة (بالثواني)", + "serverTunnelsSection": "أنفاق الخادم", + "sourcePort": "منفذ المصدر", + "tabTunnels": "الأنفاق", + "tunnelConnecting": "جارٍ توصيل النفق...", + "tunnelDisconnected": "تم قطع اتصال النفق", + "tunnelLabel": "نفق {{number}}", + "tunnelModeDynamicDesc": "إنشاء وكيل SOCKS5 على منفذ محلي لتوجيه المنافذ الديناميكي.", + "tunnelModeLocalDesc": "توجيه منفذ محلي إلى منفذ على الخادم البعيد (أو مضيف يمكن الوصول إليه منه).", + "tunnelModeRemoteDesc": "إعادة توجيه منفذ على الخادم البعيد إلى منفذ محلي على جهازك.", + "tunnelRequirementsText": "يجب أن يحتوي خادم SSH على الإعدادات GatewayPorts yes و AllowTcpForwarding yes و PermitRootLogin yes في الملف /etc/ssh/sshd_config.", + "tunnelSettings": "إعدادات النفق", + "tunnelType": "نوع النفق" + }, + "nav": { + "portForwarding": "إعادة التوجيه", + "tunnels": "الأنفاق" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (استماع محلي)", + "localTargetHost": "127.0.0.1 (الهدف على هذا الكمبيوتر)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (الاستماع على نقطة النهاية)", + "remoteTargetHost": "127.0.0.1 (الهدف من نقطة النهاية)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (مستمع SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "تم تكوين {{count}} نفق محلي للعميل على سطح المكتب هذا.", + "c2sLoadPreset": "تحميل", + "c2sNoPresetSelected": "لم يتم تحديد إعداد مُسبَق", + "c2sNoPresets": "لا توجد إعدادات مُسبَقة محفوظة", + "c2sPresetDeleted": "تم حذف الإعداد المُسبَق لنفق العميل", + "c2sPresetLoadError": "فشل في تحميل إعدادات نفق العميل المُسبَقة", + "c2sPresetLoaded": "تم تحميل الإعداد المُسبَق لنفق العميل محلياً", + "c2sPresetName": "اسم الإعداد المُسبَق", + "c2sPresetNamePlaceholder": "اسم الإعداد المُسبَق للعميل", + "c2sPresetRenamed": "تمت إعادة تسمية الإعداد المُسبَق لنفق العميل", + "c2sPresetSaved": "تم حفظ الإعداد المُسبَق لنفق العميل", + "c2sPresetSyncNote": "الإعدادات المُسبَقة هي لقطات واضحة؛ تحميل أحدها يستبدل قائمة الأنفاق المحلية لعميل سطح المكتب هذا.", + "c2sPresetToLoad": "الإعداد المُسبَق للتحميل", + "c2sTunnelPresets": "إعدادات النفق المُسبَقة للعميل", + "c2sTunnelPresetsUnavailable": "إعدادات النفق المُسبَقة للعميل متاحة فقط في تطبيق سطح المكتب." + }, + "tunnels": { + "attempt": "محاولة {{current}} من {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} عبر {{endpoint}}", + "autoNameClientLocal": "محلي {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → محلي {{localPort}}", + "autoStart": "بدء تلقائي", + "cancel": "إلغاء", + "canceling": "جارٍ الإلغاء...", + "clientAutoStartDesc": "يبدأ عند فتح عميل سطح المكتب هذا ويبقى متصلاً.", + "clientManualStartDesc": "استخدم بدء وإيقاف من هذا الصف. لن يقوم Termix بفتحه تلقائيًا.", + "clientRemoteServerNote": "قد يتطلب التوجيه البعيد AllowTcpForwarding و GatewayPorts على خادم SSH للنهاية. يُغلق المنفذ البعيد عند فصل سطح المكتب هذا.", + "clientTunnelStarted": "تم بدء نفق العميل", + "clientTunnelStopped": "تم إيقاف نفق العميل", + "clientTunnels": "أنفاق العميل", + "connected": "متصل", + "connecting": "جارٍ الاتصال...", + "createFirstTunnelMessage": "لم تُنشئ أي أنفاق SSH بعد. قم بتكوين اتصالات الأنفاق في مدير المضيف للبدء.", + "currentHostPort": "منفذ المضيف الحالي", + "destination": "الوجهة", + "destinationAddress": "عنوان الوجهة", + "destinationPort": "ميناء الوجهة", + "disconnected": "غير متصل", + "duplicateAutoStartBind": "يمكن لنفق عميل تلقائي التشغيل واحد فقط استخدام {{bind}}.", + "endpointPort": "منفذ النهاية", + "endpointSshHost": "مضيف SSH للنهاية", + "endpointSshHostPlaceholder": "اختر مضيفًا مُعيّنًا", + "endpointSshHostRequired": "اختر مضيف SSH للنهاية لكل نفق عميل.", + "error": "خطأ", + "forwardDescriptionClientDynamic": "SOCKS على المنفذ المحلي {{sourcePort}}.", + "forwardDescriptionClientLocal": "من المحلي {{sourcePort}} إلى البعيد {{endpointPort}}.", + "forwardDescriptionClientRemote": "من البعيد {{sourcePort}} إلى المحلي {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS على المضيف الحالي {{sourcePort}}.", + "forwardDescriptionServerLocal": "من المضيف الحالي {{sourcePort}} إلى نقطة النهاية {{endpointPort}}.", + "forwardDescriptionServerRemote": "من نقطة النهاية {{endpointPort}} إلى المضيف الحالي {{sourcePort}}.", + "host": "المضيف", + "intermediateHost": "المضيف الوسيط", + "invalidBindIp": "يجب أن يكون عنوان IP المحلي عنوان IPv4 صالحًا.", + "invalidEndpointPort": "يجب أن يكون منفذ النهاية بين 1 و 65535.", + "invalidLocalPort": "يجب أن يكون المنفذ المحلي بين 1 و 65535.", + "invalidLocalTargetIp": "يجب أن يكون عنوان IP الهدف المحلي عنوان IPv4 صالحًا.", + "invalidLocalTargetPort": "يجب أن يكون منفذ الهدف المحلي بين 1 و 65535.", + "invalidRemoteAddress": "يلزم وجود عنوان بعيد.", + "invalidRemotePort": "يجب أن يكون المنفذ البعيد بين 1 و 65535.", + "lastError": "آخر خطأ", + "lastStarted": "آخر تشغيل", + "lastTested": "آخر اختبار", + "localAddress": "العنوان المحلي", + "localPort": "المنفذ المحلي", + "localSaveError": "فشل حفظ أنفاق العميل المحلية", + "localSaved": "تم حفظ أنفاق العميل", + "manualControlError": "فشل تحديث حالة النفق.", + "maxRetries": "الحد الأقصى لإعادة المحاولات", + "mode": "الوضع", + "nextRetryIn": "إعادة المحاولة التالية في {{seconds}} ثانية", + "noClientTunnels": "لا توجد أنفاق عميل مُعدّة على سطح المكتب هذا.", + "noHostSelected": "لم يتم تحديد مضيف", + "noSshTunnels": "لا توجد أنفاق SSH", + "port": "منفذ", + "remoteBindAddress": "عنوان الربط عن بعد", + "remoteHost": "المضيف البعيد", + "remotePort": "المنفذ البعيد", + "retryInterval": "فاصل إعادة المحاولة (ثوانٍ)", + "route": "المسار:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS عبر {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} عبر {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "اختبار", + "tunnelName": "اسم النفق", + "tunnelTestFailed": "فشل اختبار النفق", + "tunnelTestSucceeded": "نجح اختبار النفق", + "type": "نوع النفق", + "typeDynamic": "ديناميكي (-D)", + "typeLocal": "محلي (-L)", + "typeRemote": "بعيد (-R)", + "working": "جارٍ العمل..." + } +} diff --git a/plugins/tunnels/locales/translated/bg_BG.json b/plugins/tunnels/locales/translated/bg_BG.json new file mode 100644 index 000000000..5a6cf1056 --- /dev/null +++ b/plugins/tunnels/locales/translated/bg_BG.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Добавяне на тунел", + "autoStartDesc": "Автоматично свързване на този тунел при зареждане на хоста", + "autoStartLabel": "Автоматично стартиране", + "connectBtn": "Свържете се", + "disconnectBtn": "Изключване", + "enableTunneling": "Активиране на тунелиране", + "enableTunnelingDesc": "Активиране на SSH тунелната функционалност за този хост", + "endpointHost": "Краен хост", + "endpointHostPlaceholder": "Същият хост, SSH хост или достъпен хост/IP адрес", + "endpointPort": "Порт за крайна точка", + "failedToConnectTunnel": "Свързването не бе успешно", + "failedToDisconnectTunnel": "Прекъсването не бе успешно", + "maxRetries": "Максимален брой повторни опити", + "noTunnelsConfigured": "Няма конфигурирани тунели.", + "retryIntervalS": "Интервал на повторен опит (и)", + "serverTunnelsSection": "Сървърни тунели", + "sourcePort": "Източник Порт", + "tabTunnels": "Тунели", + "tunnelConnecting": "Тунел, свързващ...", + "tunnelDisconnected": "Тунелът е прекъснат", + "tunnelLabel": "Тунел {{number}}", + "tunnelModeDynamicDesc": "Създайте SOCKS5 прокси на локален порт за динамично пренасочване на портове.", + "tunnelModeLocalDesc": "Пренасочване на локален порт към порт на отдалечения сървър (или хост, достъпен от него).", + "tunnelModeRemoteDesc": "Пренасочете порт на отдалечения сървър обратно към локален порт на вашата машина.", + "tunnelRequirementsText": "SSH сървърът трябва да има зададени стойности за GatewayPorts (да), AllowTcpForwarding (да) и PermitRootLogin (да) в /etc/ssh/sshd_config.", + "tunnelSettings": "Настройки на тунела", + "tunnelType": "Тип тунел" + }, + "nav": { + "portForwarding": "Препращане", + "tunnels": "Тунели" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (слушане локално)", + "localTargetHost": "127.0.0.1 (цел на този компютър)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (слушане на крайната точка)", + "remoteTargetHost": "127.0.0.1 (цел от крайната точка)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS слушател)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} локални клиентски тунели, конфигурирани на този работен плот.", + "c2sLoadPreset": "Зареждане", + "c2sNoPresetSelected": "Няма избрана предварително зададена настройка", + "c2sNoPresets": "Няма запазени предварително зададени настройки", + "c2sPresetDeleted": "Предварително зададена настройка за тунел на клиента е изтрита", + "c2sPresetLoadError": "Неуспешно зареждане на предварително зададени настройки за тунел на клиента", + "c2sPresetLoaded": "Предварително зададена настройка за тунел на клиента, заредена локално", + "c2sPresetName": "Име на предварително зададена настройка", + "c2sPresetNamePlaceholder": "Име на предварително зададена настройка на клиента", + "c2sPresetRenamed": "Предварителното преименуване на клиентския тунел", + "c2sPresetSaved": "Предварително зададена настройка за тунел на клиента е запазена", + "c2sPresetSyncNote": "Предварителните настройки са изрични снимки; зареждането на такава замества списъка с локални клиентски тунели на този настолен клиент.", + "c2sPresetToLoad": "Предварително зададено зареждане", + "c2sTunnelPresets": "Предварителни настройки на клиентския тунел", + "c2sTunnelPresetsUnavailable": "Предварителните настройки на клиентските тунели са налични само в настолния клиент." + }, + "tunnels": { + "attempt": "Опит {{current}} от {{max}}", + "autoNameClientDynamic": "ЧОРАПИ {{localPort}} чрез {{endpoint}}", + "autoNameClientLocal": "Местно {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → местен {{localPort}}", + "autoStart": "Автоматично стартиране", + "cancel": "Отказ", + "canceling": "Анулиране...", + "clientAutoStartDesc": "Стартира, когато този настолен клиент се отвори и остане свързан.", + "clientManualStartDesc": "Използвайте „Старт“ и „Стоп“ от този ред. Termix няма да го отвори автоматично.", + "clientRemoteServerNote": "Отдалеченото пренасочване може да изисква AllowTcpForwarding и GatewayPorts на SSH сървъра на крайната точка. Отдалеченият порт се затваря, когато този работен плот се изключи.", + "clientTunnelStarted": "Тунелът на клиента е стартиран", + "clientTunnelStopped": "Тунелът на клиента е спрян", + "clientTunnels": "Клиентски тунели", + "connected": "Свързан", + "connecting": "Свързване...", + "createFirstTunnelMessage": "Все още не сте създали SSH тунели. Конфигурирайте тунелни връзки в Host Manager, за да започнете.", + "currentHostPort": "Текущ хост порт", + "destination": "Дестинация", + "destinationAddress": "Адрес на местоназначението", + "destinationPort": "Пристанище на местоназначение", + "disconnected": "Изключен", + "duplicateAutoStartBind": "Само един тунел за автоматично стартиране на клиент може да използва {{bind}}.", + "endpointPort": "Порт за крайна точка", + "endpointSshHost": "SSH хост за крайна точка", + "endpointSshHostPlaceholder": "Изберете конфигуриран хост", + "endpointSshHostRequired": "Изберете SSH хост за крайна точка за всеки клиентски тунел.", + "error": "Грешка", + "forwardDescriptionClientDynamic": "SOCKS на локален порт {{sourcePort}}.", + "forwardDescriptionClientLocal": "Локален {{sourcePort}} → отдалечен {{endpointPort}}.", + "forwardDescriptionClientRemote": "Отдалечено {{sourcePort}} → локално {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS на текущия хост {{sourcePort}}.", + "forwardDescriptionServerLocal": "Текущ хост {{sourcePort}} → крайна точка {{endpointPort}}.", + "forwardDescriptionServerRemote": "Крайна точка {{endpointPort}} → текущ хост {{sourcePort}}.", + "host": "Домакин", + "intermediateHost": "Междинен гостоприемник", + "invalidBindIp": "Локалният IP адрес трябва да е валиден IPv4 адрес.", + "invalidEndpointPort": "Портът на крайната точка трябва да е между 1 и 65535.", + "invalidLocalPort": "Локалният порт трябва да е между 1 и 65535.", + "invalidLocalTargetIp": "Локалният целеви IP адрес трябва да е валиден IPv4 адрес.", + "invalidLocalTargetPort": "Локалният целеви порт трябва да е между 1 и 65535.", + "invalidRemoteAddress": "Изисква се отдалечен адрес.", + "invalidRemotePort": "Отдалеченият порт трябва да е между 1 и 65535.", + "lastError": "Последна грешка", + "lastStarted": "Последно стартирано", + "lastTested": "Последно тествано", + "localAddress": "Местен адрес", + "localPort": "Локален порт", + "localSaveError": "Запазването на тунелите на локалните клиенти не бе успешно", + "localSaved": "Клиентските тунели са запазени", + "manualControlError": "Актуализирането на състоянието на тунела не бе успешно.", + "maxRetries": "Максимален брой повторни опити", + "mode": "Режим", + "nextRetryIn": "Следващ опит след {{seconds}} секунди", + "noClientTunnels": "Няма конфигурирани клиентски тунели на този работен плот.", + "noHostSelected": "Няма избран хост", + "noSshTunnels": "Няма SSH тунели", + "port": "Порт", + "remoteBindAddress": "Адрес за отдалечено свързване", + "remoteHost": "Отдалечен хост", + "remotePort": "Отдалечен порт", + "retryInterval": "Интервал на повторен опит (секунди)", + "route": "Маршрут:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ЧОРАПИ чрез {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} чрез {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} на {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Тест", + "tunnelName": "Име на тунела", + "tunnelTestFailed": "Тестът на тунела не беше успешен", + "tunnelTestSucceeded": "Тестът в тунела е успешен", + "type": "Тип тунел", + "typeDynamic": "Динамичен (-D)", + "typeLocal": "Местен (-L)", + "typeRemote": "Дистанционно (-R)", + "working": "Работа..." + } +} diff --git a/plugins/tunnels/locales/translated/bn_BD.json b/plugins/tunnels/locales/translated/bn_BD.json new file mode 100644 index 000000000..095da443e --- /dev/null +++ b/plugins/tunnels/locales/translated/bn_BD.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "টানেল যোগ করুন", + "autoStartDesc": "হোস্ট লোড হলে এই টানেলটি স্বয়ংক্রিয়ভাবে সংযুক্ত করুন।", + "autoStartLabel": "স্বয়ংক্রিয়-শুরু", + "connectBtn": "সংযোগ করুন", + "disconnectBtn": "সংযোগ বিচ্ছিন্ন করুন", + "enableTunneling": "টানেলিং সক্ষম করুন", + "enableTunnelingDesc": "এই হোস্টের জন্য SSH টানেল কার্যকারিতা সক্রিয় করুন", + "endpointHost": "এন্ডপয়েন্ট হোস্ট", + "endpointHostPlaceholder": "একই হোস্ট, SSH হোস্ট, অথবা পৌঁছানো যায় এমন হোস্ট/আইপি", + "endpointPort": "এন্ডপয়েন্ট পোর্ট", + "failedToConnectTunnel": "সংযোগ করতে ব্যর্থ হয়েছে", + "failedToDisconnectTunnel": "সংযোগ বিচ্ছিন্ন করতে ব্যর্থ হয়েছে", + "maxRetries": "সর্বোচ্চ পুনঃপ্রচেষ্টা", + "noTunnelsConfigured": "কোনো টানেল কনফিগার করা নেই।", + "retryIntervalS": "পুনরায় চেষ্টার ব্যবধান (সেকেন্ড)", + "serverTunnelsSection": "সার্ভার টানেল", + "sourcePort": "উৎস বন্দর", + "tabTunnels": "টানেল", + "tunnelConnecting": "সংযোগকারী টানেল...", + "tunnelDisconnected": "টানেল বিচ্ছিন্ন", + "tunnelLabel": "টানেল {{number}}", + "tunnelModeDynamicDesc": "ডাইনামিক পোর্ট ফরওয়ার্ডিংয়ের জন্য লোকাল পোর্টে একটি SOCKS5 প্রক্সি তৈরি করুন।", + "tunnelModeLocalDesc": "একটি স্থানীয় পোর্টকে রিমোট সার্ভারের (বা সেখান থেকে পৌঁছানো যায় এমন কোনো হোস্টের) একটি পোর্টে ফরওয়ার্ড করুন।", + "tunnelModeRemoteDesc": "রিমোট সার্ভারের একটি পোর্ট আপনার মেশিনের লোকাল পোর্টে ফরওয়ার্ড করুন।", + "tunnelRequirementsText": "SSH সার্ভারের /etc/ssh/sshd_config ফাইলে GatewayPorts yes, AllowTcpForwarding yes, এবং PermitRootLogin yes সেট করা থাকতে হবে।", + "tunnelSettings": "টানেল সেটিংস", + "tunnelType": "টানেল টাইপ" + }, + "nav": { + "portForwarding": "ফরোয়ার্ডিং", + "tunnels": "টানেল" + }, + "placeholders": { + "defaultEndpointPort": "২২৪", + "defaultPort": "২২", + "localListenerHost": "১২৭.০.০.১ (স্থানীয়ভাবে শুনুন)", + "localTargetHost": "১২৭.০.০.১ (এই কম্পিউটারে লক্ষ্যবস্তু)", + "maxRetries": "৩", + "remoteBindHost": "১২৭.০.০.১ (এন্ডপয়েন্টে শুনুন)", + "remoteTargetHost": "১২৭.০.০.১ (এন্ডপয়েন্ট থেকে টার্গেট)", + "retryInterval": "১০", + "socksListenerHost": "১২৭.০.০.১ (SOCKS লিসেনার)" + }, + "profile": { + "c2sCurrentLocalConfig": "এই ডেস্কটপে {{count}} টি স্থানীয় ক্লায়েন্ট টানেল কনফিগার করা হয়েছে।", + "c2sLoadPreset": "লোড", + "c2sNoPresetSelected": "কোনো পূর্বনির্ধারিত সেট নির্বাচন করা হয়নি", + "c2sNoPresets": "কোন প্রিসেট সংরক্ষণ করা হয়নি", + "c2sPresetDeleted": "ক্লায়েন্ট টানেল প্রিসেট মুছে ফেলা হয়েছে", + "c2sPresetLoadError": "ক্লায়েন্ট টানেল প্রিসেট লোড করতে ব্যর্থ হয়েছে", + "c2sPresetLoaded": "ক্লায়েন্ট টানেল প্রিসেট স্থানীয়ভাবে লোড করা হয়েছে", + "c2sPresetName": "পূর্বনির্ধারিত নাম", + "c2sPresetNamePlaceholder": "ক্লায়েন্টের পূর্বনির্ধারিত নাম", + "c2sPresetRenamed": "ক্লায়েন্ট টানেল প্রিসেটের নাম পরিবর্তন করা হয়েছে", + "c2sPresetSaved": "ক্লায়েন্ট টানেল প্রিসেট সংরক্ষিত", + "c2sPresetSyncNote": "প্রিসেটগুলি হলো সুনির্দিষ্ট স্ন্যাপশট; এর কোনো একটি লোড করলে এই ডেস্কটপ ক্লায়েন্টের স্থানীয় ক্লায়েন্ট টানেল তালিকা প্রতিস্থাপিত হয়।", + "c2sPresetToLoad": "লোড করার জন্য প্রিসেট", + "c2sTunnelPresets": "ক্লায়েন্ট টানেল প্রিসেট", + "c2sTunnelPresetsUnavailable": "ক্লায়েন্ট টানেল প্রিসেটগুলো শুধুমাত্র ডেস্কটপ ক্লায়েন্টে পাওয়া যায়।" + }, + "tunnels": { + "attempt": "{{max}} এর {{current}} প্রচেষ্টা", + "autoNameClientDynamic": "মোজা {{localPort}} {{endpoint}} এর মাধ্যমে", + "autoNameClientLocal": "স্থানীয় {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → স্থানীয় {{localPort}}", + "autoStart": "অটো স্টার্ট", + "cancel": "বাতিল করুন", + "canceling": "বাতিল করা হচ্ছে...", + "clientAutoStartDesc": "এই ডেস্কটপ ক্লায়েন্টটি খুললে এটি চালু হয় এবং সংযুক্ত থাকে।", + "clientManualStartDesc": "এই সারি থেকে স্টার্ট এবং স্টপ ব্যবহার করুন। টারমিক্স এটি স্বয়ংক্রিয়ভাবে খুলবে না।", + "clientRemoteServerNote": "রিমোট ফরওয়ার্ডিংয়ের জন্য এন্ডপয়েন্ট SSH সার্ভারে AllowTcpForwarding এবং GatewayPorts চালু করার প্রয়োজন হতে পারে। এই ডেস্কটপটি সংযোগ বিচ্ছিন্ন করলে রিমোট পোর্টটি বন্ধ হয়ে যায়।", + "clientTunnelStarted": "ক্লায়েন্ট টানেল শুরু হয়েছে", + "clientTunnelStopped": "ক্লায়েন্ট টানেল বন্ধ হয়ে গেছে", + "clientTunnels": "ক্লায়েন্ট টানেল", + "connected": "সংযুক্ত", + "connecting": "সংযোগ স্থাপন...", + "createFirstTunnelMessage": "আপনি এখনও কোনো SSH টানেল তৈরি করেননি। শুরু করার জন্য হোস্ট ম্যানেজারে টানেল সংযোগগুলি কনফিগার করুন।", + "currentHostPort": "বর্তমান হোস্ট পোর্ট", + "destination": "গন্তব্য", + "destinationAddress": "গন্তব্য ঠিকানা", + "destinationPort": "গন্তব্য বন্দর", + "disconnected": "বিচ্ছিন্ন", + "duplicateAutoStartBind": "শুধুমাত্র একটি অটো-স্টার্ট ক্লায়েন্ট টানেল {{bind}} ব্যবহার করতে পারে।", + "endpointPort": "এন্ডপয়েন্ট পোর্ট", + "endpointSshHost": "এন্ডপয়েন্ট SSH হোস্ট", + "endpointSshHostPlaceholder": "একটি কনফিগার করা হোস্ট নির্বাচন করুন", + "endpointSshHostRequired": "প্রতিটি ক্লায়েন্ট টানেলের জন্য একটি এন্ডপয়েন্ট SSH হোস্ট নির্বাচন করুন।", + "error": "ত্রুটি", + "forwardDescriptionClientDynamic": "স্থানীয় পোর্ট {{sourcePort}}-এ SOCKS।", + "forwardDescriptionClientLocal": "স্থানীয় {{sourcePort}} → দূরবর্তী {{endpointPort}}.", + "forwardDescriptionClientRemote": "রিমোট {{sourcePort}} → লোকাল {{endpointPort}}.", + "forwardDescriptionServerDynamic": "বর্তমান হোস্টে SOCKS {{sourcePort}}।", + "forwardDescriptionServerLocal": "বর্তমান হোস্ট {{sourcePort}} → শেষ বিন্দু {{endpointPort}}.", + "forwardDescriptionServerRemote": "এন্ডপয়েন্ট {{endpointPort}} → বর্তমান হোস্ট {{sourcePort}}.", + "host": "হোস্ট", + "intermediateHost": "মধ্যবর্তী হোস্ট", + "invalidBindIp": "লোকাল আইপি অবশ্যই একটি বৈধ IPv4 অ্যাড্রেস হতে হবে।", + "invalidEndpointPort": "এন্ডপয়েন্ট পোর্ট অবশ্যই ১ থেকে ৬৫৫৩৫-এর মধ্যে হতে হবে।", + "invalidLocalPort": "স্থানীয় পোর্ট অবশ্যই ১ থেকে ৬৫৫৩৫-এর মধ্যে হতে হবে।", + "invalidLocalTargetIp": "স্থানীয় টার্গেট আইপি অবশ্যই একটি বৈধ IPv4 অ্যাড্রেস হতে হবে।", + "invalidLocalTargetPort": "স্থানীয় টার্গেট পোর্ট অবশ্যই ১ থেকে ৬৫৫৩৫-এর মধ্যে হতে হবে।", + "invalidRemoteAddress": "দূরবর্তী ঠিকানা প্রয়োজন।", + "invalidRemotePort": "রিমোট পোর্ট অবশ্যই ১ থেকে ৬৫৫৩৫-এর মধ্যে হতে হবে।", + "lastError": "শেষ ত্রুটি", + "lastStarted": "সর্বশেষ শুরু হয়েছে", + "lastTested": "সর্বশেষ পরীক্ষা করা হয়েছে", + "localAddress": "স্থানীয় ঠিকানা", + "localPort": "স্থানীয় বন্দর", + "localSaveError": "স্থানীয় ক্লায়েন্ট টানেলগুলি সংরক্ষণ করতে ব্যর্থ হয়েছে", + "localSaved": "ক্লায়েন্ট টানেলগুলি সংরক্ষিত হয়েছে", + "manualControlError": "টানেলের অবস্থা আপডেট করতে ব্যর্থ হয়েছে।", + "maxRetries": "সর্বোচ্চ পুনঃপ্রচেষ্টা", + "mode": "মোড", + "nextRetryIn": "{{seconds}} সেকেন্ড পর আবার চেষ্টা করা হবে।", + "noClientTunnels": "এই ডেস্কটপে কোনো ক্লায়েন্ট টানেল কনফিগার করা নেই।", + "noHostSelected": "কোন হোস্ট নির্বাচন করা হয়নি", + "noSshTunnels": "কোন SSH টানেল নেই", + "port": "বন্দর", + "remoteBindAddress": "রিমোট বাইন্ড অ্যাড্রেস", + "remoteHost": "রিমোট হোস্ট", + "remotePort": "রিমোট পোর্ট", + "retryInterval": "পুনরায় চেষ্টার ব্যবধান (সেকেন্ড)", + "route": "পথ:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} {{endpoint}} এর মাধ্যমে", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} {{endpoint}} এর উপর → {{localHost}}:{{localPort}}", + "test": "পরীক্ষা", + "tunnelName": "টানেলের নাম", + "tunnelTestFailed": "টানেল পরীক্ষা ব্যর্থ হয়েছে", + "tunnelTestSucceeded": "টানেল পরীক্ষা সফল হয়েছে", + "type": "টানেল টাইপ", + "typeDynamic": "গতিশীল (-D)", + "typeLocal": "স্থানীয় (-L)", + "typeRemote": "রিমোট (-R)", + "working": "কাজ চলছে..." + } +} diff --git a/plugins/tunnels/locales/translated/ca_ES.json b/plugins/tunnels/locales/translated/ca_ES.json new file mode 100644 index 000000000..ef26da59d --- /dev/null +++ b/plugins/tunnels/locales/translated/ca_ES.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Afegeix un túnel", + "autoStartDesc": "Connecta automàticament aquest túnel quan es carregui l'amfitrió", + "autoStartLabel": "Inici automàtic", + "connectBtn": "Connecta", + "disconnectBtn": "Desconnecta", + "enableTunneling": "Activa la tunelització", + "enableTunnelingDesc": "Habilita la funcionalitat del túnel SSH per a aquest amfitrió", + "endpointHost": "Amfitrió de punt final", + "endpointHostPlaceholder": "Mateix host, host SSH o host/IP accessible", + "endpointPort": "Port de punt final", + "failedToConnectTunnel": "No s'ha pogut connectar", + "failedToDisconnectTunnel": "No s'ha pogut desconnectar", + "maxRetries": "Màxim d'intents", + "noTunnelsConfigured": "No hi ha túnels configurats.", + "retryIntervalS": "Interval de reintent (s)", + "serverTunnelsSection": "Túnels de servidor", + "sourcePort": "Port d'origen", + "tabTunnels": "Túnels", + "tunnelConnecting": "Túnel que connecta...", + "tunnelDisconnected": "Túnel desconnectat", + "tunnelLabel": "Túnel {{number}}", + "tunnelModeDynamicDesc": "Crea un proxy SOCKS5 en un port local per al reenviament dinàmic de ports.", + "tunnelModeLocalDesc": "Reenvia un port local a un port del servidor remot (o a un host accessible des d'aquest).", + "tunnelModeRemoteDesc": "Reenvia un port del servidor remot a un port local de la teva màquina.", + "tunnelRequirementsText": "El servidor SSH ha de tenir definits GatewayPorts sí, AllowTcpForwarding sí i PermitRootLogin sí a /etc/ssh/sshd_config.", + "tunnelSettings": "Configuració del túnel", + "tunnelType": "Tipus de túnel" + }, + "nav": { + "portForwarding": "Reenviament", + "tunnels": "Túnels" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (escolta localment)", + "localTargetHost": "127.0.0.1 (objectiu en aquest ordinador)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (escolta al punt final)", + "remoteTargetHost": "127.0.0.1 (objectiu des del punt final)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (escoltador de SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} túnel(s) de client local configurat(s) en aquest escriptori.", + "c2sLoadPreset": "Carrega", + "c2sNoPresetSelected": "No s'ha seleccionat cap predefinició", + "c2sNoPresets": "No s'han desat presets", + "c2sPresetDeleted": "S'ha suprimit la configuració predefinida del túnel del client", + "c2sPresetLoadError": "No s'han pogut carregar els preajustos del túnel del client", + "c2sPresetLoaded": "Predefinició del túnel del client carregada localment", + "c2sPresetName": "Nom predefinit", + "c2sPresetNamePlaceholder": "Nom predefinit del client", + "c2sPresetRenamed": "S'ha canviat el nom de la predefinició del túnel del client", + "c2sPresetSaved": "S'ha desat la configuració predefinida del túnel del client", + "c2sPresetSyncNote": "Els preajustaments són instantànies explícites; carregar-ne una substitueix la llista de túnels de clients locals d'aquest client d'escriptori.", + "c2sPresetToLoad": "Predefinició per carregar", + "c2sTunnelPresets": "Preajustos del túnel del client", + "c2sTunnelPresetsUnavailable": "Els preajustos del túnel del client només estan disponibles al client d'escriptori." + }, + "tunnels": { + "attempt": "Intent {{current}} de {{max}}", + "autoNameClientDynamic": "MITJONS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Inici automàtic", + "cancel": "Cancel·la", + "canceling": "Cancel·lant...", + "clientAutoStartDesc": "S'inicia quan s'obre aquest client d'escriptori i roman connectat.", + "clientManualStartDesc": "Feu servir Start i Stop des d'aquesta fila. Termix no l'obrirà automàticament.", + "clientRemoteServerNote": "El reenviament remot pot requerir AllowTcpForwarding i GatewayPorts al servidor SSH del punt final. El port remot es tanca quan aquest escriptori es desconnecta.", + "clientTunnelStarted": "Túnel del client iniciat", + "clientTunnelStopped": "Túnel del client aturat", + "clientTunnels": "Túnels de client", + "connected": "Connectat", + "connecting": "Connectant...", + "createFirstTunnelMessage": "Encara no has creat cap túnel SSH. Configureu les connexions del túnel al Gestor d'amfitrions per començar.", + "currentHostPort": "Port d'amfitrió actual", + "destination": "Destinació", + "destinationAddress": "Adreça de destinació", + "destinationPort": "Port de destinació", + "disconnected": "Desconnectat", + "duplicateAutoStartBind": "Només un túnel de client d'inici automàtic pot utilitzar {{bind}}.", + "endpointPort": "Port del punt final", + "endpointSshHost": "Amfitrió SSH de punt final", + "endpointSshHostPlaceholder": "Seleccioneu un amfitrió configurat", + "endpointSshHostRequired": "Seleccioneu un host SSH de punt final per a cada túnel de client.", + "error": "Error", + "forwardDescriptionClientDynamic": "SOCKS al port local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → remot {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remot {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS a l'amfitrió actual {{sourcePort}}.", + "forwardDescriptionServerLocal": "Amfitrió actual {{sourcePort}} → punt final {{endpointPort}}.", + "forwardDescriptionServerRemote": "Punt final {{endpointPort}} → amfitrió actual {{sourcePort}}.", + "host": "Amfitrió", + "intermediateHost": "Hoste intermedi", + "invalidBindIp": "La IP local ha de ser una adreça IPv4 vàlida.", + "invalidEndpointPort": "El port del punt final ha d'estar entre 1 i 65535.", + "invalidLocalPort": "El port local ha d'estar entre 1 i 65535.", + "invalidLocalTargetIp": "La IP de destinació local ha de ser una adreça IPv4 vàlida.", + "invalidLocalTargetPort": "El port de destinació local ha d'estar entre 1 i 65535.", + "invalidRemoteAddress": "Cal una adreça remota.", + "invalidRemotePort": "El port remot ha d'estar entre 1 i 65535.", + "lastError": "Últim error", + "lastStarted": "Últim inici", + "lastTested": "Última prova", + "localAddress": "Adreça local", + "localPort": "Port local", + "localSaveError": "No s'han pogut desar els túnels del client local.", + "localSaved": "Túnels de client desats", + "manualControlError": "No s'ha pogut actualitzar l'estat del túnel.", + "maxRetries": "Màxim d'intents", + "mode": "Mode", + "nextRetryIn": "Proper intent en {{seconds}} segons", + "noClientTunnels": "No hi ha túnels de client configurats en aquest escriptori.", + "noHostSelected": "No s'ha seleccionat cap amfitrió", + "noSshTunnels": "Sense túnels SSH", + "port": "Port", + "remoteBindAddress": "Adreça d'enllaç remota", + "remoteHost": "Amfitrió remot", + "remotePort": "Port remot", + "retryInterval": "Interval de reintent (segons)", + "route": "Ruta:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → MITJONS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} a {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Prova", + "tunnelName": "Nom del túnel", + "tunnelTestFailed": "La prova del túnel ha fallat", + "tunnelTestSucceeded": "La prova del túnel ha tingut èxit", + "type": "Tipus de túnel", + "typeDynamic": "Dinàmic (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Comandament a distància (-R)", + "working": "Treballant..." + } +} diff --git a/plugins/tunnels/locales/translated/cs_CZ.json b/plugins/tunnels/locales/translated/cs_CZ.json new file mode 100644 index 000000000..b1e5021d6 --- /dev/null +++ b/plugins/tunnels/locales/translated/cs_CZ.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Přidat tunel", + "autoStartDesc": "Automaticky připojit tento tunel po načtení hostitele", + "autoStartLabel": "Automatické spuštění", + "connectBtn": "Připojit", + "disconnectBtn": "Odpojit", + "enableTunneling": "Povolit tunelování", + "enableTunnelingDesc": "Povolit funkci SSH tunelu pro tohoto hostitele", + "endpointHost": "Koncový hostitel", + "endpointHostPlaceholder": "Stejný hostitel, hostitel SSH nebo dostupný hostitel/IP adresa", + "endpointPort": "Koncový port", + "failedToConnectTunnel": "Připojení se nezdařilo", + "failedToDisconnectTunnel": "Odpojení se nezdařilo", + "maxRetries": "Maximální počet opakování", + "noTunnelsConfigured": "Nejsou nakonfigurovány žádné tunely.", + "retryIntervalS": "Interval opakování (s)", + "serverTunnelsSection": "Serverové tunely", + "sourcePort": "Zdrojový port", + "tabTunnels": "Tunely", + "tunnelConnecting": "Spojující tunel...", + "tunnelDisconnected": "Tunel odpojen", + "tunnelLabel": "Tunel {{number}}", + "tunnelModeDynamicDesc": "Vytvořte proxy SOCKS5 na lokálním portu pro dynamické přesměrování portů.", + "tunnelModeLocalDesc": "Přesměrování lokálního portu na port na vzdáleném serveru (nebo na hostitele, který je z něj dosažitelný).", + "tunnelModeRemoteDesc": "Přesměrujte port na vzdáleném serveru zpět na lokální port na vašem počítači.", + "tunnelRequirementsText": "SSH server musí mít v souboru /etc/ssh/sshd_config nastaveny hodnoty GatewayPorts – yes, AllowTcpForwarding – yes a PermitRootLogin – yes.", + "tunnelSettings": "Nastavení tunelu", + "tunnelType": "Typ tunelu" + }, + "nav": { + "portForwarding": "Přeposílání", + "tunnels": "Tunely" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (poslouchat lokálně)", + "localTargetHost": "127.0.0.1 (cíl na tomto počítači)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (naslouchání na koncovém bodě)", + "remoteTargetHost": "127.0.0.1 (cíl z koncového bodu)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (posluchač SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokálních klientských tunelů nakonfigurovaných na této ploše.", + "c2sLoadPreset": "Zatížení", + "c2sNoPresetSelected": "Není vybrána žádná předvolba", + "c2sNoPresets": "Žádné předvolby nejsou uloženy", + "c2sPresetDeleted": "Předvolba klientského tunelu smazána", + "c2sPresetLoadError": "Nepodařilo se načíst předvolby tunelu klienta", + "c2sPresetLoaded": "Přednastavení klientského tunelu načteno lokálně", + "c2sPresetName": "Název předvolby", + "c2sPresetNamePlaceholder": "Název předvolby klienta", + "c2sPresetRenamed": "Přednastavení klientského tunelu přejmenováno", + "c2sPresetSaved": "Přednastavení klientského tunelu uloženo", + "c2sPresetSyncNote": "Předvolby jsou explicitní snímky; načtením jedné z nich se nahradí seznam tunelů lokálních klientů tohoto desktopového klienta.", + "c2sPresetToLoad": "Předvolba k načtení", + "c2sTunnelPresets": "Přednastavení klientského tunelu", + "c2sTunnelPresetsUnavailable": "Přednastavení tunelů klienta jsou k dispozici pouze v klientské verzi pro stolní počítače." + }, + "tunnels": { + "attempt": "Pokus {{current}} z {{max}}", + "autoNameClientDynamic": "PONOŽKY {{localPort}} přes {{endpoint}}", + "autoNameClientLocal": "Místní {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → místní {{localPort}}", + "autoStart": "Automatický start", + "cancel": "Zrušit", + "canceling": "Rušení...", + "clientAutoStartDesc": "Spustí se při otevření tohoto desktopového klienta a zůstane připojen.", + "clientManualStartDesc": "Použijte Start a Stop z tohoto řádku. Termix jej neotevře automaticky.", + "clientRemoteServerNote": "Vzdálené přesměrování může vyžadovat AllowTcpForwarding a GatewayPorts na SSH serveru koncového bodu. Vzdálený port se zavře, když se tato plocha odpojí.", + "clientTunnelStarted": "Tunel klienta spuštěn", + "clientTunnelStopped": "Tunel klienta zastaven", + "clientTunnels": "Klientské tunely", + "connected": "Připojeno", + "connecting": "Spojovací...", + "createFirstTunnelMessage": "Zatím jste nevytvořili žádné SSH tunely. Chcete-li začít, nakonfigurujte tunelová připojení ve Správci hostitele.", + "currentHostPort": "Aktuální hostitelský port", + "destination": "Cíl", + "destinationAddress": "Cílová adresa", + "destinationPort": "Cílový přístav", + "disconnected": "Odpojeno", + "duplicateAutoStartBind": "Pouze jeden automaticky spouštěný klientský tunel může používat {{bind}}.", + "endpointPort": "Koncový port", + "endpointSshHost": "Koncový SSH hostitel", + "endpointSshHostPlaceholder": "Vyberte nakonfigurovaného hostitele", + "endpointSshHostRequired": "Pro každý klientský tunel vyberte koncový bod SSH hostitele.", + "error": "Chyba", + "forwardDescriptionClientDynamic": "SOCKS na lokálním portu {{sourcePort}}.", + "forwardDescriptionClientLocal": "Místní {{sourcePort}} → vzdálený {{endpointPort}}.", + "forwardDescriptionClientRemote": "Vzdálené {{sourcePort}} → místní {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS na aktuálním hostiteli {{sourcePort}}.", + "forwardDescriptionServerLocal": "Aktuální hostitel {{sourcePort}} → koncový bod {{endpointPort}}.", + "forwardDescriptionServerRemote": "Koncový bod {{endpointPort}} → aktuální hostitel {{sourcePort}}.", + "host": "Hostitel", + "intermediateHost": "Mezihostitel", + "invalidBindIp": "Lokální IP adresa musí být platná IPv4 adresa.", + "invalidEndpointPort": "Koncový port musí být v rozsahu od 1 do 65535.", + "invalidLocalPort": "Místní port musí být v rozsahu od 1 do 65535.", + "invalidLocalTargetIp": "Lokální cílová IP adresa musí být platná IPv4 adresa.", + "invalidLocalTargetPort": "Lokální cílový port musí být v rozmezí od 1 do 65535.", + "invalidRemoteAddress": "Je vyžadována vzdálená adresa.", + "invalidRemotePort": "Vzdálený port musí být v rozsahu od 1 do 65535.", + "lastError": "Poslední chyba", + "lastStarted": "Naposledy spuštěno", + "lastTested": "Naposledy testováno", + "localAddress": "Místní adresa", + "localPort": "Místní port", + "localSaveError": "Nepodařilo se uložit tunely lokálních klientů.", + "localSaved": "Tunely klientů uloženy", + "manualControlError": "Nepodařilo se aktualizovat stav tunelu.", + "maxRetries": "Maximální počet opakování", + "mode": "Režim", + "nextRetryIn": "Další pokus za {{seconds}} sekund", + "noClientTunnels": "Na této ploše nejsou nakonfigurovány žádné klientské tunely.", + "noHostSelected": "Nebyl vybrán žádný hostitel", + "noSshTunnels": "Žádné SSH tunely", + "port": "Přístav", + "remoteBindAddress": "Adresa vzdálené vazby", + "remoteHost": "Vzdálený hostitel", + "remotePort": "Vzdálený port", + "retryInterval": "Interval opakování (sekundy)", + "route": "Trasa:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → PONOŽKY přes {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} přes {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} na {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Název tunelu", + "tunnelTestFailed": "Test tunelu selhal", + "tunnelTestSucceeded": "Test tunelu byl úspěšný", + "type": "Typ tunelu", + "typeDynamic": "Dynamický (-D)", + "typeLocal": "Místní (-L)", + "typeRemote": "Vzdálené (-R)", + "working": "Pracovní..." + } +} diff --git a/plugins/tunnels/locales/translated/da_DK.json b/plugins/tunnels/locales/translated/da_DK.json new file mode 100644 index 000000000..36d79ef82 --- /dev/null +++ b/plugins/tunnels/locales/translated/da_DK.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Tilføj tunnel", + "autoStartDesc": "Tilslut automatisk denne tunnel, når værten er indlæst", + "autoStartLabel": "Automatisk start", + "connectBtn": "Forbinde", + "disconnectBtn": "Afbryde", + "enableTunneling": "Aktivér tunnelering", + "enableTunnelingDesc": "Aktivér SSH-tunnelfunktionalitet for denne vært", + "endpointHost": "Endpoint-vært", + "endpointHostPlaceholder": "Samme vært, SSH-vært eller tilgængelig vært/IP", + "endpointPort": "Endepunktsport", + "failedToConnectTunnel": "Kunne ikke oprette forbindelse", + "failedToDisconnectTunnel": "Kunne ikke afbryde forbindelsen", + "maxRetries": "Maks. antal genforsøg", + "noTunnelsConfigured": "Ingen tunneler konfigureret.", + "retryIntervalS": "Gentagelsesinterval (s)", + "serverTunnelsSection": "Servertunneler", + "sourcePort": "Kildeport", + "tabTunnels": "Tunneler", + "tunnelConnecting": "Tunnelforbindelse...", + "tunnelDisconnected": "Tunnelen afbrudt", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Opret en SOCKS5-proxy på en lokal port til dynamisk portvideresendelse.", + "tunnelModeLocalDesc": "Videresend en lokal port til en port på den eksterne server (eller en vært, der kan nås fra den).", + "tunnelModeRemoteDesc": "Videresend en port på den eksterne server tilbage til en lokal port på din maskine.", + "tunnelRequirementsText": "SSH-serveren skal have GatewayPorts angivet ja, AllowTcpForwarding ja og PermitRootLogin ja i /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnelindstillinger", + "tunnelType": "Tunneltype" + }, + "nav": { + "portForwarding": "Videresendelse", + "tunnels": "Tunneler" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lyt lokalt)", + "localTargetHost": "127.0.0.1 (mål på denne computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (lyt på slutpunkt)", + "remoteTargetHost": "127.0.0.1 (mål fra slutpunkt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-lytter)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokale klienttunneler konfigureret på dette skrivebord.", + "c2sLoadPreset": "Indlæs", + "c2sNoPresetSelected": "Ingen forudindstilling valgt", + "c2sNoPresets": "Ingen forudindstillinger gemt", + "c2sPresetDeleted": "Forudindstilling for klienttunnel slettet", + "c2sPresetLoadError": "Kunne ikke indlæse klienttunnelforudindstillinger", + "c2sPresetLoaded": "Forudindstilling for klienttunnel indlæses lokalt", + "c2sPresetName": "Forudindstillet navn", + "c2sPresetNamePlaceholder": "Klientens forudindstillingsnavn", + "c2sPresetRenamed": "Omdøbt forudindstilling for klienttunnel", + "c2sPresetSaved": "Forudindstilling for klienttunnel gemt", + "c2sPresetSyncNote": "Forudindstillinger er eksplicitte snapshots; indlæsning af en erstatter denne desktopklients lokale klienttunnelliste.", + "c2sPresetToLoad": "Forudindstilling til indlæsning", + "c2sTunnelPresets": "Klienttunnelforudindstillinger", + "c2sTunnelPresetsUnavailable": "Forudindstillinger for klienttunnel er kun tilgængelige i desktopklienten." + }, + "tunnels": { + "attempt": "Forsøg {{current}} af {{max}}", + "autoNameClientDynamic": "SOKKER {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokal {{localPort}}", + "autoStart": "Automatisk start", + "cancel": "Ophæve", + "canceling": "Annullerer...", + "clientAutoStartDesc": "Starter, når denne desktopklient åbnes og forbliver forbundet.", + "clientManualStartDesc": "Brug Start og Stop fra denne række. Termix åbner den ikke automatisk.", + "clientRemoteServerNote": "Fjernvideresendelse kan kræve AllowTcpForwarding og GatewayPorts på slutpunktets SSH-server. Fjernporten lukkes, når denne desktop afbryder forbindelsen.", + "clientTunnelStarted": "Klienttunnel startet", + "clientTunnelStopped": "Klienttunnel stoppet", + "clientTunnels": "Klienttunneler", + "connected": "Forbundet", + "connecting": "Forbinder...", + "createFirstTunnelMessage": "Du har endnu ikke oprettet nogen SSH-tunneler. Konfigurer tunnelforbindelser i Host Manager for at komme i gang.", + "currentHostPort": "Nuværende værtsport", + "destination": "Bestemmelsessted", + "destinationAddress": "Destinationsadresse", + "destinationPort": "Destinationshavn", + "disconnected": "Afbrudt", + "duplicateAutoStartBind": "Kun én autostart-klientunnel kan bruge {{bind}}.", + "endpointPort": "Endepunktsport", + "endpointSshHost": "Endpoint SSH-vært", + "endpointSshHostPlaceholder": "Vælg en konfigureret vært", + "endpointSshHostRequired": "Vælg en endpoint SSH-vært for hver klienttunnel.", + "error": "Fejl", + "forwardDescriptionClientDynamic": "SOCKS på lokal port {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokal {{sourcePort}} → fjern {{endpointPort}}.", + "forwardDescriptionClientRemote": "Fjern {{sourcePort}} → lokal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS på nuværende vært {{sourcePort}}.", + "forwardDescriptionServerLocal": "Nuværende vært {{sourcePort}} → slutpunkt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Slutpunkt {{endpointPort}} → nuværende vært {{sourcePort}}.", + "host": "Vært", + "intermediateHost": "Mellemliggende vært", + "invalidBindIp": "Lokal IP-adresse skal være en gyldig IPv4-adresse.", + "invalidEndpointPort": "Slutpunktsporten skal være mellem 1 og 65535.", + "invalidLocalPort": "Den lokale port skal være mellem 1 og 65535.", + "invalidLocalTargetIp": "Den lokale mål-IP-adresse skal være en gyldig IPv4-adresse.", + "invalidLocalTargetPort": "Den lokale målport skal være mellem 1 og 65535.", + "invalidRemoteAddress": "Fjernadresse er påkrævet.", + "invalidRemotePort": "Fjernporten skal være mellem 1 og 65535.", + "lastError": "Sidste fejl", + "lastStarted": "Sidst startet", + "lastTested": "Sidst testet", + "localAddress": "Lokal adresse", + "localPort": "Lokal havn", + "localSaveError": "Kunne ikke gemme lokale klienttunneller", + "localSaved": "Klienttunneler gemt", + "manualControlError": "Kunne ikke opdatere tunnelens tilstand.", + "maxRetries": "Maks. antal genforsøg", + "mode": "Mode", + "nextRetryIn": "Næste forsøg om {{seconds}} sekunder", + "noClientTunnels": "Ingen klienttunneller er konfigureret på dette skrivebord.", + "noHostSelected": "Ingen vært valgt", + "noSshTunnels": "Ingen SSH-tunneler", + "port": "Havn", + "remoteBindAddress": "Fjernbindingsadresse", + "remoteHost": "Fjernvært", + "remotePort": "Fjernport", + "retryInterval": "Interval for nye forsøg (sekunder)", + "route": "Rute:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → STRØMPER via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} på {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Prøve", + "tunnelName": "Tunnelnavn", + "tunnelTestFailed": "Tunneltest mislykkedes", + "tunnelTestSucceeded": "Tunneltesten lykkedes", + "type": "Tunneltype", + "typeDynamic": "Dynamisk (-D)", + "typeLocal": "Lokal (-L)", + "typeRemote": "Fjernbetjening (-R)", + "working": "Arbejder..." + } +} diff --git a/plugins/tunnels/locales/translated/de_DE.json b/plugins/tunnels/locales/translated/de_DE.json new file mode 100644 index 000000000..d3657cf33 --- /dev/null +++ b/plugins/tunnels/locales/translated/de_DE.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Tunnel hinzufügen", + "autoStartDesc": "Diesen Tunnel automatisch verbinden, wenn der Host geladen wird", + "autoStartLabel": "Autostart", + "connectBtn": "Verbinden", + "disconnectBtn": "Trennen", + "enableTunneling": "Tunnel aktivieren", + "enableTunnelingDesc": "SSH-Tunnel-Funktionalität für diesen Host aktivieren", + "endpointHost": "Endpunkt-Host", + "endpointHostPlaceholder": "Gleicher Host, SSH-Host oder erreichbarer Host/IP", + "endpointPort": "Endpunkt-Port", + "failedToConnectTunnel": "Verbindungsaufbau fehlgeschlagen", + "failedToDisconnectTunnel": "Trennung fehlgeschlagen", + "maxRetries": "Max. Wiederholungen", + "noTunnelsConfigured": "Keine Tunnel konfiguriert.", + "retryIntervalS": "Wiederholungsintervall (s)", + "serverTunnelsSection": "Server-Tunnel", + "sourcePort": "Quellport", + "tabTunnels": "Tunnel", + "tunnelConnecting": "Tunnel wird verbunden...", + "tunnelDisconnected": "Tunnel getrennt", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Erstellt einen SOCKS5-Proxy auf einem lokalen Port für dynamische Portweiterleitung.", + "tunnelModeLocalDesc": "Leitet einen lokalen Port an einen Port auf dem Remote-Server (oder einen von dort erreichbaren Host) weiter.", + "tunnelModeRemoteDesc": "Leitet einen Port auf dem Remote-Server zurück zu einem lokalen Port auf Ihrem Rechner weiter.", + "tunnelRequirementsText": "Der SSH-Server muss in /etc/ssh/sshd_config die Optionen GatewayPorts yes, AllowTcpForwarding yes und PermitRootLogin yes gesetzt haben.", + "tunnelSettings": "Tunnel-Einstellungen", + "tunnelType": "Tunneltyp" + }, + "nav": { + "portForwarding": "Weiterleitung", + "tunnels": "Tunnel" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lokal lauschen)", + "localTargetHost": "127.0.0.1 (Ziel auf diesem Computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (auf Endpunkt lauschen)", + "remoteTargetHost": "127.0.0.1 (Ziel vom Endpunkt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-Listener)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokale Client-Tunnel auf diesem Desktop konfiguriert.", + "c2sLoadPreset": "Laden", + "c2sNoPresetSelected": "Keine Voreinstellung ausgewählt", + "c2sNoPresets": "Keine Voreinstellungen gespeichert", + "c2sPresetDeleted": "Client-Tunnel-Voreinstellung gelöscht", + "c2sPresetLoadError": "Fehler beim Laden der Client-Tunnel-Voreinstellungen", + "c2sPresetLoaded": "Client-Tunnel-Voreinstellung lokal geladen", + "c2sPresetName": "Voreinstellungsname", + "c2sPresetNamePlaceholder": "Name der Client-Voreinstellung", + "c2sPresetRenamed": "Client-Tunnel-Voreinstellung umbenannt", + "c2sPresetSaved": "Client-Tunnel-Voreinstellung gespeichert", + "c2sPresetSyncNote": "Voreinstellungen sind explizite Snapshots; das Laden einer Voreinstellung ersetzt die lokale Client-Tunnel-Liste dieses Desktop-Clients.", + "c2sPresetToLoad": "Zu ladende Voreinstellung", + "c2sTunnelPresets": "Client-Tunnel-Voreinstellungen", + "c2sTunnelPresetsUnavailable": "Client-Tunnel-Voreinstellungen sind nur im Desktop-Client verfügbar." + }, + "tunnels": { + "attempt": "Versuch {{current}} von {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokal {{localPort}}", + "autoStart": "Autostart", + "cancel": "Abbrechen", + "canceling": "Wird abgebrochen...", + "clientAutoStartDesc": "Startet automatisch, wenn dieser Desktop-Client geöffnet wird und die Verbindung aufrechterhalten wird.", + "clientManualStartDesc": "Verwenden Sie Start und Stopp in dieser Zeile. Termix startet den Tunnel nicht automatisch.", + "clientRemoteServerNote": "Remote-Weiterleitung erfordert möglicherweise AllowTcpForwarding und GatewayPorts auf dem Endpunkt-SSH-Server. Der entfernte Port wird geschlossen, wenn dieser Desktop die Verbindung trennt.", + "clientTunnelStarted": "Client-Tunnel gestartet", + "clientTunnelStopped": "Client-Tunnel gestoppt", + "clientTunnels": "Client-Tunnel", + "connected": "Verbunden", + "connecting": "Verbinde...", + "createFirstTunnelMessage": "Sie haben noch keine SSH-Tunnel erstellt. Konfigurieren Sie Tunnelverbindungen im Host-Manager, um zu beginnen.", + "currentHostPort": "Aktueller Host-Port", + "destination": "Ziel", + "destinationAddress": "Zieladresse", + "destinationPort": "Zielhafen", + "disconnected": "Getrennt", + "duplicateAutoStartBind": "Nur ein automatisch startender Client-Tunnel kann {{bind}} verwenden.", + "endpointPort": "Endpunkt-Port", + "endpointSshHost": "Endpunkt-SSH-Host", + "endpointSshHostPlaceholder": "Konfigurierten Host auswählen", + "endpointSshHostRequired": "Wählen Sie einen Endpunkt-SSH-Host für jeden Client-Tunnel aus.", + "error": "Fehler", + "forwardDescriptionClientDynamic": "SOCKS auf lokalem Port {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokal {{sourcePort}} → entfernt {{endpointPort}}.", + "forwardDescriptionClientRemote": "Entfernt {{sourcePort}} → lokal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS auf aktuellem Host {{sourcePort}}.", + "forwardDescriptionServerLocal": "Aktueller Host {{sourcePort}} → Endpunkt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endpunkt {{endpointPort}} → aktueller Host {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Zwischenwirt", + "invalidBindIp": "Lokale IP muss eine gültige IPv4-Adresse sein.", + "invalidEndpointPort": "Endpunkt-Port muss zwischen 1 und 65535 liegen.", + "invalidLocalPort": "Lokaler Port muss zwischen 1 und 65535 liegen.", + "invalidLocalTargetIp": "Lokale Ziel-IP muss eine gültige IPv4-Adresse sein.", + "invalidLocalTargetPort": "Lokaler Zielport muss zwischen 1 und 65535 liegen.", + "invalidRemoteAddress": "Eine Remote-Adresse ist erforderlich.", + "invalidRemotePort": "Remote-Port muss zwischen 1 und 65535 liegen.", + "lastError": "Letzter Fehler", + "lastStarted": "Zuletzt gestartet", + "lastTested": "Zuletzt getestet", + "localAddress": "Lokale Adresse", + "localPort": "Lokaler Port", + "localSaveError": "Fehler beim Speichern der lokalen Client-Tunnel", + "localSaved": "Client-Tunnel gespeichert", + "manualControlError": "Fehler beim Aktualisieren des Tunnelstatus.", + "maxRetries": "Max. Wiederholungen", + "mode": "Modus", + "nextRetryIn": "Nächster Wiederholungsversuch in {{seconds}} Sekunden", + "noClientTunnels": "Keine Client-Tunnel auf diesem Desktop konfiguriert.", + "noHostSelected": "Kein Host ausgewählt", + "noSshTunnels": "Keine SSH-Tunnel", + "port": "Port", + "remoteBindAddress": "Remote-Bind-Adresse", + "remoteHost": "Remote-Host", + "remotePort": "Remote-Port", + "retryInterval": "Wiederholungsintervall (Sekunden)", + "route": "Route:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} auf {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Tunnelname", + "tunnelTestFailed": "Tunneltest fehlgeschlagen", + "tunnelTestSucceeded": "Tunneltest erfolgreich", + "type": "Tunneltyp", + "typeDynamic": "Dynamisch (-D)", + "typeLocal": "Lokal (-L)", + "typeRemote": "Remote (-R)", + "working": "In Bearbeitung..." + } +} diff --git a/plugins/tunnels/locales/translated/el_GR.json b/plugins/tunnels/locales/translated/el_GR.json new file mode 100644 index 000000000..341d80fd9 --- /dev/null +++ b/plugins/tunnels/locales/translated/el_GR.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Προσθήκη σήραγγας", + "autoStartDesc": "Αυτόματη σύνδεση αυτής της σήραγγας όταν φορτωθεί ο κεντρικός υπολογιστής", + "autoStartLabel": "Αυτόματη εκκίνηση", + "connectBtn": "Συνδέω", + "disconnectBtn": "Αποσυνδέω", + "enableTunneling": "Ενεργοποίηση σήραγγας", + "enableTunnelingDesc": "Ενεργοποίηση λειτουργικότητας σήραγγας SSH για αυτόν τον κεντρικό υπολογιστή", + "endpointHost": "Κεντρικός υπολογιστής τελικού σημείου", + "endpointHostPlaceholder": "Ίδιος κεντρικός υπολογιστής, κεντρικός υπολογιστής SSH ή προσβάσιμος κεντρικός υπολογιστής/IP", + "endpointPort": "Θύρα τελικού σημείου", + "failedToConnectTunnel": "Αποτυχία σύνδεσης", + "failedToDisconnectTunnel": "Η αποσύνδεση απέτυχε", + "maxRetries": "Μέγιστος αριθμός επαναλήψεων", + "noTunnelsConfigured": "Δεν έχουν διαμορφωθεί σήραγγες.", + "retryIntervalS": "Διάστημα επανάληψης (s)", + "serverTunnelsSection": "Σήραγγες διακομιστή", + "sourcePort": "Θύρα πηγής", + "tabTunnels": "Σήραγγες", + "tunnelConnecting": "Σύνδεση σήραγγας...", + "tunnelDisconnected": "Η σήραγγα αποσυνδέθηκε", + "tunnelLabel": "Σήραγγα {{number}}", + "tunnelModeDynamicDesc": "Δημιουργήστε έναν διακομιστή μεσολάβησης SOCKS5 σε μια τοπική θύρα για δυναμική προώθηση θυρών.", + "tunnelModeLocalDesc": "Προώθηση μιας τοπικής θύρας σε μια θύρα στον απομακρυσμένο διακομιστή (ή σε έναν κεντρικό υπολογιστή προσβάσιμο από αυτόν).", + "tunnelModeRemoteDesc": "Προωθήστε μια θύρα στον απομακρυσμένο διακομιστή πίσω σε μια τοπική θύρα στο μηχάνημά σας.", + "tunnelRequirementsText": "Ο διακομιστής SSH πρέπει να έχει ορίσει τις τιμές GatewayPorts yes, AllowTcpForwarding yes και PermitRootLogin yes στο /etc/ssh/sshd_config.", + "tunnelSettings": "Ρυθμίσεις σήραγγας", + "tunnelType": "Τύπος σήραγγας" + }, + "nav": { + "portForwarding": "Προώθηση", + "tunnels": "Σήραγγες" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (ακρόαση τοπικά)", + "localTargetHost": "127.0.0.1 (προορισμός σε αυτόν τον υπολογιστή)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (ακρόαση στο τελικό σημείο)", + "remoteTargetHost": "127.0.0.1 (στόχος από το τελικό σημείο)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (ακροατής SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} τοπική(ές) διοχέτευση(εις) πελάτη που έχουν ρυθμιστεί σε αυτήν την επιφάνεια εργασίας.", + "c2sLoadPreset": "Φορτίο", + "c2sNoPresetSelected": "Δεν έχει επιλεγεί προεπιλογή", + "c2sNoPresets": "Δεν έχουν αποθηκευτεί προεπιλογές", + "c2sPresetDeleted": "Η προεπιλογή σήραγγας πελάτη διαγράφηκε", + "c2sPresetLoadError": "Αποτυχία φόρτωσης προεπιλογών σήραγγας πελάτη", + "c2sPresetLoaded": "Η προεπιλογή σήραγγας πελάτη φορτώθηκε τοπικά", + "c2sPresetName": "Όνομα προεπιλογής", + "c2sPresetNamePlaceholder": "Όνομα προεπιλογής πελάτη", + "c2sPresetRenamed": "Η προεπιλογή σήραγγας πελάτη μετονομάστηκε", + "c2sPresetSaved": "Η προεπιλογή σήραγγας πελάτη αποθηκεύτηκε", + "c2sPresetSyncNote": "Οι προεπιλογές είναι σαφή στιγμιότυπα. Η φόρτωση ενός αντικαθιστά τη λίστα τοπικής σήραγγας πελατών αυτού του υπολογιστή-πελάτη επιφάνειας εργασίας.", + "c2sPresetToLoad": "Προεπιλογή για φόρτωση", + "c2sTunnelPresets": "Προεπιλογές σήραγγας πελάτη", + "c2sTunnelPresetsUnavailable": "Οι προεπιλογές σήραγγας προγράμματος-πελάτη είναι διαθέσιμες μόνο στον υπολογιστή-πελάτη για υπολογιστές." + }, + "tunnels": { + "attempt": "Προσπάθεια {{current}} από {{max}}", + "autoNameClientDynamic": "ΚΑΛΤΣΕΣ {{localPort}} μέσω {{endpoint}}", + "autoNameClientLocal": "Τοπικό {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → τοπικό {{localPort}}", + "autoStart": "Αυτόματη έναρξη", + "cancel": "Ματαίωση", + "canceling": "Ακύρωση...", + "clientAutoStartDesc": "Ξεκινά όταν ανοίξει αυτός ο υπολογιστής-πελάτης επιφάνειας εργασίας και παραμένει συνδεδεμένος.", + "clientManualStartDesc": "Χρησιμοποιήστε τις εντολές Έναρξη και Διακοπή από αυτήν τη γραμμή. Το Termix δεν θα την ανοίξει αυτόματα.", + "clientRemoteServerNote": "Η απομακρυσμένη προώθηση ενδέχεται να απαιτεί AllowTcpForwarding και GatewayPorts στον διακομιστή SSH τελικού σημείου. Η απομακρυσμένη θύρα κλείνει όταν αποσυνδεθεί αυτή η επιφάνεια εργασίας.", + "clientTunnelStarted": "Ξεκίνησε η σήραγγα πελατών", + "clientTunnelStopped": "Η σήραγγα πελατών διακόπηκε", + "clientTunnels": "Σήραγγες Πελατών", + "connected": "Συνδεδεμένος", + "connecting": "Συνδετικός...", + "createFirstTunnelMessage": "Δεν έχετε δημιουργήσει ακόμη σήραγγες SSH. Διαμορφώστε τις συνδέσεις σήραγγας στο Host Manager για να ξεκινήσετε.", + "currentHostPort": "Τρέχουσα θύρα κεντρικού υπολογιστή", + "destination": "Προορισμός", + "destinationAddress": "Διεύθυνση προορισμού", + "destinationPort": "Λιμάνι προορισμού", + "disconnected": "Ασύνδετος", + "duplicateAutoStartBind": "Μόνο μία σήραγγα προγράμματος-πελάτη αυτόματης εκκίνησης μπορεί να χρησιμοποιήσει το {{bind}}.", + "endpointPort": "Θύρα τελικού σημείου", + "endpointSshHost": "Κεντρικός υπολογιστής SSH τελικού σημείου", + "endpointSshHostPlaceholder": "Επιλέξτε έναν διαμορφωμένο κεντρικό υπολογιστή", + "endpointSshHostRequired": "Επιλέξτε έναν κεντρικό υπολογιστή SSH τελικού σημείου για κάθε σήραγγα πελάτη.", + "error": "Σφάλμα", + "forwardDescriptionClientDynamic": "SOCKS στην τοπική θύρα {{sourcePort}}.", + "forwardDescriptionClientLocal": "Τοπικό {{sourcePort}} → απομακρυσμένο {{endpointPort}}.", + "forwardDescriptionClientRemote": "Απομακρυσμένο {{sourcePort}} → τοπικό {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS στον τρέχοντα κεντρικό υπολογιστή {{sourcePort}}.", + "forwardDescriptionServerLocal": "Τρέχων κεντρικός υπολογιστής {{sourcePort}} → τελικό σημείο {{endpointPort}}.", + "forwardDescriptionServerRemote": "Τελικό σημείο {{endpointPort}} → τρέχων κεντρικός υπολογιστής {{sourcePort}}.", + "host": "Πλήθος", + "intermediateHost": "Ενδιάμεσος οικοδεσπότης", + "invalidBindIp": "Η τοπική διεύθυνση IP πρέπει να είναι μια έγκυρη διεύθυνση IPv4.", + "invalidEndpointPort": "Η θύρα τελικού σημείου πρέπει να είναι μεταξύ 1 και 65535.", + "invalidLocalPort": "Η τοπική θύρα πρέπει να είναι μεταξύ 1 και 65535.", + "invalidLocalTargetIp": "Η τοπική IP προορισμού πρέπει να είναι μια έγκυρη διεύθυνση IPv4.", + "invalidLocalTargetPort": "Η τοπική θύρα προορισμού πρέπει να είναι μεταξύ 1 και 65535.", + "invalidRemoteAddress": "Απαιτείται απομακρυσμένη διεύθυνση.", + "invalidRemotePort": "Η απομακρυσμένη θύρα πρέπει να είναι μεταξύ 1 και 65535.", + "lastError": "Τελευταίο σφάλμα", + "lastStarted": "Τελευταία έναρξη", + "lastTested": "Τελευταία δοκιμή", + "localAddress": "Τοπική διεύθυνση", + "localPort": "Τοπικό Λιμάνι", + "localSaveError": "Αποτυχία αποθήκευσης τοπικών σηράγγων πελατών", + "localSaved": "Οι σήραγγες πελατών αποθηκεύτηκαν", + "manualControlError": "Αποτυχία ενημέρωσης κατάστασης σήραγγας.", + "maxRetries": "Μέγιστος αριθμός επαναλήψεων", + "mode": "Τρόπος", + "nextRetryIn": "Επόμενη προσπάθεια σε {{seconds}} δευτερόλεπτα", + "noClientTunnels": "Δεν έχουν ρυθμιστεί σήραγγες-πελάτες σε αυτήν την επιφάνεια εργασίας.", + "noHostSelected": "Δεν έχει επιλεγεί κεντρικός υπολογιστής", + "noSshTunnels": "Δεν υπάρχουν σήραγγες SSH", + "port": "Λιμάνι", + "remoteBindAddress": "Διεύθυνση απομακρυσμένης σύνδεσης", + "remoteHost": "Απομακρυσμένος κεντρικός υπολογιστής", + "remotePort": "Απομακρυσμένη θύρα", + "retryInterval": "Διάστημα επανάληψης (δευτερόλεπτα)", + "route": "Διαδρομή:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ΚΑΛΤΣΕΣ μέσω {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} μέσω {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} στις {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Δοκιμή", + "tunnelName": "Όνομα σήραγγας", + "tunnelTestFailed": "Η δοκιμή σήραγγας απέτυχε", + "tunnelTestSucceeded": "Η δοκιμή της σήραγγας ήταν επιτυχής", + "type": "Τύπος σήραγγας", + "typeDynamic": "Δυναμικό (-D)", + "typeLocal": "Τοπικό (-L)", + "typeRemote": "Τηλεχειριστήριο (-R)", + "working": "Εργαζόμενος..." + } +} diff --git a/plugins/tunnels/locales/translated/es_ES.json b/plugins/tunnels/locales/translated/es_ES.json new file mode 100644 index 000000000..a89455510 --- /dev/null +++ b/plugins/tunnels/locales/translated/es_ES.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Añadir túnel", + "autoStartDesc": "Conectar automáticamente este túnel cuando se cargue el host.", + "autoStartLabel": "Inicio automático", + "connectBtn": "Conectar", + "disconnectBtn": "Desconectar", + "enableTunneling": "Habilitar tunelización", + "enableTunnelingDesc": "Habilitar la funcionalidad de túnel SSH para este host", + "endpointHost": "Host de destino", + "endpointHostPlaceholder": "Mismo host, host SSH o host/dirección IP accesible", + "endpointPort": "Puerto de destino", + "failedToConnectTunnel": "Error al conectar", + "failedToDisconnectTunnel": "Error al desconectar", + "maxRetries": "Reintentos máximos", + "noTunnelsConfigured": "No hay túneles configurados.", + "retryIntervalS": "Intervalo de reintento (s)", + "serverTunnelsSection": "Túneles del servidor", + "sourcePort": "Puerto origen", + "tabTunnels": "Túneles", + "tunnelConnecting": "Túnel conectando...", + "tunnelDisconnected": "Túnel desconectado", + "tunnelLabel": "Túnel {{number}}", + "tunnelModeDynamicDesc": "Crear un proxy SOCKS5 en un puerto local para el reenvío dinámico de puertos.", + "tunnelModeLocalDesc": "Reenviar un puerto local a un puerto en el servidor remoto (o a un host accesible desde él).", + "tunnelModeRemoteDesc": "Reenviar un puerto del servidor remoto a un puerto local en tu equipo.", + "tunnelRequirementsText": "El servidor SSH debe tener GatewayPorts yes, AllowTcpForwarding yes y PermitRootLogin yes configurados en /etc/ssh/sshd_config.", + "tunnelSettings": "Configuración de túnel", + "tunnelType": "Tipo de túnel" + }, + "nav": { + "portForwarding": "Reenvío", + "tunnels": "Túneles" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (escuchar localmente)", + "localTargetHost": "127.0.0.1 (destino en este equipo)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (escuchar en el punto final)", + "remoteTargetHost": "127.0.0.1 (destino desde el punto final)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (escucha SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} túnel(es) de cliente local configurado(s) en este escritorio.", + "c2sLoadPreset": "Cargar", + "c2sNoPresetSelected": "Ningún preajuste seleccionado", + "c2sNoPresets": "No hay preajustes guardados", + "c2sPresetDeleted": "Preajuste de túnel de cliente eliminado", + "c2sPresetLoadError": "Error al cargar los preajustes de túneles de cliente", + "c2sPresetLoaded": "Preajuste de túnel de cliente cargado localmente", + "c2sPresetName": "Nombre del preajuste", + "c2sPresetNamePlaceholder": "Nombre del preajuste de cliente", + "c2sPresetRenamed": "Preajuste de túnel de cliente renombrado", + "c2sPresetSaved": "Preajuste de túnel de cliente guardado", + "c2sPresetSyncNote": "Los preajustes son instantáneas explícitas; cargar uno reemplaza la lista de túneles de cliente local de este cliente de escritorio.", + "c2sPresetToLoad": "Preajuste a cargar", + "c2sTunnelPresets": "Preajustes de túneles de cliente", + "c2sTunnelPresetsUnavailable": "Los preajustes de túneles de cliente solo están disponibles en el cliente de escritorio." + }, + "tunnels": { + "attempt": "Intento {{current}} de {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} a través de {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Inicio automático", + "cancel": "Cancelar", + "canceling": "Cancelando...", + "clientAutoStartDesc": "Se inicia al abrir este cliente de escritorio y permanece conectado.", + "clientManualStartDesc": "Use Iniciar y Detener desde esta fila. Termix no lo iniciará automáticamente.", + "clientRemoteServerNote": "El reenvío remoto puede requerir AllowTcpForwarding y GatewayPorts en el servidor SSH del endpoint. El puerto remoto se cierra cuando este escritorio se desconecta.", + "clientTunnelStarted": "Túnel de cliente iniciado", + "clientTunnelStopped": "Túnel de cliente detenido", + "clientTunnels": "Túneles de cliente", + "connected": "Conectado", + "connecting": "Conectando...", + "createFirstTunnelMessage": "Aún no has creado ningún túnel SSH. Configura las conexiones de túnel en el Administrador de hosts para empezar.", + "currentHostPort": "Puerto del host actual", + "destination": "Destino", + "destinationAddress": "Dirección de destino", + "destinationPort": "Puerto de destino", + "disconnected": "Desconectado", + "duplicateAutoStartBind": "Solo un túnel de cliente de inicio automático puede usar {{bind}}.", + "endpointPort": "Puerto del endpoint", + "endpointSshHost": "Host SSH del endpoint", + "endpointSshHostPlaceholder": "Seleccionar un host configurado", + "endpointSshHostRequired": "Seleccione un host SSH del endpoint para cada túnel de cliente.", + "error": "Error", + "forwardDescriptionClientDynamic": "SOCKS en puerto local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → remoto {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remoto {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS en el host actual {{sourcePort}}.", + "forwardDescriptionServerLocal": "Host actual {{sourcePort}} → endpoint {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endpoint {{endpointPort}} → host actual {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Huésped intermedio", + "invalidBindIp": "La IP local debe ser una dirección IPv4 válida.", + "invalidEndpointPort": "El puerto del endpoint debe estar entre 1 y 65535.", + "invalidLocalPort": "El puerto local debe estar entre 1 y 65535.", + "invalidLocalTargetIp": "La IP de destino local debe ser una dirección IPv4 válida.", + "invalidLocalTargetPort": "El puerto de destino local debe estar entre 1 y 65535.", + "invalidRemoteAddress": "Se requiere una dirección remota.", + "invalidRemotePort": "El puerto remoto debe estar entre 1 y 65535.", + "lastError": "Último error", + "lastStarted": "Último inicio", + "lastTested": "Última prueba", + "localAddress": "Dirección local", + "localPort": "Puerto local", + "localSaveError": "Error al guardar los túneles de cliente locales", + "localSaved": "Túneles de cliente guardados", + "manualControlError": "Error al actualizar el estado del túnel.", + "maxRetries": "Reintentos máx.", + "mode": "Modo", + "nextRetryIn": "Próximo reintento en {{seconds}} segundos", + "noClientTunnels": "No hay túneles de cliente configurados en este escritorio.", + "noHostSelected": "Ningún host seleccionado", + "noSshTunnels": "Sin túneles SSH", + "port": "Puerto", + "remoteBindAddress": "Dirección de enlace remoto", + "remoteHost": "Host remoto", + "remotePort": "Puerto remoto", + "retryInterval": "Intervalo de reintento (segundos)", + "route": "Ruta:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS a través de {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} vía {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} en {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Probar", + "tunnelName": "Nombre del túnel", + "tunnelTestFailed": "Prueba de túnel fallida", + "tunnelTestSucceeded": "Prueba de túnel exitosa", + "type": "Tipo de túnel", + "typeDynamic": "Dinámico (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Remoto (-R)", + "working": "Trabajando..." + } +} diff --git a/plugins/tunnels/locales/translated/fi_FI.json b/plugins/tunnels/locales/translated/fi_FI.json new file mode 100644 index 000000000..9092450b5 --- /dev/null +++ b/plugins/tunnels/locales/translated/fi_FI.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Lisää tunneli", + "autoStartDesc": "Yhdistä tämä tunneli automaattisesti, kun isäntä ladataan", + "autoStartLabel": "Automaattinen käynnistys", + "connectBtn": "Yhdistä", + "disconnectBtn": "Katkaise yhteys", + "enableTunneling": "Ota tunnelointi käyttöön", + "enableTunnelingDesc": "Ota SSH-tunnelitoiminto käyttöön tälle isännälle", + "endpointHost": "Päätepisteen isäntä", + "endpointHostPlaceholder": "Sama isäntä, SSH-isäntä tai tavoitettava isäntä/IP-osoite", + "endpointPort": "Päätepisteen portti", + "failedToConnectTunnel": "Yhteyden muodostaminen epäonnistui", + "failedToDisconnectTunnel": "Yhteyden katkaiseminen epäonnistui", + "maxRetries": "Maks. uudelleenyritykset", + "noTunnelsConfigured": "Ei tunneleita määritettynä.", + "retryIntervalS": "Uudelleenyritysväli (s)", + "serverTunnelsSection": "Palvelintunnelit", + "sourcePort": "Lähdeportti", + "tabTunnels": "Tunnelit", + "tunnelConnecting": "Tunneli, joka yhdistää...", + "tunnelDisconnected": "Tunneli irrotettu", + "tunnelLabel": "Tunneli {{number}}", + "tunnelModeDynamicDesc": "Luo SOCKS5-välityspalvelin paikalliseen porttiin dynaamista portin edelleenlähetystä varten.", + "tunnelModeLocalDesc": "Lähetä paikallinen portti etäpalvelimen (tai siitä tavoitettavan isännän) porttiin.", + "tunnelModeRemoteDesc": "Lähetä etäpalvelimen portti takaisin oman koneesi paikalliseen porttiin.", + "tunnelRequirementsText": "SSH-palvelimella on oltava GatewayPorts-, AllowTcpForwarding- ja PermitRootLogin-arvot asetettuina tiedostossa /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnelin asetukset", + "tunnelType": "Tunnelin tyyppi" + }, + "nav": { + "portForwarding": "Edelleenlähetys", + "tunnels": "Tunnelit" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (kuuntele paikallisesti)", + "localTargetHost": "127.0.0.1 (kohde tässä tietokoneessa)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (kuuntele päätepisteessä)", + "remoteTargetHost": "127.0.0.1 (kohde päätepisteestä)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-kuuntelija)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} paikallista asiakastunnelia, jotka on konfiguroitu tälle työpöydälle.", + "c2sLoadPreset": "Ladata", + "c2sNoPresetSelected": "Ei valittua esiasetusta", + "c2sNoPresets": "Ei tallennettuja esiasetuksia", + "c2sPresetDeleted": "Asiakastunnelin esiasetus poistettu", + "c2sPresetLoadError": "Asiakasohjelman tunnelin esiasetusten lataaminen epäonnistui", + "c2sPresetLoaded": "Asiakastunnelin esiasetus ladattu paikallisesti", + "c2sPresetName": "Esiasetetun nimen", + "c2sPresetNamePlaceholder": "Asiakkaan esiasetettu nimi", + "c2sPresetRenamed": "Asiakastunnelin esiasetettu nimi", + "c2sPresetSaved": "Asiakastunnelin esiasetus tallennettu", + "c2sPresetSyncNote": "Esiasetukset ovat eksplisiittisiä tilannevedoksia; yhden lataaminen korvaa tämän työpöytäasiakkaan paikallisen asiakastunneliluettelon.", + "c2sPresetToLoad": "Ladattava esiasetus", + "c2sTunnelPresets": "Asiakastunnelin esiasetukset", + "c2sTunnelPresetsUnavailable": "Asiakasohjelman tunnelin esiasetukset ovat käytettävissä vain työpöytäsovelluksessa." + }, + "tunnels": { + "attempt": "Yritys {{current}} / {{max}}", + "autoNameClientDynamic": "SUKAT {{localPort}} kautta {{endpoint}}", + "autoNameClientLocal": "Paikallinen {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → paikallinen {{localPort}}", + "autoStart": "Automaattinen käynnistys", + "cancel": "Peruuttaa", + "canceling": "Peruutetaan...", + "clientAutoStartDesc": "Käynnistyy, kun tämä työpöytäsovellus avautuu ja pysyy yhteydessä.", + "clientManualStartDesc": "Käytä Käynnistä- ja Pysäytä-painikkeita tältä riviltä. Termix ei avaa sitä automaattisesti.", + "clientRemoteServerNote": "Etä edelleenlähetys saattaa vaatia AllowTcpForwarding- ja GatewayPorts-määritykset SSH-päätepalvelimella. Etäportti sulkeutuu, kun tämä työpöytä katkaisee yhteyden.", + "clientTunnelStarted": "Asiakastunneli aloitettu", + "clientTunnelStopped": "Asiakastunneli pysäytetty", + "clientTunnels": "Asiakastunnelit", + "connected": "Yhdistetty", + "connecting": "Yhdistetään...", + "createFirstTunnelMessage": "Et ole vielä luonut SSH-tunneleita. Aloita määrittämällä tunneliyhteydet Host Managerissa.", + "currentHostPort": "Nykyinen isäntäportti", + "destination": "Määränpää", + "destinationAddress": "Kohdeosoite", + "destinationPort": "Määränpääsatama", + "disconnected": "Yhteys katkennut", + "duplicateAutoStartBind": "Vain yksi automaattisesti käynnistyvä asiakastunneli voi käyttää {{bind}} -merkkiä.", + "endpointPort": "Päätepisteen portti", + "endpointSshHost": "Päätepisteen SSH-isäntä", + "endpointSshHostPlaceholder": "Valitse määritetty isäntä", + "endpointSshHostRequired": "Valitse kullekin asiakastunnelille SSH-päätepisteisäntä.", + "error": "Virhe", + "forwardDescriptionClientDynamic": "SOCKS paikallisessa portissa {{sourcePort}}.", + "forwardDescriptionClientLocal": "Paikallinen {{sourcePort}} → etäinen {{endpointPort}}.", + "forwardDescriptionClientRemote": "Etäinen {{sourcePort}} → paikallinen {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS nykyisellä koneella {{sourcePort}}.", + "forwardDescriptionServerLocal": "Nykyinen isäntä {{sourcePort}} → päätepiste {{endpointPort}}.", + "forwardDescriptionServerRemote": "Päätepiste {{endpointPort}} → nykyinen isäntä {{sourcePort}}.", + "host": "Isäntä", + "intermediateHost": "Väliaikainen isäntä", + "invalidBindIp": "Paikallisen IP-osoitteen on oltava kelvollinen IPv4-osoite.", + "invalidEndpointPort": "Päätepisteen portin on oltava välillä 1–65535.", + "invalidLocalPort": "Paikallisen portin on oltava välillä 1–65535.", + "invalidLocalTargetIp": "Paikallisen kohde-IP-osoitteen on oltava kelvollinen IPv4-osoite.", + "invalidLocalTargetPort": "Paikallisen kohdeportin on oltava välillä 1–65535.", + "invalidRemoteAddress": "Etäosoite vaaditaan.", + "invalidRemotePort": "Etäportin on oltava välillä 1–65535.", + "lastError": "Viimeisin virhe", + "lastStarted": "Viimeksi aloitettu", + "lastTested": "Viimeksi testattu", + "localAddress": "Paikallinen osoite", + "localPort": "Paikallinen satama", + "localSaveError": "Paikallisten asiakastunnelien tallentaminen epäonnistui", + "localSaved": "Asiakastunnelit tallennettu", + "manualControlError": "Tunnelin tilan päivittäminen epäonnistui.", + "maxRetries": "Uudelleenyritysten enimmäismäärä", + "mode": "Tila", + "nextRetryIn": "Seuraava uudelleenyritys {{seconds}} sekunnin kuluttua", + "noClientTunnels": "Tälle työpöydälle ei ole määritetty asiakastunneleita.", + "noHostSelected": "Ei valittua isäntää", + "noSshTunnels": "Ei SSH-tunneleita", + "port": "Portti", + "remoteBindAddress": "Etäsidontaosoite", + "remoteHost": "Etäisäntä", + "remotePort": "Etäportti", + "retryInterval": "Uudelleenyritysväli (sekuntia)", + "route": "Reitti:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SUKAT {{endpoint}} kautta", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} kautta {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} kohdassa {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Testata", + "tunnelName": "Tunnelin nimi", + "tunnelTestFailed": "Tunnelitesti epäonnistui", + "tunnelTestSucceeded": "Tunnelitesti onnistui", + "type": "Tunnelin tyyppi", + "typeDynamic": "Dynaaminen (-D)", + "typeLocal": "Paikallinen (-L)", + "typeRemote": "Kauko-ohjain (-R)", + "working": "Työskentely..." + } +} diff --git a/plugins/tunnels/locales/translated/fr_FR.json b/plugins/tunnels/locales/translated/fr_FR.json new file mode 100644 index 000000000..dff98f7bc --- /dev/null +++ b/plugins/tunnels/locales/translated/fr_FR.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Ajouter un tunnel", + "autoStartDesc": "Connecter automatiquement ce tunnel lorsque l'hôte est chargé", + "autoStartLabel": "Démarrage automatique", + "connectBtn": "Connecter", + "disconnectBtn": "Déconnecter", + "enableTunneling": "Activer le tunneling", + "enableTunnelingDesc": "Activer la fonctionnalité de tunnel SSH pour cet hôte", + "endpointHost": "Hôte de destination", + "endpointHostPlaceholder": "Même hôte, hôte SSH ou hôte/IP accessible", + "endpointPort": "Port de destination", + "failedToConnectTunnel": "Échec de la connexion", + "failedToDisconnectTunnel": "Échec de la déconnexion", + "maxRetries": "Tentatives max", + "noTunnelsConfigured": "Aucun tunnel configuré.", + "retryIntervalS": "Intervalle de tentative (s)", + "serverTunnelsSection": "Tunnels serveur", + "sourcePort": "Port source", + "tabTunnels": "Tunnels", + "tunnelConnecting": "Connexion du tunnel...", + "tunnelDisconnected": "Tunnel déconnecté", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Crée un proxy SOCKS5 sur un port local pour la redirection de port dynamique.", + "tunnelModeLocalDesc": "Redirige un port local vers un port sur le serveur distant (ou un hôte accessible depuis celui-ci).", + "tunnelModeRemoteDesc": "Redirige un port sur le serveur distant vers un port local sur votre machine.", + "tunnelRequirementsText": "Le serveur SSH doit avoir GatewayPorts yes, AllowTcpForwarding yes et PermitRootLogin yes définis dans /etc/ssh/sshd_config.", + "tunnelSettings": "Paramètres du tunnel", + "tunnelType": "Type de tunnel" + }, + "nav": { + "portForwarding": "Expéditeur", + "tunnels": "Tunnels" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (écouter en local)", + "localTargetHost": "127.0.0.1 (cible sur cet ordinateur)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (écoute sur le point de terminaison)", + "remoteTargetHost": "127.0.0.1 (cible du point de terminaison)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (écouteur SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} tunnel(s) client local configuré(s) sur ce bureau.", + "c2sLoadPreset": "Charger", + "c2sNoPresetSelected": "Aucun préréglage sélectionné", + "c2sNoPresets": "Aucun préréglage enregistré", + "c2sPresetDeleted": "Préréglage de tunnel client supprimé", + "c2sPresetLoadError": "Échec du chargement des préréglages de tunnel client", + "c2sPresetLoaded": "Préréglage de tunnel client chargé localement", + "c2sPresetName": "Nom du préréglage", + "c2sPresetNamePlaceholder": "Nom du préréglage client", + "c2sPresetRenamed": "Préréglage de tunnel client renommé", + "c2sPresetSaved": "Préréglage de tunnel client enregistré", + "c2sPresetSyncNote": "Les préréglages sont des instantanés explicites ; en charger un remplace la liste de tunnels client locaux de ce client de bureau.", + "c2sPresetToLoad": "Préréglage à charger", + "c2sTunnelPresets": "Préréglages de tunnel client", + "c2sTunnelPresetsUnavailable": "Les préréglages de tunnel client sont disponibles uniquement dans le client de bureau." + }, + "tunnels": { + "attempt": "Tentative {{current}} sur {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Démarrage automatique", + "cancel": "Annuler", + "canceling": "Annulation en cours...", + "clientAutoStartDesc": "Démarre à l'ouverture de ce client de bureau et reste connecté.", + "clientManualStartDesc": "Utilisez Démarrer et Arrêter depuis cette ligne. Termix ne l'ouvrira pas automatiquement.", + "clientRemoteServerNote": "La redirection distante peut nécessiter AllowTcpForwarding et GatewayPorts sur le serveur SSH du point de terminaison. Le port distant se ferme lorsque ce bureau se déconnecte.", + "clientTunnelStarted": "Tunnel client démarré", + "clientTunnelStopped": "Tunnel client arrêté", + "clientTunnels": "Tunnels client", + "connected": "Connecté", + "connecting": "Connexion en cours...", + "createFirstTunnelMessage": "Vous n'avez encore créé aucun tunnel SSH. Configurez des connexions de tunnel dans le Gestionnaire d'hôtes pour commencer.", + "currentHostPort": "Port de l'hôte actuel", + "destination": "Destination", + "destinationAddress": "Adresse de destination", + "destinationPort": "Port de destination", + "disconnected": "Déconnecté", + "duplicateAutoStartBind": "Un seul tunnel client à démarrage automatique peut utiliser {{bind}}.", + "endpointPort": "Port du point de terminaison", + "endpointSshHost": "Hôte SSH du point de terminaison", + "endpointSshHostPlaceholder": "Sélectionner un hôte configuré", + "endpointSshHostRequired": "Sélectionnez un hôte SSH de point de terminaison pour chaque tunnel client.", + "error": "Erreur", + "forwardDescriptionClientDynamic": "SOCKS sur le port local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → distant {{endpointPort}}.", + "forwardDescriptionClientRemote": "Distant {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS sur l’hôte actuel {{sourcePort}}.", + "forwardDescriptionServerLocal": "Hôte actuel {{sourcePort}} → point de terminaison {{endpointPort}}.", + "forwardDescriptionServerRemote": "Point de terminaison {{endpointPort}} → hôte actuel {{sourcePort}}.", + "host": "Hôte", + "intermediateHost": "Hôte intermédiaire", + "invalidBindIp": "L'IP locale doit être une adresse IPv4 valide.", + "invalidEndpointPort": "Le port du point de terminaison doit être compris entre 1 et 65535.", + "invalidLocalPort": "Le port local doit être compris entre 1 et 65535.", + "invalidLocalTargetIp": "L'IP cible locale doit être une adresse IPv4 valide.", + "invalidLocalTargetPort": "Le port cible local doit être compris entre 1 et 65535.", + "invalidRemoteAddress": "Une adresse distante est requise.", + "invalidRemotePort": "Le port distant doit être compris entre 1 et 65535.", + "lastError": "Dernière erreur", + "lastStarted": "Dernier démarrage", + "lastTested": "Dernier test", + "localAddress": "Adresse locale", + "localPort": "Port local", + "localSaveError": "Échec de l'enregistrement des tunnels client locaux", + "localSaved": "Tunnels client enregistrés", + "manualControlError": "Échec de la mise à jour de l'état du tunnel.", + "maxRetries": "Tentatives maximum", + "mode": "Mode", + "nextRetryIn": "Prochaine tentative dans {{seconds}} secondes", + "noClientTunnels": "Aucun tunnel client configuré sur ce bureau.", + "noHostSelected": "Aucun hôte sélectionné", + "noSshTunnels": "Aucun tunnel SSH", + "port": "Port", + "remoteBindAddress": "Adresse de liaison distante", + "remoteHost": "Hôte distant", + "remotePort": "Port distant", + "retryInterval": "Intervalle de réessai (secondes)", + "route": "Route :", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} sur {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Tester", + "tunnelName": "Nom du tunnel", + "tunnelTestFailed": "Échec du test du tunnel", + "tunnelTestSucceeded": "Test du tunnel réussi", + "type": "Type de tunnel", + "typeDynamic": "Dynamique (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Distant (-R)", + "working": "En cours…" + } +} diff --git a/plugins/tunnels/locales/translated/he_IL.json b/plugins/tunnels/locales/translated/he_IL.json new file mode 100644 index 000000000..2890d2b45 --- /dev/null +++ b/plugins/tunnels/locales/translated/he_IL.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "הוסף מנהרה", + "autoStartDesc": "חבר אוטומטית את המנהרה הזו כאשר המארח נטען", + "autoStartLabel": "הפעלה אוטומטית", + "connectBtn": "לְחַבֵּר", + "disconnectBtn": "לְנַתֵק", + "enableTunneling": "הפעלת מנהור", + "enableTunnelingDesc": "הפעל פונקציונליות מנהרת SSH עבור מארח זה", + "endpointHost": "מארח נקודת קצה", + "endpointHostPlaceholder": "אותו מארח, מארח SSH, או מארח/IP נגיש", + "endpointPort": "יציאת נקודת קצה", + "failedToConnectTunnel": "נכשל בחיבור", + "failedToDisconnectTunnel": "נכשל הניתוק", + "maxRetries": "מקסימום ניסיונות חוזרים", + "noTunnelsConfigured": "לא הוגדרו מנהרות.", + "retryIntervalS": "מרווח זמן לניסיון חוזר (ים)", + "serverTunnelsSection": "מנהרות שרתים", + "sourcePort": "יציאת מקור", + "tabTunnels": "מנהרות", + "tunnelConnecting": "מנהרה מתחברת...", + "tunnelDisconnected": "מנהרה מנותקת", + "tunnelLabel": "מנהרה {{number}}", + "tunnelModeDynamicDesc": "צור פרוקסי SOCKS5 בפורט מקומי עבור העברת פורטים דינמית.", + "tunnelModeLocalDesc": "העברת פורט מקומי לפורט בשרת מרוחק (או למארח שניתן להגיע אליו ממנו).", + "tunnelModeRemoteDesc": "העבר פורט בשרת המרוחק חזרה לפורט מקומי במחשב שלך.", + "tunnelRequirementsText": "שרת ה-SSH חייב להגדיר את האפשרויות GatewayPorts כן, AllowTcpForwarding כן, ו-PermitRootLogin כן ב-/etc/ssh/sshd_config.", + "tunnelSettings": "הגדרות מנהרה", + "tunnelType": "סוג המנהרה" + }, + "nav": { + "portForwarding": "העברה", + "tunnels": "מנהרות" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (האזנה מקומית)", + "localTargetHost": "127.0.0.1 (היעד במחשב זה)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (האזנה בנקודת הקצה)", + "remoteTargetHost": "127.0.0.1 (יעד מנקודת הקצה)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (מאזין SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "מנהרה/ות לקוח מקומיות {{count}} מוגדרות בשולחן עבודה זה.", + "c2sLoadPreset": "לִטעוֹן", + "c2sNoPresetSelected": "לא נבחרה הגדרה מוגדרת מראש", + "c2sNoPresets": "לא נשמרו הגדרות קבועות מראש", + "c2sPresetDeleted": "מנהרת הלקוח מוגדרת מראש נמחקה", + "c2sPresetLoadError": "נכשלה טעינת הגדרות קבועות מראש של מנהרת הלקוח", + "c2sPresetLoaded": "מנהרת לקוח מוגדרת מראש נטענת באופן מקומי", + "c2sPresetName": "שם מוגדר מראש", + "c2sPresetNamePlaceholder": "שם קבוע מראש של הלקוח", + "c2sPresetRenamed": "שם של פריסט של מנהרת הלקוח", + "c2sPresetSaved": "מנהרת הלקוח מוגדרת מראש נשמרה", + "c2sPresetSyncNote": "קביעות מוגדרות מראש הן תמונות בזק מפורשות; טעינת אחת מהן מחליפה את רשימת מנהרות הלקוחות המקומיות של לקוח שולחן העבודה הזה.", + "c2sPresetToLoad": "הגדרה מראש לטעינה", + "c2sTunnelPresets": "קביעות מוגדרות מראש של מנהרת לקוח", + "c2sTunnelPresetsUnavailable": "הגדרות קבועות מראש של מנהרת לקוח זמינות רק בלקוח שולחן העבודה." + }, + "tunnels": { + "attempt": "ניסיון {{current}} של {{max}}", + "autoNameClientDynamic": "גרביים {{localPort}} דרך {{endpoint}}", + "autoNameClientLocal": "מקומי {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → מקומי {{localPort}}", + "autoStart": "הפעלה אוטומטית", + "cancel": "לְבַטֵל", + "canceling": "מבטל...", + "clientAutoStartDesc": "מתחיל כאשר לקוח שולחן עבודה זה נפתח ונשאר מחובר.", + "clientManualStartDesc": "השתמשו בפקודות התחל ועצירה משורה זו. טרמיקס לא יפתח אותה אוטומטית.", + "clientRemoteServerNote": "ייתכן שהעברת נתונים מרחוק תדרוש את AllowTcpForwarding ו-GatewayPorts בשרת ה-SSH של נקודת הקצה. היציאה המרוחקת נסגרת כאשר שולחן עבודה זה מתנתק.", + "clientTunnelStarted": "מנהרת הלקוחות התחילה", + "clientTunnelStopped": "מנהרת הלקוח נעצרה", + "clientTunnels": "מנהרות לקוח", + "connected": "מְחוּבָּר", + "connecting": "מְקַשֵׁר...", + "createFirstTunnelMessage": "עדיין לא יצרת מנהרות SSH. הגדר חיבורי מנהרות במנהל המארח כדי להתחיל.", + "currentHostPort": "יציאת המארח הנוכחית", + "destination": "יַעַד", + "destinationAddress": "כתובת היעד", + "destinationPort": "נמל יעד", + "disconnected": "מְנוּתָק", + "duplicateAutoStartBind": "רק מנהרת לקוח אחת עם הפעלה אוטומטית יכולה להשתמש ב- {{bind}}.", + "endpointPort": "יציאת נקודת קצה", + "endpointSshHost": "מארח SSH של נקודת קצה", + "endpointSshHostPlaceholder": "בחר מארח מוגדר", + "endpointSshHostRequired": "בחר מארח SSH של נקודת קצה עבור כל מנהרת לקוח.", + "error": "שְׁגִיאָה", + "forwardDescriptionClientDynamic": "SOCKS בפורט המקומי {{sourcePort}}.", + "forwardDescriptionClientLocal": "מקומי {{sourcePort}} → מרוחק {{endpointPort}}.", + "forwardDescriptionClientRemote": "מרוחק {{sourcePort}} → מקומי {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS על המארח הנוכחי {{sourcePort}}.", + "forwardDescriptionServerLocal": "מארח נוכחי {{sourcePort}} → נקודת קצה {{endpointPort}}.", + "forwardDescriptionServerRemote": "נקודת קצה {{endpointPort}} → מארח נוכחי {{sourcePort}}.", + "host": "מְאָרֵחַ", + "intermediateHost": "מארח ביניים", + "invalidBindIp": "כתובת IP מקומית חייבת להיות כתובת IPv4 תקפה.", + "invalidEndpointPort": "יציאת נקודת הקצה חייבת להיות בין 1 ל-65535.", + "invalidLocalPort": "היציאה המקומית חייבת להיות בין 1 ל-65535.", + "invalidLocalTargetIp": "כתובת ה-IP המקומית של היעד חייבת להיות כתובת IPv4 חוקית.", + "invalidLocalTargetPort": "יציאת היעד המקומית חייבת להיות בין 1 ל-65535.", + "invalidRemoteAddress": "נדרשת כתובת מרוחקת.", + "invalidRemotePort": "היציאה המרוחקת חייבת להיות בין 1 ל-65535.", + "lastError": "השגיאה האחרונה", + "lastStarted": "התחיל לאחרונה", + "lastTested": "נבדק לאחרונה", + "localAddress": "כתובת מקומית", + "localPort": "נמל מקומי", + "localSaveError": "נכשלה שמירת מנהרות הלקוח המקומיות", + "localSaved": "מנהרות הלקוח נשמרו", + "manualControlError": "עדכון מצב המנהרה נכשל.", + "maxRetries": "מקסימום ניסיונות חוזרים", + "mode": "מצב", + "nextRetryIn": "ניסיון חוזר הבא בעוד {{seconds}} שניות", + "noClientTunnels": "לא הוגדרו מנהרות לקוח בשולחן עבודה זה.", + "noHostSelected": "לא נבחר מארח", + "noSshTunnels": "אין מנהרות SSH", + "port": "נָמָל", + "remoteBindAddress": "כתובת קישור מרחוק", + "remoteHost": "מארח מרוחק", + "remotePort": "יציאה מרוחקת", + "retryInterval": "מרווח זמן לניסיון חוזר (שניות)", + "route": "מַסלוּל:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → גרביים דרך {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} דרך {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} על {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "מִבְחָן", + "tunnelName": "שם המנהרה", + "tunnelTestFailed": "מבחן המנהרה נכשל", + "tunnelTestSucceeded": "מבחן המנהרה הצליח", + "type": "סוג המנהרה", + "typeDynamic": "דינמי (-D)", + "typeLocal": "מקומי (-L)", + "typeRemote": "מרחוק (-R)", + "working": "עובד..." + } +} diff --git a/plugins/tunnels/locales/translated/hi_IN.json b/plugins/tunnels/locales/translated/hi_IN.json new file mode 100644 index 000000000..6494bcce7 --- /dev/null +++ b/plugins/tunnels/locales/translated/hi_IN.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "टनल जोड़ें", + "autoStartDesc": "होस्ट लोड होने पर यह टनल स्वचालित रूप से कनेक्ट करें", + "autoStartLabel": "स्वतः आरंभ", + "connectBtn": "कनेक्ट करें", + "disconnectBtn": "डिस्कनेक्ट करें", + "enableTunneling": "टनलिंग सक्षम करें", + "enableTunnelingDesc": "इस होस्ट के लिए SSH टनल कार्यक्षमता सक्षम करें", + "endpointHost": "एंडपॉइंट होस्ट", + "endpointHostPlaceholder": "समान होस्ट, SSH होस्ट, या पहुंच योग्य होस्ट/IP", + "endpointPort": "एंडपॉइंट पोर्ट", + "failedToConnectTunnel": "कनेक्ट करने में विफल", + "failedToDisconnectTunnel": "डिस्कनेक्ट करने में विफल", + "maxRetries": "अधिकतम पुनर्प्रयास", + "noTunnelsConfigured": "कोई टनल कॉन्फ़िगर नहीं की गई।", + "retryIntervalS": "पुनर्प्रयास अंतराल (s)", + "serverTunnelsSection": "सर्वर टनल", + "sourcePort": "स्रोत पोर्ट", + "tabTunnels": "टनलें", + "tunnelConnecting": "टनल कनेक्ट हो रही है...", + "tunnelDisconnected": "टनल डिस्कनेक्ट हो गई", + "tunnelLabel": "टनल {{number}}", + "tunnelModeDynamicDesc": "गतिशील पोर्ट अग्रेषण के लिए स्थानीय पोर्ट पर SOCKS5 प्रॉक्सी बनाएं।", + "tunnelModeLocalDesc": "स्थानीय पोर्ट को दूरस्थ सर्वर (या उससे पहुंच योग्य किसी होस्ट) के पोर्ट पर अग्रेषित करें।", + "tunnelModeRemoteDesc": "दूरस्थ सर्वर पर एक पोर्ट को अपनी मशीन पर स्थानीय पोर्ट पर वापस अग्रेषित करें।", + "tunnelRequirementsText": "SSH सर्वर में /etc/ssh/sshd_config में GatewayPorts yes, AllowTcpForwarding yes, और PermitRootLogin yes सेट होना चाहिए।", + "tunnelSettings": "टनल सेटिंग्स", + "tunnelType": "टनल प्रकार" + }, + "nav": { + "portForwarding": "अग्रेषित करना", + "tunnels": "टनल" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (स्थानीय रूप से सुनें)", + "localTargetHost": "127.0.0.1 (इस कंप्यूटर पर लक्ष्य)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (एंडपॉइंट पर सुनें)", + "remoteTargetHost": "127.0.0.1 (एंडपॉइंट से लक्ष्य)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS श्रोता)" + }, + "profile": { + "c2sCurrentLocalConfig": "इस डेस्कटॉप पर {{count}} स्थानीय क्लाइंट टनल(s) कॉन्फ़िगर की गई हैं।", + "c2sLoadPreset": "लोड करें", + "c2sNoPresetSelected": "कोई प्रीसेट चयनित नहीं", + "c2sNoPresets": "कोई प्रीसेट सहेजा नहीं गया", + "c2sPresetDeleted": "क्लाइंट टनल प्रीसेट हटाया गया", + "c2sPresetLoadError": "क्लाइंट टनल प्रीसेट लोड करने में विफल", + "c2sPresetLoaded": "क्लाइंट टनल प्रीसेट स्थानीय रूप से लोड हुआ", + "c2sPresetName": "प्रीसेट नाम", + "c2sPresetNamePlaceholder": "क्लाइंट प्रीसेट नाम", + "c2sPresetRenamed": "क्लाइंट टनल प्रीसेट का नाम बदला गया", + "c2sPresetSaved": "क्लाइंट टनल प्रीसेट सहेजा गया", + "c2sPresetSyncNote": "प्रीसेट स्पष्ट स्नैपशॉट हैं; एक लोड करने पर यह डेस्कटॉप क्लाइंट की स्थानीय क्लाइंट टनल सूची को बदल देता है।", + "c2sPresetToLoad": "लोड करने के लिए प्रीसेट", + "c2sTunnelPresets": "क्लाइंट टनल प्रीसेट", + "c2sTunnelPresetsUnavailable": "क्लाइंट टनल प्रीसेट केवल डेस्कटॉप क्लाइंट में उपलब्ध हैं।" + }, + "tunnels": { + "attempt": "प्रयास {{current}} / {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "स्थानीय {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → स्थानीय {{localPort}}", + "autoStart": "स्वतः आरंभ", + "cancel": "रद्द करें", + "canceling": "रद्द कर रहा है...", + "clientAutoStartDesc": "यह डेस्कटॉप क्लाइंट खुलने पर आरंभ होता है और जुड़ा रहता है।", + "clientManualStartDesc": "इस पंक्ति से आरंभ और रोकें का उपयोग करें। Termix इसे स्वचालित रूप से नहीं खोलेगा।", + "clientRemoteServerNote": "दूरस्थ अग्रेषण के लिए एंडपॉइंट SSH सर्वर पर AllowTcpForwarding और GatewayPorts की आवश्यकता हो सकती है। यह डेस्कटॉप डिस्कनेक्ट होने पर दूरस्थ पोर्ट बंद हो जाता है।", + "clientTunnelStarted": "क्लाइंट टनल आरंभ हो गई", + "clientTunnelStopped": "क्लाइंट टनल रुक गई", + "clientTunnels": "क्लाइंट टनलें", + "connected": "कनेक्टेड", + "connecting": "कनेक्ट हो रहा है...", + "createFirstTunnelMessage": "आपने अभी तक कोई SSH टनल नहीं बनाई है। शुरू करने के लिए होस्ट प्रबंधक में टनल कनेक्शन कॉन्फ़िगर करें।", + "currentHostPort": "वर्तमान होस्ट पोर्ट", + "destination": "डेस्टिनेशन", + "destinationAddress": "गंतव्य पता", + "destinationPort": "गंतव्य बंदरगाह", + "disconnected": "डिस्कनेक्टेड", + "duplicateAutoStartBind": "केवल एक स्वतः-आरंभ क्लाइंट टनल {{bind}} का उपयोग कर सकती है।", + "endpointPort": "एंडपॉइंट पोर्ट", + "endpointSshHost": "एंडपॉइंट SSH होस्ट", + "endpointSshHostPlaceholder": "कॉन्फ़िगर किया गया होस्ट चुनें", + "endpointSshHostRequired": "प्रत्येक क्लाइंट टनल के लिए एक एंडपॉइंट SSH होस्ट चुनें।", + "error": "त्रुटि", + "forwardDescriptionClientDynamic": "स्थानीय पोर्ट {{sourcePort}} पर SOCKS।", + "forwardDescriptionClientLocal": "स्थानीय {{sourcePort}} → दूरस्थ {{endpointPort}}।", + "forwardDescriptionClientRemote": "दूरस्थ {{sourcePort}} → स्थानीय {{endpointPort}}।", + "forwardDescriptionServerDynamic": "वर्तमान होस्ट {{sourcePort}} पर SOCKS।", + "forwardDescriptionServerLocal": "वर्तमान होस्ट {{sourcePort}} → एंडपॉइंट {{endpointPort}}।", + "forwardDescriptionServerRemote": "एंडपॉइंट {{endpointPort}} → वर्तमान होस्ट {{sourcePort}}।", + "host": "होस्ट", + "intermediateHost": "मध्यवर्ती मेजबान", + "invalidBindIp": "स्थानीय आईपी एक मान्य IPv4 पता होना चाहिए।", + "invalidEndpointPort": "एंडपॉइंट पोर्ट 1 और 65535 के बीच होना चाहिए।", + "invalidLocalPort": "स्थानीय पोर्ट 1 और 65535 के बीच होना चाहिए।", + "invalidLocalTargetIp": "स्थानीय लक्ष्य आईपी एक मान्य IPv4 पता होना चाहिए।", + "invalidLocalTargetPort": "स्थानीय लक्ष्य पोर्ट 1 और 65535 के बीच होना चाहिए।", + "invalidRemoteAddress": "रिमोट एड्रेस आवश्यक है।", + "invalidRemotePort": "दूरस्थ पोर्ट 1 और 65535 के बीच होना चाहिए।", + "lastError": "अंतिम त्रुटि", + "lastStarted": "अंतिम बार शुरू हुआ", + "lastTested": "अंतिम बार परीक्षण किया गया", + "localAddress": "स्थानीय पता", + "localPort": "स्थानीय पोर्ट", + "localSaveError": "स्थानीय क्लाइंट टनल सहेजने में विफल", + "localSaved": "क्लाइंट टनलें सहेजी गईं", + "manualControlError": "टनल स्थिति अपडेट करने में विफल।", + "maxRetries": "अधिकतम पुनर्प्रयास", + "mode": "मोड", + "nextRetryIn": "अगला पुनः प्रयास {{seconds}} सेकंड में", + "noClientTunnels": "इस डेस्कटॉप पर कोई क्लाइंट टनल कॉन्फ़िगर नहीं है।", + "noHostSelected": "कोई होस्ट चयनित नहीं", + "noSshTunnels": "कोई SSH टनल नहीं", + "port": "पोर्ट", + "remoteBindAddress": "रिमोट बाइंड पता", + "remoteHost": "दूरस्थ होस्ट", + "remotePort": "दूरस्थ पोर्ट", + "retryInterval": "पुनर्प्रयास अंतराल (सेकंड)", + "route": "रूट:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} वाया {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "परीक्षण करें", + "tunnelName": "टनल का नाम", + "tunnelTestFailed": "टनल परीक्षण विफल", + "tunnelTestSucceeded": "टनल परीक्षण सफल", + "type": "टनल प्रकार", + "typeDynamic": "डायनामिक (-D)", + "typeLocal": "स्थानीय (-L)", + "typeRemote": "दूरस्थ (-R)", + "working": "कार्यरत..." + } +} diff --git a/plugins/tunnels/locales/translated/hu_HU.json b/plugins/tunnels/locales/translated/hu_HU.json new file mode 100644 index 000000000..e9c012e5e --- /dev/null +++ b/plugins/tunnels/locales/translated/hu_HU.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Alagút hozzáadása", + "autoStartDesc": "Automatikus csatlakozás ehhez az alagúthoz, amikor a gazdagép betöltődik", + "autoStartLabel": "Automatikus indítás", + "connectBtn": "Csatlakozás", + "disconnectBtn": "Leválasztás", + "enableTunneling": "Alagútkezelés engedélyezése", + "enableTunnelingDesc": "SSH alagút funkció engedélyezése ehhez a gazdagéphez", + "endpointHost": "Végponti gazdagép", + "endpointHostPlaceholder": "Ugyanaz a gép, SSH-gép vagy elérhető gép/IP-cím", + "endpointPort": "Végponti port", + "failedToConnectTunnel": "Sikertelen csatlakozás", + "failedToDisconnectTunnel": "Nem sikerült lecsatlakozni", + "maxRetries": "Max. újrapróbálkozások", + "noTunnelsConfigured": "Nincsenek konfigurált alagutak.", + "retryIntervalS": "Újrapróbálkozási intervallum (s)", + "serverTunnelsSection": "Szerver alagutak", + "sourcePort": "Forrásport", + "tabTunnels": "Alagutak", + "tunnelConnecting": "Alagút összeköt...", + "tunnelDisconnected": "Alagút leválasztva", + "tunnelLabel": "Alagút {{number}}", + "tunnelModeDynamicDesc": "Hozz létre egy SOCKS5 proxyt egy helyi porton a dinamikus porttovábbításhoz.", + "tunnelModeLocalDesc": "Továbbítson egy helyi portot a távoli szerveren (vagy egy onnan elérhető gépen) lévő portra.", + "tunnelModeRemoteDesc": "Továbbítsd a távoli szerver egyik portját a saját gépeden lévő helyi portra.", + "tunnelRequirementsText": "Az SSH szervernek a /etc/ssh/sshd_config fájlban be kell állítania a GatewayPorts yes, az AllowTcpForwarding yes és a PermitRootLogin yes értékeket.", + "tunnelSettings": "Alagútbeállítások", + "tunnelType": "Alagút típusa" + }, + "nav": { + "portForwarding": "Szállítmányozás", + "tunnels": "Alagutak" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (helyben hallgatható)", + "localTargetHost": "127.0.0.1 (cél ezen a számítógépen)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (figyelés a végponton)", + "remoteTargetHost": "127.0.0.1 (cél a végponttól)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS figyelő)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} helyi kliens alagút(ok) konfigurálva ezen az asztalon.", + "c2sLoadPreset": "Terhelés", + "c2sNoPresetSelected": "Nincs kiválasztva előbeállítás", + "c2sNoPresets": "Nincsenek mentett előbeállítások", + "c2sPresetDeleted": "Kliens alagút preset törölve", + "c2sPresetLoadError": "Nem sikerült betölteni a kliens alagút előbeállításait", + "c2sPresetLoaded": "A kliens alagút presetje helyben betöltött", + "c2sPresetName": "Előbeállítás neve", + "c2sPresetNamePlaceholder": "Ügyfél előre beállított neve", + "c2sPresetRenamed": "Ügyfél alagút preset átnevezve", + "c2sPresetSaved": "Kliens alagút előre beállított értéke mentve", + "c2sPresetSyncNote": "Az előbeállítások explicit pillanatképek; egyik betöltése felülírja az asztali kliens helyi kliens alagútlistáját.", + "c2sPresetToLoad": "Betöltendő előbeállítás", + "c2sTunnelPresets": "Kliens alagút előbeállításai", + "c2sTunnelPresetsUnavailable": "Az ügyfélalagút-előbeállítások csak az asztali kliensben érhetők el." + }, + "tunnels": { + "attempt": "{{current}} kísérlet a {{max}}-ből", + "autoNameClientDynamic": "ZOKNIK {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokális {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → helyi {{localPort}}", + "autoStart": "Automatikus indítás", + "cancel": "Mégsem", + "canceling": "Lemondás...", + "clientAutoStartDesc": "Akkor indul el, amikor ez az asztali kliens megnyílik és csatlakoztatva marad.", + "clientManualStartDesc": "Használd a Start és Stop gombokat ebből a sorból. A Termix nem nyitja meg automatikusan.", + "clientRemoteServerNote": "A távoli továbbításhoz szükség lehet az AllowTcpForwarding és a GatewayPorts paraméterekre a végponti SSH-kiszolgálón. A távoli port bezárul, amikor ez az asztal lecsatlakozik.", + "clientTunnelStarted": "Ügyfélalagút elindult", + "clientTunnelStopped": "Kliens alagút leállt", + "clientTunnels": "Ügyfél alagutak", + "connected": "Csatlakoztatva", + "connecting": "Kapcsolódás...", + "createFirstTunnelMessage": "Még nem hozott létre SSH alagutakat. A kezdéshez konfigurálja az alagútkapcsolatokat a Host Managerben.", + "currentHostPort": "Jelenlegi host port", + "destination": "Rendeltetési hely", + "destinationAddress": "Célcím", + "destinationPort": "Célkikötő", + "disconnected": "Szétkapcsolt", + "duplicateAutoStartBind": "Csak egy automatikusan induló kliens alagút használhatja a {{bind}} kapcsolót.", + "endpointPort": "Végponti port", + "endpointSshHost": "Végpont SSH-gazdagép", + "endpointSshHostPlaceholder": "Válasszon ki egy konfigurált gazdagépet", + "endpointSshHostRequired": "Válasszon ki egy végponti SSH-hosztot minden kliens alagúthoz.", + "error": "Hiba", + "forwardDescriptionClientDynamic": "SOCKS a helyi {{sourcePort}} porton.", + "forwardDescriptionClientLocal": "Helyi {{sourcePort}} → távoli {{endpointPort}}.", + "forwardDescriptionClientRemote": "Távoli {{sourcePort}} → helyi {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS a jelenlegi gépen {{sourcePort}}.", + "forwardDescriptionServerLocal": "Aktuális hoszt {{sourcePort}} → végpont {{endpointPort}}.", + "forwardDescriptionServerRemote": "Végpont {{endpointPort}} → aktuális gazdagép {{sourcePort}}.", + "host": "Házigazda", + "intermediateHost": "Köztes gazda", + "invalidBindIp": "A helyi IP-címnek érvényes IPv4-címnek kell lennie.", + "invalidEndpointPort": "A végpont portjának 1 és 65535 között kell lennie.", + "invalidLocalPort": "A helyi portnak 1 és 65535 között kell lennie.", + "invalidLocalTargetIp": "A helyi cél IP-címnek érvényes IPv4-címnek kell lennie.", + "invalidLocalTargetPort": "A helyi célportnak 1 és 65535 között kell lennie.", + "invalidRemoteAddress": "Távoli cím megadása kötelező.", + "invalidRemotePort": "A távoli portnak 1 és 65535 között kell lennie.", + "lastError": "Utolsó hiba", + "lastStarted": "Utolsó indítás", + "lastTested": "Utolsó tesztelés", + "localAddress": "Helyi cím", + "localPort": "Helyi kikötő", + "localSaveError": "Nem sikerült menteni a helyi kliens alagutak.", + "localSaved": "Kliens alagutak mentve", + "manualControlError": "Nem sikerült frissíteni az alagút állapotát.", + "maxRetries": "Max. újrapróbálkozások", + "mode": "Mód", + "nextRetryIn": "Következő újrapróbálkozás {{seconds}} másodperc múlva", + "noClientTunnels": "Nincsenek kliens alagutak konfigurálva ezen az asztalon.", + "noHostSelected": "Nincs kiválasztva gazdagép", + "noSshTunnels": "Nincsenek SSH alagutak", + "port": "Kikötő", + "remoteBindAddress": "Távoli kötési cím", + "remoteHost": "Távoli gép", + "remotePort": "Távoli port", + "retryInterval": "Újrapróbálkozási intervallum (másodperc)", + "route": "Útvonal:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ZOKNIK {{endpoint}}-on keresztül", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} {{endpoint}} útvonalon", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} itt: {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Teszt", + "tunnelName": "Alagút neve", + "tunnelTestFailed": "Alagútteszt sikertelen", + "tunnelTestSucceeded": "Alagútteszt sikeres", + "type": "Alagút típusa", + "typeDynamic": "Dinamikus (-D)", + "typeLocal": "Helyi (-L)", + "typeRemote": "Távoli (-R)", + "working": "Dolgozó..." + } +} diff --git a/plugins/tunnels/locales/translated/id_ID.json b/plugins/tunnels/locales/translated/id_ID.json new file mode 100644 index 000000000..48c220fbf --- /dev/null +++ b/plugins/tunnels/locales/translated/id_ID.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Tambahkan Terowongan", + "autoStartDesc": "Terowongan ini akan terhubung secara otomatis saat host dimuat.", + "autoStartLabel": "Mulai otomatis", + "connectBtn": "Menghubungkan", + "disconnectBtn": "Memutuskan", + "enableTunneling": "Aktifkan Tunneling", + "enableTunnelingDesc": "Aktifkan fungsi terowongan SSH untuk host ini.", + "endpointHost": "Host Titik Akhir", + "endpointHostPlaceholder": "Host yang sama, host SSH, atau host/IP yang dapat dijangkau", + "endpointPort": "Port Titik Akhir", + "failedToConnectTunnel": "Gagal terhubung", + "failedToDisconnectTunnel": "Gagal memutuskan koneksi", + "maxRetries": "Jumlah Percobaan Maksimum", + "noTunnelsConfigured": "Tidak ada terowongan yang dikonfigurasi.", + "retryIntervalS": "Interval Percobaan Ulang (detik)", + "serverTunnelsSection": "Terowongan Server", + "sourcePort": "Port Sumber", + "tabTunnels": "Terowongan", + "tunnelConnecting": "Terowongan penghubung...", + "tunnelDisconnected": "Terowongan terputus", + "tunnelLabel": "Terowongan {{number}}", + "tunnelModeDynamicDesc": "Buat proxy SOCKS5 pada port lokal untuk penerusan port dinamis.", + "tunnelModeLocalDesc": "Teruskan port lokal ke port pada server jarak jauh (atau host yang dapat dijangkau dari server tersebut).", + "tunnelModeRemoteDesc": "Teruskan port pada server jarak jauh kembali ke port lokal pada mesin Anda.", + "tunnelRequirementsText": "Server SSH harus memiliki pengaturan GatewayPorts yes, AllowTcpForwarding yes, dan PermitRootLogin yes di /etc/ssh/sshd_config.", + "tunnelSettings": "Pengaturan Terowongan", + "tunnelType": "Jenis Terowongan" + }, + "nav": { + "portForwarding": "Meneruskan", + "tunnels": "Terowongan" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (dengarkan secara lokal)", + "localTargetHost": "127.0.0.1 (target pada komputer ini)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (dengarkan di titik akhir)", + "remoteTargetHost": "127.0.0.1 (target dari titik akhir)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (Pendengar SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} terowongan klien lokal yang dikonfigurasi pada desktop ini.", + "c2sLoadPreset": "Memuat", + "c2sNoPresetSelected": "Tidak ada preset yang dipilih.", + "c2sNoPresets": "Tidak ada preset yang tersimpan.", + "c2sPresetDeleted": "Pengaturan awal terowongan klien telah dihapus.", + "c2sPresetLoadError": "Gagal memuat preset terowongan klien", + "c2sPresetLoaded": "Pengaturan terowongan klien dimuat secara lokal.", + "c2sPresetName": "Nama Preset", + "c2sPresetNamePlaceholder": "Nama preset klien", + "c2sPresetRenamed": "Pengaturan terowongan klien diubah namanya.", + "c2sPresetSaved": "Pengaturan terowongan klien tersimpan.", + "c2sPresetSyncNote": "Preset adalah snapshot eksplisit; memuat salah satunya akan mengganti daftar terowongan klien lokal klien desktop ini.", + "c2sPresetToLoad": "Preset untuk Memuat", + "c2sTunnelPresets": "Pengaturan Awal Terowongan Klien", + "c2sTunnelPresetsUnavailable": "Pengaturan terowongan klien hanya tersedia di klien desktop." + }, + "tunnels": { + "attempt": "Percobaan {{current}} dari {{max}}", + "autoNameClientDynamic": "KAOS KAKI {{localPort}} melalui {{endpoint}}", + "autoNameClientLocal": "Lokal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokal {{localPort}}", + "autoStart": "Mulai Otomatis", + "cancel": "Membatalkan", + "canceling": "Membatalkan...", + "clientAutoStartDesc": "Proses dimulai saat klien desktop ini dibuka dan tetap terhubung.", + "clientManualStartDesc": "Gunakan tombol Mulai dan Berhenti dari baris ini. Termix tidak akan membukanya secara otomatis.", + "clientRemoteServerNote": "Penerusan jarak jauh mungkin memerlukan AllowTcpForwarding dan GatewayPorts pada server SSH titik akhir. Port jarak jauh akan tertutup ketika desktop ini terputus.", + "clientTunnelStarted": "Terowongan klien telah dimulai.", + "clientTunnelStopped": "Terowongan klien dihentikan", + "clientTunnels": "Terowongan Klien", + "connected": "Terhubung", + "connecting": "Menghubungkan...", + "createFirstTunnelMessage": "Anda belum membuat terowongan SSH apa pun. Konfigurasikan koneksi terowongan di Host Manager untuk memulai.", + "currentHostPort": "Port Host Saat Ini", + "destination": "Tujuan", + "destinationAddress": "Alamat Tujuan", + "destinationPort": "Pelabuhan Tujuan", + "disconnected": "Terputus", + "duplicateAutoStartBind": "Hanya satu terowongan klien auto-start yang dapat menggunakan {{bind}}.", + "endpointPort": "Port Titik Akhir", + "endpointSshHost": "Host SSH Titik Akhir", + "endpointSshHostPlaceholder": "Pilih host yang telah dikonfigurasi.", + "endpointSshHostRequired": "Pilih host SSH titik akhir untuk setiap terowongan klien.", + "error": "Kesalahan", + "forwardDescriptionClientDynamic": "SOCKS pada port lokal {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokal {{sourcePort}} → jarak jauh {{endpointPort}}.", + "forwardDescriptionClientRemote": "Jarak jauh {{sourcePort}} → lokal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS pada host saat ini {{sourcePort}}.", + "forwardDescriptionServerLocal": "Host saat ini {{sourcePort}} → titik akhir {{endpointPort}}.", + "forwardDescriptionServerRemote": "Titik akhir {{endpointPort}} → host saat ini {{sourcePort}}.", + "host": "Tuan rumah", + "intermediateHost": "Inang Perantara", + "invalidBindIp": "IP lokal harus berupa alamat IPv4 yang valid.", + "invalidEndpointPort": "Port endpoint harus berada di antara 1 dan 65535.", + "invalidLocalPort": "Port lokal harus berada di antara 1 dan 65535.", + "invalidLocalTargetIp": "Alamat IP target lokal harus berupa alamat IPv4 yang valid.", + "invalidLocalTargetPort": "Port target lokal harus berada di antara 1 dan 65535.", + "invalidRemoteAddress": "Alamat jarak jauh diperlukan.", + "invalidRemotePort": "Port jarak jauh harus berada di antara 1 dan 65535.", + "lastError": "Kesalahan terakhir", + "lastStarted": "Terakhir dimulai", + "lastTested": "Terakhir diuji", + "localAddress": "Alamat Lokal", + "localPort": "Pelabuhan Lokal", + "localSaveError": "Gagal menyimpan terowongan klien lokal", + "localSaved": "Terowongan klien tersimpan", + "manualControlError": "Gagal memperbarui status terowongan.", + "maxRetries": "Jumlah Percobaan Maksimum", + "mode": "Mode", + "nextRetryIn": "Percobaan berikutnya dalam {{seconds}} detik", + "noClientTunnels": "Tidak ada terowongan klien yang dikonfigurasi pada desktop ini.", + "noHostSelected": "Tidak ada pembawa acara yang dipilih.", + "noSshTunnels": "Tidak ada terowongan SSH", + "port": "Pelabuhan", + "remoteBindAddress": "Alamat Pengikatan Jarak Jauh", + "remoteHost": "Host Jarak Jauh", + "remotePort": "Port Jarak Jauh", + "retryInterval": "Interval Percobaan Ulang (detik)", + "route": "Rute:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → KAOS KAKI melalui {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} melalui {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} pada {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Tes", + "tunnelName": "Nama Terowongan", + "tunnelTestFailed": "Uji terowongan gagal", + "tunnelTestSucceeded": "Uji terowongan berhasil", + "type": "Jenis Terowongan", + "typeDynamic": "Dinamis (-D)", + "typeLocal": "Lokal (-L)", + "typeRemote": "Jarak Jauh (-R)", + "working": "Bekerja..." + } +} diff --git a/plugins/tunnels/locales/translated/it_IT.json b/plugins/tunnels/locales/translated/it_IT.json new file mode 100644 index 000000000..68831e8ec --- /dev/null +++ b/plugins/tunnels/locales/translated/it_IT.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Aggiungi tunnel", + "autoStartDesc": "Connetti automaticamente questo tunnel all'avvio dell'host", + "autoStartLabel": "Avvio automatico", + "connectBtn": "Connetti", + "disconnectBtn": "Disconnetti", + "enableTunneling": "Abilita tunneling", + "enableTunnelingDesc": "Abilita la funzionalità di tunnel SSH per questo host", + "endpointHost": "Host di destinazione", + "endpointHostPlaceholder": "Stesso host, host SSH o host/IP raggiungibile", + "endpointPort": "Porta di destinazione", + "failedToConnectTunnel": "Connessione fallita", + "failedToDisconnectTunnel": "Disconnessione fallita", + "maxRetries": "Tentativi massimi", + "noTunnelsConfigured": "Nessun tunnel configurato.", + "retryIntervalS": "Intervallo tentativi (s)", + "serverTunnelsSection": "Tunnel server", + "sourcePort": "Porta sorgente", + "tabTunnels": "Tunnel", + "tunnelConnecting": "Connessione tunnel in corso...", + "tunnelDisconnected": "Tunnel disconnesso", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Crea un proxy SOCKS5 su una porta locale per il port forwarding dinamico.", + "tunnelModeLocalDesc": "Inoltra una porta locale a una porta sul server remoto (o a un host raggiungibile da esso).", + "tunnelModeRemoteDesc": "Inoltra una porta sul server remoto verso una porta locale sulla tua macchina.", + "tunnelRequirementsText": "Il server SSH deve avere GatewayPorts yes, AllowTcpForwarding yes e PermitRootLogin yes impostati in /etc/ssh/sshd_config.", + "tunnelSettings": "Impostazioni tunnel", + "tunnelType": "Tipo di tunnel" + }, + "nav": { + "portForwarding": "Inoltro", + "tunnels": "Tunnel" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (ascolta localmente)", + "localTargetHost": "127.0.0.1 (destinazione su questo computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (ascolta sull'endpoint)", + "remoteTargetHost": "127.0.0.1 (destinazione dall'endpoint)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (listener SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} tunnel client locale configurato/i su questo desktop.", + "c2sLoadPreset": "Carica", + "c2sNoPresetSelected": "Nessuna preimpostazione selezionata", + "c2sNoPresets": "Nessuna preimpostazione salvata", + "c2sPresetDeleted": "Preimpostazione tunnel client eliminata", + "c2sPresetLoadError": "Caricamento delle preimpostazioni tunnel client non riuscito", + "c2sPresetLoaded": "Preimpostazione tunnel client caricata localmente", + "c2sPresetName": "Nome preimpostazione", + "c2sPresetNamePlaceholder": "Nome preimpostazione client", + "c2sPresetRenamed": "Preimpostazione tunnel client rinominata", + "c2sPresetSaved": "Preimpostazione tunnel client salvata", + "c2sPresetSyncNote": "Le preimpostazioni sono snapshot espliciti; caricandone una si sostituisce l'elenco dei tunnel client locali di questo desktop.", + "c2sPresetToLoad": "Preimpostazione da caricare", + "c2sTunnelPresets": "Preimpostazioni tunnel client", + "c2sTunnelPresetsUnavailable": "Le preimpostazioni tunnel client sono disponibili solo nel client desktop." + }, + "tunnels": { + "attempt": "Tentativo {{current}} di {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Locale {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → locale {{localPort}}", + "autoStart": "Avvio automatico", + "cancel": "Annulla", + "canceling": "Annullamento in corso...", + "clientAutoStartDesc": "Si avvia all'apertura del client desktop e rimane connesso.", + "clientManualStartDesc": "Usa Avvia e Arresta da questa riga. Termix non lo avvierà automaticamente.", + "clientRemoteServerNote": "L'inoltro remoto potrebbe richiedere AllowTcpForwarding e GatewayPorts sul server SSH endpoint. La porta remota viene chiusa quando questo desktop si disconnette.", + "clientTunnelStarted": "Tunnel client avviato", + "clientTunnelStopped": "Tunnel client arrestato", + "clientTunnels": "Tunnel client", + "connected": "Connesso", + "connecting": "Connessione in corso...", + "createFirstTunnelMessage": "Non hai ancora creato nessun tunnel SSH. Configura le connessioni tunnel nel Gestore host per iniziare.", + "currentHostPort": "Porta host corrente", + "destination": "Destinazione", + "destinationAddress": "Indirizzo di destinazione", + "destinationPort": "Porto di destinazione", + "disconnected": "Disconnesso", + "duplicateAutoStartBind": "Solo un tunnel client con avvio automatico può utilizzare {{bind}}.", + "endpointPort": "Porta endpoint", + "endpointSshHost": "Host SSH endpoint", + "endpointSshHostPlaceholder": "Seleziona un host configurato", + "endpointSshHostRequired": "Seleziona un host SSH endpoint per ogni tunnel client.", + "error": "Errore", + "forwardDescriptionClientDynamic": "SOCKS su porta locale {{sourcePort}}.", + "forwardDescriptionClientLocal": "Locale {{sourcePort}} → remoto {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remoto {{sourcePort}} → locale {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS su host attuale {{sourcePort}}.", + "forwardDescriptionServerLocal": "Host attuale {{sourcePort}} → endpoint {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endpoint {{endpointPort}} → host attuale {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Host intermedio", + "invalidBindIp": "L'IP locale deve essere un indirizzo IPv4 valido.", + "invalidEndpointPort": "La porta endpoint deve essere compresa tra 1 e 65535.", + "invalidLocalPort": "La porta locale deve essere compresa tra 1 e 65535.", + "invalidLocalTargetIp": "L'IP di destinazione locale deve essere un indirizzo IPv4 valido.", + "invalidLocalTargetPort": "La porta di destinazione locale deve essere compresa tra 1 e 65535.", + "invalidRemoteAddress": "È necessario un indirizzo remoto.", + "invalidRemotePort": "La porta remota deve essere compresa tra 1 e 65535.", + "lastError": "Ultimo errore", + "lastStarted": "Ultimo avvio", + "lastTested": "Ultimo test", + "localAddress": "Indirizzo locale", + "localPort": "Porta locale", + "localSaveError": "Salvataggio dei tunnel client locali non riuscito", + "localSaved": "Tunnel client salvati", + "manualControlError": "Aggiornamento dello stato del tunnel non riuscito.", + "maxRetries": "Tentativi massimi", + "mode": "Modalità", + "nextRetryIn": "Prossimo tentativo tra {{seconds}} secondi", + "noClientTunnels": "Nessun tunnel client configurato su questo desktop.", + "noHostSelected": "Nessun host selezionato", + "noSshTunnels": "Nessun tunnel SSH", + "port": "Porta", + "remoteBindAddress": "Indirizzo di associazione remota", + "remoteHost": "Host remoto", + "remotePort": "Porta remota", + "retryInterval": "Intervallo tra tentativi (secondi)", + "route": "Percorso:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} su {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Verifica", + "tunnelName": "Nome tunnel", + "tunnelTestFailed": "Test del tunnel fallito", + "tunnelTestSucceeded": "Test del tunnel riuscito", + "type": "Tipo di tunnel", + "typeDynamic": "Dinamico (-D)", + "typeLocal": "Locale (-L)", + "typeRemote": "Remoto (-R)", + "working": "In corso..." + } +} diff --git a/plugins/tunnels/locales/translated/ja_JP.json b/plugins/tunnels/locales/translated/ja_JP.json new file mode 100644 index 000000000..0aa6f0cf7 --- /dev/null +++ b/plugins/tunnels/locales/translated/ja_JP.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "トンネルを追加", + "autoStartDesc": "ホスト読み込み時にこのトンネルを自動接続します。", + "autoStartLabel": "自動起動", + "connectBtn": "接続", + "disconnectBtn": "切断", + "enableTunneling": "トンネリングを有効にする", + "enableTunnelingDesc": "このホストのSSHトンネル機能を有効にします", + "endpointHost": "エンドポイントホスト", + "endpointHostPlaceholder": "同じホスト、SSHホスト、または到達可能なホスト/IP", + "endpointPort": "エンドポイントポート", + "failedToConnectTunnel": "接続に失敗しました", + "failedToDisconnectTunnel": "切断に失敗しました", + "maxRetries": "最大再試行回数", + "noTunnelsConfigured": "トンネルが設定されていません", + "retryIntervalS": "再試行間隔(秒)", + "serverTunnelsSection": "サーバートンネル", + "sourcePort": "ソースポート", + "tabTunnels": "トンネル", + "tunnelConnecting": "トンネル接続中...", + "tunnelDisconnected": "トンネル切断", + "tunnelLabel": "トンネル {{number}}", + "tunnelModeDynamicDesc": "動的ポート転送用にローカルポートにSOCKS5プロキシを作成します。", + "tunnelModeLocalDesc": "ローカルポートをリモートサーバー(またはそこから到達可能なホスト)のポートに転送します。", + "tunnelModeRemoteDesc": "リモートサーバーのポートをローカルマシンのポートに転送します。", + "tunnelRequirementsText": "SSHサーバーの/etc/ssh/sshd_configに、GatewayPorts yes、AllowTcpForwarding yes、PermitRootLogin yesが設定されている必要があります。", + "tunnelSettings": "トンネル設定", + "tunnelType": "トンネルの種類" + }, + "nav": { + "portForwarding": "転送", + "tunnels": "トンネル" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1(ローカルでリッスン)", + "localTargetHost": "127.0.0.1(このコンピューターのターゲット)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1(エンドポイントでリッスン)", + "remoteTargetHost": "127.0.0.1(エンドポイントからのターゲット)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKSリスナー)" + }, + "profile": { + "c2sCurrentLocalConfig": "このデスクトップに{{count}}個のローカルクライアントトンネルが設定されています。", + "c2sLoadPreset": "読み込み", + "c2sNoPresetSelected": "プリセットが選択されていません", + "c2sNoPresets": "保存されたプリセットはありません", + "c2sPresetDeleted": "クライアントトンネルプリセットを削除しました", + "c2sPresetLoadError": "クライアントトンネルプリセットの読み込みに失敗しました", + "c2sPresetLoaded": "クライアントトンネルプリセットをローカルに読み込みました", + "c2sPresetName": "プリセット名", + "c2sPresetNamePlaceholder": "クライアントプリセット名", + "c2sPresetRenamed": "クライアントトンネルプリセットの名前を変更しました", + "c2sPresetSaved": "クライアントトンネルプリセットを保存しました", + "c2sPresetSyncNote": "プリセットは明示的なスナップショットです。読み込むと、このデスクトップクライアントのローカルクライアントトンネルリストが置き換えられます。", + "c2sPresetToLoad": "読み込むプリセット", + "c2sTunnelPresets": "クライアントトンネルプリセット", + "c2sTunnelPresetsUnavailable": "クライアントトンネルプリセットはデスクトップクライアントでのみ利用可能です。" + }, + "tunnels": { + "attempt": "試行 {{current}} / {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "ローカル {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → ローカル {{localPort}}", + "autoStart": "自動起動", + "cancel": "キャンセル", + "canceling": "キャンセル中...", + "clientAutoStartDesc": "デスクトップクライアントが起動すると自動的に接続し、接続を維持します。", + "clientManualStartDesc": "この行の開始/停止を使用します。Termixは自動的に起動しません。", + "clientRemoteServerNote": "リモート転送にはエンドポイントSSHサーバーでAllowTcpForwardingとGatewayPortsが必要な場合があります。このデスクトップが切断されるとリモートポートは閉じます。", + "clientTunnelStarted": "クライアントトンネルが起動しました", + "clientTunnelStopped": "クライアントトンネルが停止しました", + "clientTunnels": "クライアントトンネル", + "connected": "接続済み", + "connecting": "接続中...", + "createFirstTunnelMessage": "まだSSHトンネルが作成されていません。開始するにはホストマネージャーでトンネル接続を設定してください。", + "currentHostPort": "現在のホストポート", + "destination": "宛先", + "destinationAddress": "宛先住所", + "destinationPort": "目的地港", + "disconnected": "切断済み", + "duplicateAutoStartBind": "自動起動クライアントトンネルで同じ{{bind}}を使用できるのは1つだけです。", + "endpointPort": "エンドポイントポート", + "endpointSshHost": "エンドポイントSSHホスト", + "endpointSshHostPlaceholder": "設定済みのホストを選択", + "endpointSshHostRequired": "各クライアントトンネルにエンドポイントSSHホストを選択してください。", + "error": "エラー", + "forwardDescriptionClientDynamic": "ローカルポート {{sourcePort}} 上のSOCKS。", + "forwardDescriptionClientLocal": "ローカル {{sourcePort}} → リモート {{endpointPort}}。", + "forwardDescriptionClientRemote": "リモート {{sourcePort}} → ローカル {{endpointPort}}。", + "forwardDescriptionServerDynamic": "現在のホスト上のSOCKS {{sourcePort}}。", + "forwardDescriptionServerLocal": "現在のホスト {{sourcePort}} → エンドポイント {{endpointPort}}。", + "forwardDescriptionServerRemote": "エンドポイント {{endpointPort}} → 現在のホスト {{sourcePort}}。", + "host": "ホスト", + "intermediateHost": "中間宿主", + "invalidBindIp": "ローカルIPは有効なIPv4アドレスでなければなりません。", + "invalidEndpointPort": "エンドポイントポートは1~65535の間でなければなりません。", + "invalidLocalPort": "ローカルポートは1~65535の間でなければなりません。", + "invalidLocalTargetIp": "ローカルターゲットIPは有効なIPv4アドレスでなければなりません。", + "invalidLocalTargetPort": "ローカルターゲットポートは1~65535の間でなければなりません。", + "invalidRemoteAddress": "リモートアドレスが必要です。", + "invalidRemotePort": "リモートポートは1~65535の間でなければなりません。", + "lastError": "最終エラー", + "lastStarted": "最終起動日時", + "lastTested": "最終テスト日時", + "localAddress": "現地住所", + "localPort": "ローカルポート", + "localSaveError": "クライアントトンネルの保存に失敗しました", + "localSaved": "クライアントトンネルを保存しました", + "manualControlError": "トンネル状態の更新に失敗しました。", + "maxRetries": "最大再試行回数", + "mode": "モード", + "nextRetryIn": "{{seconds}} 秒後に再試行", + "noClientTunnels": "このデスクトップにはクライアントトンネルが設定されていません。", + "noHostSelected": "ホストが選択されていません", + "noSshTunnels": "SSHトンネルがありません", + "port": "ポート", + "remoteBindAddress": "リモートバインドアドレス", + "remoteHost": "リモートホスト", + "remotePort": "リモートポート", + "retryInterval": "再試行間隔 (秒)", + "route": "ルート:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} 経由 {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} を {{endpoint}} 上で → {{localHost}}:{{localPort}}", + "test": "テスト", + "tunnelName": "トンネル名", + "tunnelTestFailed": "トンネルテストが失敗しました", + "tunnelTestSucceeded": "トンネルテストが成功しました", + "type": "トンネルタイプ", + "typeDynamic": "ダイナミック (-D)", + "typeLocal": "ローカル (-L)", + "typeRemote": "リモート (-R)", + "working": "処理中..." + } +} diff --git a/plugins/tunnels/locales/translated/ko_KR.json b/plugins/tunnels/locales/translated/ko_KR.json new file mode 100644 index 000000000..83e167d60 --- /dev/null +++ b/plugins/tunnels/locales/translated/ko_KR.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "터널 추가", + "autoStartDesc": "호스트가 로드될 때 이 터널을 자동으로 연결합니다.", + "autoStartLabel": "자동 시작", + "connectBtn": "연결", + "disconnectBtn": "연결 해제", + "enableTunneling": "터널링 활성화", + "enableTunnelingDesc": "이 호스트에 대한 SSH 터널 기능을 활성화합니다", + "endpointHost": "엔드포인트 호스트", + "endpointHostPlaceholder": "동일 호스트, SSH 호스트 또는 접근 가능한 호스트/IP", + "endpointPort": "엔드포인트 포트", + "failedToConnectTunnel": "연결 실패", + "failedToDisconnectTunnel": "연결 해제 실패", + "maxRetries": "최대 재시도", + "noTunnelsConfigured": "구성된 터널이 없습니다", + "retryIntervalS": "재시도 간격 (초)", + "serverTunnelsSection": "서버 터널", + "sourcePort": "소스 포트", + "tabTunnels": "터널", + "tunnelConnecting": "터널 연결 중...", + "tunnelDisconnected": "터널 연결 끊김", + "tunnelLabel": "터널 {{number}}", + "tunnelModeDynamicDesc": "동적 포트 포워딩을 위해 로컬 포트에 SOCKS5 프록시를 생성합니다.", + "tunnelModeLocalDesc": "로컬 포트를 원격 서버(또는 해당 서버에서 접근 가능한 호스트)의 포트로 포워딩합니다.", + "tunnelModeRemoteDesc": "원격 서버의 포트를 내 컴퓨터의 로컬 포트로 역방향 포워딩합니다.", + "tunnelRequirementsText": "SSH 서버의 /etc/ssh/sshd_config에 GatewayPorts yes, AllowTcpForwarding yes, PermitRootLogin yes가 설정되어 있어야 합니다.", + "tunnelSettings": "터널 설정", + "tunnelType": "터널 유형" + }, + "nav": { + "portForwarding": "전송", + "tunnels": "터널" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (로컬에서 수신 대기)", + "localTargetHost": "127.0.0.1 (이 컴퓨터의 대상)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (엔드포인트에서 수신 대기)", + "remoteTargetHost": "127.0.0.1 (엔드포인트에서 대상 주소)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS 리스너)" + }, + "profile": { + "c2sCurrentLocalConfig": "이 데스크톱에 구성된 로컬 클라이언트 터널 {{count}}개.", + "c2sLoadPreset": "불러오기", + "c2sNoPresetSelected": "프리셋이 선택되지 않음", + "c2sNoPresets": "저장된 프리셋이 없음", + "c2sPresetDeleted": "클라이언트 터널 프리셋이 삭제되었습니다.", + "c2sPresetLoadError": "클라이언트 터널 프리셋을 불러오지 못했습니다.", + "c2sPresetLoaded": "클라이언트 터널 프리셋이 로컬에 불러와졌습니다.", + "c2sPresetName": "프리셋 이름", + "c2sPresetNamePlaceholder": "클라이언트 프리셋 이름", + "c2sPresetRenamed": "클라이언트 터널 프리셋의 이름이 변경되었습니다.", + "c2sPresetSaved": "클라이언트 터널 프리셋이 저장되었습니다.", + "c2sPresetSyncNote": "프리셋은 명시적 스냅샷입니다. 프리셋을 불러오면 이 데스크톱 클라이언트의 로컬 클라이언트 터널 목록이 대체됩니다.", + "c2sPresetToLoad": "불러올 프리셋", + "c2sTunnelPresets": "클라이언트 터널 프리셋", + "c2sTunnelPresetsUnavailable": "클라이언트 터널 프리셋은 데스크톱 클라이언트에서만 사용할 수 있습니다." + }, + "tunnels": { + "attempt": "시도 {{current}}/{{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} ({{endpoint}} 경유)", + "autoNameClientLocal": "로컬 {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → 로컬 {{localPort}}", + "autoStart": "자동 시작", + "cancel": "취소", + "canceling": "취소 중...", + "clientAutoStartDesc": "이 데스크톱 클라이언트가 열리면 자동 시작되고 연결을 유지합니다.", + "clientManualStartDesc": "이 행에서 시작 및 중지를 사용하세요. Termix가 자동으로 열지 않습니다.", + "clientRemoteServerNote": "원격 포워딩은 엔드포인트 SSH 서버에서 AllowTcpForwarding 및 GatewayPorts 설정이 필요할 수 있습니다. 이 데스크톱 연결이 끊어지면 원격 포트가 닫힙니다.", + "clientTunnelStarted": "클라이언트 터널 시작됨", + "clientTunnelStopped": "클라이언트 터널 중지됨", + "clientTunnels": "클라이언트 터널", + "connected": "연결됨", + "connecting": "연결 중...", + "createFirstTunnelMessage": "아직 SSH 터널을 생성하지 않았습니다. 시작하려면 호스트 관리자에서 터널 연결을 구성하세요.", + "currentHostPort": "현재 호스트 포트", + "destination": "목적지", + "destinationAddress": "목적지 주소", + "destinationPort": "목적지 항구", + "disconnected": "연결 끊김", + "duplicateAutoStartBind": "자동 시작 클라이언트 터널 중 하나만 {{bind}}를 사용할 수 있습니다.", + "endpointPort": "엔드포인트 포트", + "endpointSshHost": "엔드포인트 SSH 호스트", + "endpointSshHostPlaceholder": "설정된 호스트 선택", + "endpointSshHostRequired": "각 클라이언트 터널에 엔드포인트 SSH 호스트를 선택하세요.", + "error": "오류", + "forwardDescriptionClientDynamic": "로컬 포트 {{sourcePort}}에서 SOCKS.", + "forwardDescriptionClientLocal": "로컬 {{sourcePort}} → 원격 {{endpointPort}}.", + "forwardDescriptionClientRemote": "원격 {{sourcePort}} → 로컬 {{endpointPort}}.", + "forwardDescriptionServerDynamic": "현재 호스트 {{sourcePort}}에서 SOCKS.", + "forwardDescriptionServerLocal": "현재 호스트 {{sourcePort}} → 엔드포인트 {{endpointPort}}.", + "forwardDescriptionServerRemote": "엔드포인트 {{endpointPort}} → 현재 호스트 {{sourcePort}}.", + "host": "호스트", + "intermediateHost": "중간 호스트", + "invalidBindIp": "로컬 IP는 유효한 IPv4 주소여야 합니다.", + "invalidEndpointPort": "엔드포인트 포트는 1에서 65535 사이여야 합니다.", + "invalidLocalPort": "로컬 포트는 1에서 65535 사이여야 합니다.", + "invalidLocalTargetIp": "로컬 대상 IP는 유효한 IPv4 주소여야 합니다.", + "invalidLocalTargetPort": "로컬 대상 포트는 1에서 65535 사이여야 합니다.", + "invalidRemoteAddress": "원격 주소가 필요합니다.", + "invalidRemotePort": "원격 포트는 1에서 65535 사이여야 합니다.", + "lastError": "마지막 오류", + "lastStarted": "마지막 시작", + "lastTested": "마지막 테스트", + "localAddress": "지역 주소", + "localPort": "로컬 포트", + "localSaveError": "로컬 클라이언트 터널 저장 실패", + "localSaved": "클라이언트 터널 저장됨", + "manualControlError": "터널 상태 업데이트 실패", + "maxRetries": "최대 재시도 횟수", + "mode": "모드", + "nextRetryIn": "{{seconds}}초 후 재시도", + "noClientTunnels": "이 데스크톱에 구성된 클라이언트 터널이 없습니다.", + "noHostSelected": "선택된 호스트 없음", + "noSshTunnels": "SSH 터널 없음", + "port": "포트", + "remoteBindAddress": "원격 바인딩 주소", + "remoteHost": "원격 호스트", + "remotePort": "원격 포트", + "retryInterval": "재시도 간격(초)", + "route": "경로:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS ({{endpoint}} 경유)", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} (경유: {{endpoint}})", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "테스트", + "tunnelName": "터널 이름", + "tunnelTestFailed": "터널 테스트 실패", + "tunnelTestSucceeded": "터널 테스트 성공", + "type": "터널 유형", + "typeDynamic": "동적 (-D)", + "typeLocal": "로컬 (-L)", + "typeRemote": "원격 (-R)", + "working": "작업 중..." + } +} diff --git a/plugins/tunnels/locales/translated/nl_NL.json b/plugins/tunnels/locales/translated/nl_NL.json new file mode 100644 index 000000000..a8f18b73b --- /dev/null +++ b/plugins/tunnels/locales/translated/nl_NL.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Voeg tunnel toe", + "autoStartDesc": "Deze tunnel automatisch verbinden wanneer de host wordt geladen.", + "autoStartLabel": "Automatisch starten", + "connectBtn": "Verbinden", + "disconnectBtn": "Verbinding verbreken", + "enableTunneling": "Tunneling inschakelen", + "enableTunnelingDesc": "Schakel de SSH-tunnelfunctionaliteit voor deze host in.", + "endpointHost": "Eindpunthost", + "endpointHostPlaceholder": "Dezelfde host, SSH-host of bereikbare host/IP-adres", + "endpointPort": "Eindpuntpoort", + "failedToConnectTunnel": "Verbinding mislukt", + "failedToDisconnectTunnel": "Verbinding verbreken mislukt", + "maxRetries": "Max. aantal herhalingen", + "noTunnelsConfigured": "Er zijn geen tunnels geconfigureerd.", + "retryIntervalS": "Herhaalinterval (s)", + "serverTunnelsSection": "Servertunnels", + "sourcePort": "Bronpoort", + "tabTunnels": "Tunnels", + "tunnelConnecting": "Tunnelverbinding...", + "tunnelDisconnected": "Tunnel losgekoppeld", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Maak een SOCKS5-proxy aan op een lokale poort voor dynamische poortdoorsturing.", + "tunnelModeLocalDesc": "Een lokale poort doorsturen naar een poort op de externe server (of een host die vanaf die server bereikbaar is).", + "tunnelModeRemoteDesc": "Een poort op de externe server doorsturen naar een lokale poort op uw computer.", + "tunnelRequirementsText": "De SSH-server moet de volgende instellingen hebben: GatewayPorts yes, AllowTcpForwarding yes en PermitRootLogin yes in /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnelinstellingen", + "tunnelType": "Tunneltype" + }, + "nav": { + "portForwarding": "Doorsturen", + "tunnels": "Tunnels" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lokaal luisteren)", + "localTargetHost": "127.0.0.1 (doel op deze computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (luisteren op eindpunt)", + "remoteTargetHost": "127.0.0.1 (doel van eindpunt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-luisteraar)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokale clienttunnel(s) geconfigureerd op deze desktop.", + "c2sLoadPreset": "Laden", + "c2sNoPresetSelected": "Geen voorinstelling geselecteerd", + "c2sNoPresets": "Geen presets opgeslagen", + "c2sPresetDeleted": "Client tunnel-voorinstelling verwijderd", + "c2sPresetLoadError": "Het laden van de clienttunnelvoorinstellingen is mislukt.", + "c2sPresetLoaded": "Client tunnel preset lokaal geladen", + "c2sPresetName": "Voorinstellingnaam", + "c2sPresetNamePlaceholder": "Naam van de clientvoorinstelling", + "c2sPresetRenamed": "Client tunnel-voorinstelling hernoemd", + "c2sPresetSaved": "Voorinstelling voor clienttunnel opgeslagen", + "c2sPresetSyncNote": "Voorinstellingen zijn expliciete momentopnamen; het laden ervan vervangt de lokale lijst met clienttunnels van deze desktopclient.", + "c2sPresetToLoad": "Voorinstelling om te laden", + "c2sTunnelPresets": "Clienttunnel-voorinstellingen", + "c2sTunnelPresetsUnavailable": "Clienttunnelvoorinstellingen zijn alleen beschikbaar in de desktopclient." + }, + "tunnels": { + "attempt": "Poging {{current}} van {{max}}", + "autoNameClientDynamic": "SOKKEN {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokaal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokaal {{localPort}}", + "autoStart": "Automatische start", + "cancel": "Annuleren", + "canceling": "Annuleren...", + "clientAutoStartDesc": "Begint wanneer deze desktopclient wordt geopend en blijft verbonden.", + "clientManualStartDesc": "Gebruik Start en Stop vanuit deze regel. Termix opent deze niet automatisch.", + "clientRemoteServerNote": "Voor het doorsturen van externe poorten zijn mogelijk de instellingen AllowTcpForwarding en GatewayPorts vereist op de SSH-server van het eindpunt. De externe poort wordt gesloten wanneer deze desktop de verbinding verbreekt.", + "clientTunnelStarted": "Clienttunnel gestart", + "clientTunnelStopped": "Clienttunnel gestopt", + "clientTunnels": "Clienttunnels", + "connected": "Aangesloten", + "connecting": "Verbinden...", + "createFirstTunnelMessage": "Je hebt nog geen SSH-tunnels aangemaakt. Configureer tunnelverbindingen in de Host Manager om te beginnen.", + "currentHostPort": "Huidige hostpoort", + "destination": "Bestemming", + "destinationAddress": "Bestemmingsadres", + "destinationPort": "Bestemmingshaven", + "disconnected": "Verbinding verbroken", + "duplicateAutoStartBind": "Slechts één automatisch startende clienttunnel kan {{bind}} gebruiken.", + "endpointPort": "Eindpuntpoort", + "endpointSshHost": "Eindpunt SSH-host", + "endpointSshHostPlaceholder": "Selecteer een geconfigureerde host.", + "endpointSshHostRequired": "Selecteer een SSH-host voor elke clienttunnel.", + "error": "Fout", + "forwardDescriptionClientDynamic": "SOCKS op lokale poort {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokaal {{sourcePort}} → extern {{endpointPort}}.", + "forwardDescriptionClientRemote": "Extern {{sourcePort}} → lokaal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS op de huidige host {{sourcePort}}.", + "forwardDescriptionServerLocal": "Huidige host {{sourcePort}} → eindpunt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Eindpunt {{endpointPort}} → huidige host {{sourcePort}}.", + "host": "Gastheer", + "intermediateHost": "Tussenliggende gastheer", + "invalidBindIp": "Het lokale IP-adres moet een geldig IPv4-adres zijn.", + "invalidEndpointPort": "De eindpoort moet tussen 1 en 65535 liggen.", + "invalidLocalPort": "Het lokale poortnummer moet tussen 1 en 65535 liggen.", + "invalidLocalTargetIp": "Het lokale doel-IP-adres moet een geldig IPv4-adres zijn.", + "invalidLocalTargetPort": "De lokale doelpoort moet tussen 1 en 65535 liggen.", + "invalidRemoteAddress": "Een extern adres is vereist.", + "invalidRemotePort": "De externe poort moet tussen 1 en 65535 liggen.", + "lastError": "Laatste fout", + "lastStarted": "Laatst gestart", + "lastTested": "Laatst getest", + "localAddress": "Lokaal adres", + "localPort": "Lokale haven", + "localSaveError": "Het opslaan van lokale clienttunnels is mislukt.", + "localSaved": "Clienttunnels opgeslagen", + "manualControlError": "Het bijwerken van de tunnelstatus is mislukt.", + "maxRetries": "Max. aantal herhalingen", + "mode": "Modus", + "nextRetryIn": "Volgende poging over {{seconds}} seconden", + "noClientTunnels": "Er zijn geen clienttunnels geconfigureerd op deze desktop.", + "noHostSelected": "Geen host geselecteerd", + "noSshTunnels": "Geen SSH-tunnels", + "port": "Haven", + "remoteBindAddress": "Extern bindadres", + "remoteHost": "Externe host", + "remotePort": "Externe poort", + "retryInterval": "Interval voor herpogingen (seconden)", + "route": "Route:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOKKEN via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} op {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Tunnelnaam", + "tunnelTestFailed": "Tunneltest mislukt", + "tunnelTestSucceeded": "Tunneltest geslaagd", + "type": "Tunneltype", + "typeDynamic": "Dynamisch (-D)", + "typeLocal": "Lokaal (-L)", + "typeRemote": "Afstandsbediening (-R)", + "working": "Bezig met verwerken..." + } +} diff --git a/plugins/tunnels/locales/translated/no_NO.json b/plugins/tunnels/locales/translated/no_NO.json new file mode 100644 index 000000000..ff172fc3a --- /dev/null +++ b/plugins/tunnels/locales/translated/no_NO.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Legg til tunnel", + "autoStartDesc": "Koble til denne tunnelen automatisk når verten lastes inn", + "autoStartLabel": "Automatisk start", + "connectBtn": "Koble til", + "disconnectBtn": "Frakople", + "enableTunneling": "Aktiver tunnelering", + "enableTunnelingDesc": "Aktiver SSH-tunnelfunksjonalitet for denne verten", + "endpointHost": "Endepunktvert", + "endpointHostPlaceholder": "Samme vert, SSH-vert eller tilgjengelig vert/IP", + "endpointPort": "Endepunktport", + "failedToConnectTunnel": "Kunne ikke koble til", + "failedToDisconnectTunnel": "Kunne ikke koble fra", + "maxRetries": "Maks antall nye forsøk", + "noTunnelsConfigured": "Ingen tunneler konfigurert.", + "retryIntervalS": "Intervall for nye forsøk (s)", + "serverTunnelsSection": "Servertunneler", + "sourcePort": "Kildeport", + "tabTunnels": "Tunneler", + "tunnelConnecting": "Tunnelforbindelse...", + "tunnelDisconnected": "Tunnelen frakoblet", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Opprett en SOCKS5-proxy på en lokal port for dynamisk portvideresending.", + "tunnelModeLocalDesc": "Videresend en lokal port til en port på den eksterne serveren (eller en vert som er tilgjengelig fra den).", + "tunnelModeRemoteDesc": "Videresend en port på den eksterne serveren tilbake til en lokal port på maskinen din.", + "tunnelRequirementsText": "SSH-serveren må ha GatewayPorts ja, AllowTcpForwarding ja og PermitRootLogin ja angitt i /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnelinnstillinger", + "tunnelType": "Tunneltype" + }, + "nav": { + "portForwarding": "Videresending", + "tunnels": "Tunneler" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lytt lokalt)", + "localTargetHost": "127.0.0.1 (mål på denne datamaskinen)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (lytt på endepunkt)", + "remoteTargetHost": "127.0.0.1 (mål fra endepunkt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-lytter)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokale klienttunneler konfigurert på dette skrivebordet.", + "c2sLoadPreset": "Laste", + "c2sNoPresetSelected": "Ingen forhåndsinnstilling valgt", + "c2sNoPresets": "Ingen forhåndsinnstillinger lagret", + "c2sPresetDeleted": "Forhåndsinnstilling for klienttunnel slettet", + "c2sPresetLoadError": "Kunne ikke laste inn forhåndsinnstillinger for klienttunnel", + "c2sPresetLoaded": "Forhåndsinnstilling for klienttunnel lastes inn lokalt", + "c2sPresetName": "Forhåndsinnstilt navn", + "c2sPresetNamePlaceholder": "Klientens forhåndsinnstilte navn", + "c2sPresetRenamed": "Forhåndsinnstilling for klienttunnel omdøpt", + "c2sPresetSaved": "Forhåndsinnstilling for klienttunnel lagret", + "c2sPresetSyncNote": "Forhåndsinnstillinger er eksplisitte øyeblikksbilder; lasting av et erstatter denne skrivebordsklientens lokale klienttunnelliste.", + "c2sPresetToLoad": "Forhåndsinnstilt for lasting", + "c2sTunnelPresets": "Forhåndsinnstillinger for klienttunnel", + "c2sTunnelPresetsUnavailable": "Forhåndsinnstillinger for klienttunnel er bare tilgjengelige i skrivebordsklienten." + }, + "tunnels": { + "attempt": "Forsøk {{current}} av {{max}}", + "autoNameClientDynamic": "SOKKER {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokal {{localPort}}", + "autoStart": "Automatisk start", + "cancel": "Kansellere", + "canceling": "Avbryter...", + "clientAutoStartDesc": "Starter når denne skrivebordsklienten åpnes og forblir tilkoblet.", + "clientManualStartDesc": "Bruk Start og Stopp fra denne raden. Termix vil ikke åpne den automatisk.", + "clientRemoteServerNote": "Ekstern videresending kan kreve AllowTcpForwarding og GatewayPorts på endepunktets SSH-server. Den eksterne porten lukkes når dette skrivebordet kobles fra.", + "clientTunnelStarted": "Klienttunnel startet", + "clientTunnelStopped": "Klienttunnelen stoppet", + "clientTunnels": "Klienttunneler", + "connected": "Tilkoblet", + "connecting": "Kobler til...", + "createFirstTunnelMessage": "Du har ikke opprettet noen SSH-tunneler ennå. Konfigurer tunneltilkoblinger i Host Manager for å komme i gang.", + "currentHostPort": "Gjeldende vertsport", + "destination": "Destinasjon", + "destinationAddress": "Destinasjonsadresse", + "destinationPort": "Destinasjonshavn", + "disconnected": "Frakoblet", + "duplicateAutoStartBind": "Bare én automatisk-start-klientunnel kan bruke {{bind}}.", + "endpointPort": "Endepunktport", + "endpointSshHost": "Endepunkt SSH-vert", + "endpointSshHostPlaceholder": "Velg en konfigurert vert", + "endpointSshHostRequired": "Velg en SSH-vert for endepunktet for hver klienttunnel.", + "error": "Feil", + "forwardDescriptionClientDynamic": "SOCKS på lokal port {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokal {{sourcePort}} → ekstern {{endpointPort}}.", + "forwardDescriptionClientRemote": "Fjern {{sourcePort}} → lokal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS på gjeldende vert {{sourcePort}}.", + "forwardDescriptionServerLocal": "Nåværende vert {{sourcePort}} → endepunkt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endepunkt {{endpointPort}} → gjeldende vert {{sourcePort}}.", + "host": "Vert", + "intermediateHost": "Mellomliggende vert", + "invalidBindIp": "Lokal IP-adresse må være en gyldig IPv4-adresse.", + "invalidEndpointPort": "Endepunktporten må være mellom 1 og 65535.", + "invalidLocalPort": "Lokal port må være mellom 1 og 65535.", + "invalidLocalTargetIp": "Lokal mål-IP må være en gyldig IPv4-adresse.", + "invalidLocalTargetPort": "Den lokale målporten må være mellom 1 og 65535.", + "invalidRemoteAddress": "Ekstern adresse er påkrevd.", + "invalidRemotePort": "Ekstern port må være mellom 1 og 65535.", + "lastError": "Siste feil", + "lastStarted": "Sist startet", + "lastTested": "Sist testet", + "localAddress": "Lokal adresse", + "localPort": "Lokal havn", + "localSaveError": "Kunne ikke lagre lokale klienttunneler", + "localSaved": "Klienttunneler lagret", + "manualControlError": "Kunne ikke oppdatere tunnelstatus.", + "maxRetries": "Maks antall nye forsøk", + "mode": "Modus", + "nextRetryIn": "Neste forsøk om {{seconds}} sekunder", + "noClientTunnels": "Ingen klienttunneler er konfigurert på dette skrivebordet.", + "noHostSelected": "Ingen vert valgt", + "noSshTunnels": "Ingen SSH-tunneler", + "port": "Havn", + "remoteBindAddress": "Fjernbindingsadresse", + "remoteHost": "Ekstern vert", + "remotePort": "Ekstern port", + "retryInterval": "Intervall for nye forsøk (sekunder)", + "route": "Rute:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOKKER via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} på {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Tunnelnavn", + "tunnelTestFailed": "Tunneltest mislyktes", + "tunnelTestSucceeded": "Tunneltesten var vellykket", + "type": "Tunneltype", + "typeDynamic": "Dynamisk (-D)", + "typeLocal": "Lokal (-L)", + "typeRemote": "Fjernkontroll (-R)", + "working": "Arbeider..." + } +} diff --git a/plugins/tunnels/locales/translated/pl_PL.json b/plugins/tunnels/locales/translated/pl_PL.json new file mode 100644 index 000000000..0cea9f5e1 --- /dev/null +++ b/plugins/tunnels/locales/translated/pl_PL.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Dodaj tunel", + "autoStartDesc": "Automatycznie połącz ten tunel po załadowaniu hosta", + "autoStartLabel": "Autostart", + "connectBtn": "Połącz", + "disconnectBtn": "Odłącz", + "enableTunneling": "Włącz tunelowanie", + "enableTunnelingDesc": "Włącz funkcjonalność tunelu SSH dla tego hosta", + "endpointHost": "Host punktu końcowego", + "endpointHostPlaceholder": "Ten sam host, host SSH lub dostępny host/adres IP", + "endpointPort": "Port końcowy", + "failedToConnectTunnel": "Nie udało się połączyć", + "failedToDisconnectTunnel": "Nie udało się rozłączyć", + "maxRetries": "Maksymalna liczba ponownych prób", + "noTunnelsConfigured": "Nie skonfigurowano żadnych tuneli.", + "retryIntervalS": "Interwał ponawiania (s)", + "serverTunnelsSection": "Tunele serwerowe", + "sourcePort": "Port źródłowy", + "tabTunnels": "Tunele", + "tunnelConnecting": "Łączenie tunelu...", + "tunnelDisconnected": "Tunel rozłączony", + "tunnelLabel": "Tunel {{number}}", + "tunnelModeDynamicDesc": "Utwórz serwer proxy SOCKS5 na porcie lokalnym w celu dynamicznego przekierowywania portów.", + "tunnelModeLocalDesc": "Przekieruj port lokalny do portu na serwerze zdalnym (lub do hosta, do którego można uzyskać dostęp z tego serwera).", + "tunnelModeRemoteDesc": "Przekieruj port na serwerze zdalnym z powrotem do portu lokalnego na swoim komputerze.", + "tunnelRequirementsText": "Serwer SSH musi mieć w /etc/ssh/sshd_config ustawione GatewayPorts yes, AllowTcpForwarding yes i PermitRootLogin yes.", + "tunnelSettings": "Ustawienia tunelu", + "tunnelType": "Typ tunelu" + }, + "nav": { + "portForwarding": "Przekierowanie", + "tunnels": "Tunele" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (nasłuch lokalny)", + "localTargetHost": "127.0.0.1 (cel na tym komputerze)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (nasłuchiwanie na punkcie końcowym)", + "remoteTargetHost": "127.0.0.1 (cel z punktu końcowego)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (nasłuch SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "Liczba lokalnych tuneli klienta skonfigurowanych na tym komputerze: {{count}}.", + "c2sLoadPreset": "Wczytaj", + "c2sNoPresetSelected": "Nie wybrano zestawu", + "c2sNoPresets": "Brak zapisanych zestawów", + "c2sPresetDeleted": "Usunięto zestaw tuneli klienta", + "c2sPresetLoadError": "Nie udało się wczytać zestawów tuneli klienta", + "c2sPresetLoaded": "Wczytano zestaw tuneli klienta lokalnie", + "c2sPresetName": "Nazwa zestawu", + "c2sPresetNamePlaceholder": "Nazwa zestawu klienta", + "c2sPresetRenamed": "Zmieniono nazwę zestawu tuneli klienta", + "c2sPresetSaved": "Zapisano zestaw tuneli klienta", + "c2sPresetSyncNote": "Zestawy to jawne migawki; wczytanie zestawu zastępuje listę lokalnych tuneli klienta w tej aplikacji.", + "c2sPresetToLoad": "Zestaw do wczytania", + "c2sTunnelPresets": "Zestawy tuneli klienta", + "c2sTunnelPresetsUnavailable": "Zestawy tuneli klienta są dostępne tylko w aplikacji desktopowej." + }, + "tunnels": { + "attempt": "Próba {{current}} z {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} przez {{endpoint}}", + "autoNameClientLocal": "Lokalny {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokalny {{localPort}}", + "autoStart": "Autostart", + "cancel": "Anuluj", + "canceling": "Anulowanie...", + "clientAutoStartDesc": "Uruchamia się przy starcie aplikacji desktopowej i pozostaje połączony.", + "clientManualStartDesc": "Użyj przycisków Start i Stop z tego wiersza. Termix nie otworzy go automatycznie.", + "clientRemoteServerNote": "Przekierowanie zdalne może wymagać opcji AllowTcpForwarding i GatewayPorts na serwerze SSH punktu końcowego. Port zdalny zamyka się po rozłączeniu tego komputera.", + "clientTunnelStarted": "Uruchomiono tunel klienta", + "clientTunnelStopped": "Zatrzymano tunel klienta", + "clientTunnels": "Tunele klienckie", + "connected": "Połączono", + "connecting": "Łączenie...", + "createFirstTunnelMessage": "Nie utworzono jeszcze żadnych tuneli SSH. Skonfiguruj połączenia tunelowe w Menedżerze hostów, aby zacząć.", + "currentHostPort": "Aktualny port hosta", + "destination": "Cel", + "destinationAddress": "Adres docelowy", + "destinationPort": "Port docelowy", + "disconnected": "Rozłączono", + "duplicateAutoStartBind": "Tylko jeden tunel klienta z automatycznym uruchomieniem może używać {{bind}}.", + "endpointPort": "Port końcowy", + "endpointSshHost": "Host SSH punktu końcowego", + "endpointSshHostPlaceholder": "Wybierz skonfigurowanego hosta", + "endpointSshHostRequired": "Wybierz hosta SSH punktu końcowego dla każdego tunelu klienta.", + "error": "Błąd", + "forwardDescriptionClientDynamic": "SOCKS na porcie lokalnym {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokalny {{sourcePort}} → zdalny {{endpointPort}}.", + "forwardDescriptionClientRemote": "Zdalny {{sourcePort}} → lokalny {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS na bieżącym hoście {{sourcePort}}.", + "forwardDescriptionServerLocal": "Aktualny host {{sourcePort}} → punkt końcowy {{endpointPort}}.", + "forwardDescriptionServerRemote": "Punkt końcowy {{endpointPort}} → bieżący host {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Żywiciel pośredni", + "invalidBindIp": "Lokalny adres IP musi być prawidłowym adresem IPv4.", + "invalidEndpointPort": "Port końcowy musi mieścić się w zakresie od 1 do 65535.", + "invalidLocalPort": "Port lokalny musi mieścić się w zakresie od 1 do 65535.", + "invalidLocalTargetIp": "Lokalny adres IP docelowy musi być prawidłowym adresem IPv4.", + "invalidLocalTargetPort": "Lokalny port docelowy musi mieścić się w zakresie od 1 do 65535.", + "invalidRemoteAddress": "Wymagany jest adres zdalny.", + "invalidRemotePort": "Port zdalny musi mieścić się w zakresie od 1 do 65535.", + "lastError": "Ostatni błąd", + "lastStarted": "Ostatnio uruchomiony", + "lastTested": "Ostatnio testowane", + "localAddress": "Adres lokalny", + "localPort": "Port lokalny", + "localSaveError": "Nie udało się zapisać lokalnych tuneli klienta", + "localSaved": "Zapisano tunele klienta", + "manualControlError": "Nie udało się zaktualizować stanu tunelu.", + "maxRetries": "Maksymalna liczba ponownych prób", + "mode": "Tryb", + "nextRetryIn": "Następna próba za {{seconds}} sekund", + "noClientTunnels": "Na tym komputerze nie skonfigurowano żadnych tuneli klienckich.", + "noHostSelected": "Nie wybrano hosta", + "noSshTunnels": "Brak tuneli SSH", + "port": "Port", + "remoteBindAddress": "Zdalny adres powiązania", + "remoteHost": "Zdalny host", + "remotePort": "Zdalny port", + "retryInterval": "Interwał ponawiania (sekundy)", + "route": "Trasa:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS przez {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} przez {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} na {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Nazwa tunelu", + "tunnelTestFailed": "Test tunelu nie powiódł się", + "tunnelTestSucceeded": "Test tunelu zakończony powodzeniem", + "type": "Typ tunelu", + "typeDynamic": "Dynamiczny (-D)", + "typeLocal": "Lokalny (-L)", + "typeRemote": "Zdalny (-R)", + "working": "Przetwarzanie..." + } +} diff --git a/plugins/tunnels/locales/translated/pt_BR.json b/plugins/tunnels/locales/translated/pt_BR.json new file mode 100644 index 000000000..f65d220bf --- /dev/null +++ b/plugins/tunnels/locales/translated/pt_BR.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Adicionar túnel", + "autoStartDesc": "Conecte este túnel automaticamente quando o host estiver carregado.", + "autoStartLabel": "Início automático", + "connectBtn": "Conectar", + "disconnectBtn": "Desconectar", + "enableTunneling": "Habilitar o tunelamento", + "enableTunnelingDesc": "Ative a funcionalidade de túnel SSH para este host.", + "endpointHost": "Host do ponto final", + "endpointHostPlaceholder": "Mesmo host, host SSH ou host/IP acessível", + "endpointPort": "Porta de ponto final", + "failedToConnectTunnel": "Falha ao conectar", + "failedToDisconnectTunnel": "Falha ao desconectar", + "maxRetries": "Número máximo de tentativas", + "noTunnelsConfigured": "Nenhum túnel configurado.", + "retryIntervalS": "Intervalo de tentativas (s)", + "serverTunnelsSection": "Túneis de servidor", + "sourcePort": "Porta de origem", + "tabTunnels": "Túneis", + "tunnelConnecting": "Túnel de ligação...", + "tunnelDisconnected": "Túnel desconectado", + "tunnelLabel": "Túnel {{number}}", + "tunnelModeDynamicDesc": "Crie um proxy SOCKS5 em uma porta local para encaminhamento dinâmico de portas.", + "tunnelModeLocalDesc": "Encaminhar uma porta local para uma porta no servidor remoto (ou em um host acessível a partir dele).", + "tunnelModeRemoteDesc": "Encaminhe uma porta no servidor remoto de volta para uma porta local em sua máquina.", + "tunnelRequirementsText": "O servidor SSH deve ter as seguintes configurações definidas em /etc/ssh/sshd_config: GatewayPorts yes, AllowTcpForwarding yes e PermitRootLogin yes.", + "tunnelSettings": "Configurações do túnel", + "tunnelType": "Tipo de túnel" + }, + "nav": { + "portForwarding": "Encaminhamento", + "tunnels": "Túneis" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (ouvir localmente)", + "localTargetHost": "127.0.0.1 (alvo neste computador)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (escutar no ponto de extremidade)", + "remoteTargetHost": "127.0.0.1 (destino do ponto de extremidade)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (ouvinte SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} Túneis de cliente local configurados nesta área de trabalho.", + "c2sLoadPreset": "Carregar", + "c2sNoPresetSelected": "Nenhuma predefinição selecionada", + "c2sNoPresets": "Nenhuma predefinição salva", + "c2sPresetDeleted": "Configuração de túnel do cliente excluída", + "c2sPresetLoadError": "Falha ao carregar as predefinições do túnel do cliente.", + "c2sPresetLoaded": "Configuração predefinida do túnel do cliente carregada localmente", + "c2sPresetName": "Nome predefinido", + "c2sPresetNamePlaceholder": "Nome predefinido do cliente", + "c2sPresetRenamed": "A predefinição do túnel do cliente foi renomeada.", + "c2sPresetSaved": "Configuração predefinida do túnel do cliente salva", + "c2sPresetSyncNote": "As predefinições são instantâneos explícitos; carregar uma substitui a lista de túneis de clientes locais deste cliente de desktop.", + "c2sPresetToLoad": "Predefinido para carregar", + "c2sTunnelPresets": "Configurações predefinidas do túnel do cliente", + "c2sTunnelPresetsUnavailable": "As configurações predefinidas de túnel do cliente estão disponíveis apenas no cliente para desktop." + }, + "tunnels": { + "attempt": "Tentativa {{current}} de {{max}}", + "autoNameClientDynamic": "MEIAS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Início automático", + "cancel": "Cancelar", + "canceling": "Cancelando...", + "clientAutoStartDesc": "Inicia quando este cliente de desktop é aberto e permanece conectado.", + "clientManualStartDesc": "Use os botões Iniciar e Parar a partir desta linha. O Termix não os abrirá automaticamente.", + "clientRemoteServerNote": "O encaminhamento remoto pode exigir as permissões AllowTcpForwarding e GatewayPorts no servidor SSH do endpoint. A porta remota é fechada quando esta área de trabalho se desconecta.", + "clientTunnelStarted": "O túnel do cliente foi iniciado.", + "clientTunnelStopped": "O túnel do cliente foi interrompido.", + "clientTunnels": "Túneis para clientes", + "connected": "Conectado", + "connecting": "Conectando...", + "createFirstTunnelMessage": "Você ainda não criou nenhum túnel SSH. Configure as conexões de túnel no Gerenciador de Hosts para começar.", + "currentHostPort": "Porta do host atual", + "destination": "Destino", + "destinationAddress": "Endereço de destino", + "destinationPort": "Porto de destino", + "disconnected": "Desconectado", + "duplicateAutoStartBind": "Apenas um túnel de cliente de inicialização automática pode usar {{bind}}.", + "endpointPort": "Porta de ponto final", + "endpointSshHost": "Host SSH de ponto final", + "endpointSshHostPlaceholder": "Selecione um host configurado", + "endpointSshHostRequired": "Selecione um host SSH de ponto final para cada túnel de cliente.", + "error": "Erro", + "forwardDescriptionClientDynamic": "SOCKS na porta local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → remoto {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remoto {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS no host atual {{sourcePort}}.", + "forwardDescriptionServerLocal": "Host atual {{sourcePort}} → endpoint {{endpointPort}}.", + "forwardDescriptionServerRemote": "Ponto final {{endpointPort}} → host atual {{sourcePort}}.", + "host": "Hospedar", + "intermediateHost": "Anfitrião intermediário", + "invalidBindIp": "O endereço IP local deve ser um endereço IPv4 válido.", + "invalidEndpointPort": "A porta do ponto final deve estar entre 1 e 65535.", + "invalidLocalPort": "A porta local deve estar entre 1 e 65535.", + "invalidLocalTargetIp": "O endereço IP de destino local deve ser um endereço IPv4 válido.", + "invalidLocalTargetPort": "A porta de destino local deve estar entre 1 e 65535.", + "invalidRemoteAddress": "É necessário um endereço remoto.", + "invalidRemotePort": "A porta remota deve estar entre 1 e 65535.", + "lastError": "Último erro", + "lastStarted": "Última vez iniciado", + "lastTested": "Último teste", + "localAddress": "Endereço local", + "localPort": "Porto local", + "localSaveError": "Falha ao salvar os túneis do cliente local.", + "localSaved": "Túneis de clientes salvos", + "manualControlError": "Falha ao atualizar o estado do túnel.", + "maxRetries": "Número máximo de tentativas", + "mode": "Modo", + "nextRetryIn": "Próxima tentativa em {{seconds}} segundos", + "noClientTunnels": "Nenhum túnel de cliente configurado nesta área de trabalho.", + "noHostSelected": "Nenhum host selecionado", + "noSshTunnels": "Sem túneis SSH", + "port": "Porta", + "remoteBindAddress": "Endereço de vinculação remota", + "remoteHost": "Host remoto", + "remotePort": "Porta remota", + "retryInterval": "Intervalo de tentativas (segundos)", + "route": "Rota:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → MEIAS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} em {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Teste", + "tunnelName": "Nome do túnel", + "tunnelTestFailed": "O teste do túnel falhou", + "tunnelTestSucceeded": "O teste no túnel foi bem-sucedido.", + "type": "Tipo de túnel", + "typeDynamic": "Dinâmico (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Remoto (-R)", + "working": "Trabalhando..." + } +} diff --git a/plugins/tunnels/locales/translated/pt_PT.json b/plugins/tunnels/locales/translated/pt_PT.json new file mode 100644 index 000000000..b10f23f4d --- /dev/null +++ b/plugins/tunnels/locales/translated/pt_PT.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Adicionar túnel", + "autoStartDesc": "Conectar automaticamente este túnel quando o host for carregado", + "autoStartLabel": "Início Automático", + "connectBtn": "Ligar", + "disconnectBtn": "Desligar", + "enableTunneling": "Ativar tunelamento", + "enableTunnelingDesc": "Ativar a funcionalidade de túnel SSH para este host", + "endpointHost": "Host de Destino", + "endpointHostPlaceholder": "Mesmo host, host SSH ou host/IP acessível", + "endpointPort": "Porta de Destino", + "failedToConnectTunnel": "Falha ao conectar", + "failedToDisconnectTunnel": "Falha ao desligar", + "maxRetries": "Tentativas Máximas", + "noTunnelsConfigured": "Nenhum túnel configurado.", + "retryIntervalS": "Intervalo de Repetição (s)", + "serverTunnelsSection": "Túneis do servidor", + "sourcePort": "Porta de Origem", + "tabTunnels": "Túneis", + "tunnelConnecting": "Túnel a conectar...", + "tunnelDisconnected": "Túnel desligado", + "tunnelLabel": "Túnel {{number}}", + "tunnelModeDynamicDesc": "Criar um proxy SOCKS5 numa porta local para reencaminhamento dinâmico de portas.", + "tunnelModeLocalDesc": "Reencaminhar uma porta local para uma porta no servidor remoto (ou um host acessível a partir dele).", + "tunnelModeRemoteDesc": "Reencaminhar uma porta no servidor remoto de volta para uma porta local na sua máquina.", + "tunnelRequirementsText": "O servidor SSH deve ter GatewayPorts yes, AllowTcpForwarding yes e PermitRootLogin yes definidos em /etc/ssh/sshd_config.", + "tunnelSettings": "Definições de túnel", + "tunnelType": "Tipo de túnel" + }, + "nav": { + "portForwarding": "Encaminhamento", + "tunnels": "Túneis" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (escuta localmente)", + "localTargetHost": "127.0.0.1 (alvo neste computador)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (escutar no ponto final)", + "remoteTargetHost": "127.0.0.1 (destino do ponto final)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (escuta SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} túnel/túneis de cliente local configurado(s) neste ambiente de trabalho.", + "c2sLoadPreset": "Carregar", + "c2sNoPresetSelected": "Nenhuma predefinição selecionada", + "c2sNoPresets": "Nenhuma predefinição guardada", + "c2sPresetDeleted": "Predefinição de túnel do cliente eliminada", + "c2sPresetLoadError": "Falha ao carregar as predefinições de túneis do cliente", + "c2sPresetLoaded": "Predefinição de túnel do cliente carregada localmente", + "c2sPresetName": "Nome da predefinição", + "c2sPresetNamePlaceholder": "Nome da predefinição do cliente", + "c2sPresetRenamed": "Predefinição de túnel do cliente renomeada", + "c2sPresetSaved": "Predefinição de túnel do cliente guardada", + "c2sPresetSyncNote": "As predefinições são instantâneos explícitos; carregar uma substitui a lista de túneis de cliente local deste cliente de ambiente de trabalho.", + "c2sPresetToLoad": "Predefinição a carregar", + "c2sTunnelPresets": "Predefinições de túneis do cliente", + "c2sTunnelPresetsUnavailable": "As predefinições de túneis do cliente estão disponíveis apenas no cliente de ambiente de trabalho." + }, + "tunnels": { + "attempt": "Tentativa {{current}} de {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Arranque automático", + "cancel": "Cancelar", + "canceling": "A cancelar...", + "clientAutoStartDesc": "Inicia quando este cliente de desktop abre e permanece ligado.", + "clientManualStartDesc": "Utilize Iniciar e Parar nesta linha. O Termix não o abrirá automaticamente.", + "clientRemoteServerNote": "O reencaminhamento remoto pode exigir AllowTcpForwarding e GatewayPorts no servidor SSH do endpoint. A porta remota fecha quando este desktop se desliga.", + "clientTunnelStarted": "Túnel de cliente iniciado", + "clientTunnelStopped": "Túnel de cliente parado", + "clientTunnels": "Túneis de cliente", + "connected": "Ligado", + "connecting": "A ligar...", + "createFirstTunnelMessage": "Ainda não criou nenhum túnel SSH. Configure as ligações de túnel no Gestor de Anfitriões para começar.", + "currentHostPort": "Porta do host atual", + "destination": "Destino", + "destinationAddress": "Endereço de destino", + "destinationPort": "Porto de destino", + "disconnected": "Desligado", + "duplicateAutoStartBind": "Apenas um túnel de cliente com arranque automático pode utilizar {{bind}}.", + "endpointPort": "Porta do endpoint", + "endpointSshHost": "Host SSH do endpoint", + "endpointSshHostPlaceholder": "Selecionar um host configurado", + "endpointSshHostRequired": "Selecione um host SSH do endpoint para cada túnel de cliente.", + "error": "Erro", + "forwardDescriptionClientDynamic": "SOCKS na porta local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → remoto {{endpointPort}}.", + "forwardDescriptionClientRemote": "Remoto {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS no host atual {{sourcePort}}.", + "forwardDescriptionServerLocal": "Host atual {{sourcePort}} → endpoint {{endpointPort}}.", + "forwardDescriptionServerRemote": "Endpoint {{endpointPort}} → host atual {{sourcePort}}.", + "host": "Servidor", + "intermediateHost": "Anfitrião intermediário", + "invalidBindIp": "O IP local deve ser um endereço IPv4 válido.", + "invalidEndpointPort": "A porta do endpoint deve estar entre 1 e 65535.", + "invalidLocalPort": "A porta local deve estar entre 1 e 65535.", + "invalidLocalTargetIp": "O IP de destino local deve ser um endereço IPv4 válido.", + "invalidLocalTargetPort": "A porta de destino local deve estar entre 1 e 65535.", + "invalidRemoteAddress": "É necessário um endereço remoto.", + "invalidRemotePort": "A porta remota deve estar entre 1 e 65535.", + "lastError": "Último erro", + "lastStarted": "Último início", + "lastTested": "Último teste", + "localAddress": "Endereço local", + "localPort": "Porta local", + "localSaveError": "Falha ao guardar os túneis de cliente locais", + "localSaved": "Túneis de cliente guardados", + "manualControlError": "Falha ao atualizar o estado do túnel.", + "maxRetries": "Máx. tentativas", + "mode": "Modo", + "nextRetryIn": "Próxima tentativa em {{seconds}} segundos", + "noClientTunnels": "Nenhum túnel de cliente configurado neste desktop.", + "noHostSelected": "Nenhum servidor selecionado", + "noSshTunnels": "Sem túneis SSH", + "port": "Porta", + "remoteBindAddress": "Endereço de ligação remota", + "remoteHost": "Host remoto", + "remotePort": "Porta remota", + "retryInterval": "Intervalo de repetição (segundos)", + "route": "Rota:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} em {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Testar", + "tunnelName": "Nome do túnel", + "tunnelTestFailed": "Teste do túnel falhou", + "tunnelTestSucceeded": "Teste do túnel bem-sucedido", + "type": "Tipo de Túnel", + "typeDynamic": "Dinâmico (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Remoto (-R)", + "working": "A trabalhar..." + } +} diff --git a/plugins/tunnels/locales/translated/ro_RO.json b/plugins/tunnels/locales/translated/ro_RO.json new file mode 100644 index 000000000..95e786ce4 --- /dev/null +++ b/plugins/tunnels/locales/translated/ro_RO.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Adăugați tunel", + "autoStartDesc": "Conectează automat acest tunel când gazda este încărcată", + "autoStartLabel": "Pornire automată", + "connectBtn": "Conectează-te", + "disconnectBtn": "Deconecta", + "enableTunneling": "Activează tunelarea", + "enableTunnelingDesc": "Activează funcționalitatea tunelului SSH pentru această gazdă", + "endpointHost": "Gazdă punct final", + "endpointHostPlaceholder": "Aceeași gazdă, gazdă SSH sau gazdă/IP accesibil", + "endpointPort": "Portul punctului final", + "failedToConnectTunnel": "Conectarea nu a reușit", + "failedToDisconnectTunnel": "Deconectare eșuată", + "maxRetries": "Număr maxim de reîncercări", + "noTunnelsConfigured": "Niciun tunel configurat.", + "retryIntervalS": "Interval de reîncercare (s)", + "serverTunnelsSection": "Tuneluri de server", + "sourcePort": "Port sursă", + "tabTunnels": "Tuneluri", + "tunnelConnecting": "Tunel care conectează...", + "tunnelDisconnected": "Tunel deconectat", + "tunnelLabel": "Tunel {{number}}", + "tunnelModeDynamicDesc": "Creați un proxy SOCKS5 pe un port local pentru redirecționarea dinamică a porturilor.", + "tunnelModeLocalDesc": "Redirecționează un port local către un port de pe serverul la distanță (sau o gazdă accesibilă de pe acesta).", + "tunnelModeRemoteDesc": "Redirecționează un port de pe serverul la distanță înapoi către un port local de pe mașina ta.", + "tunnelRequirementsText": "Serverul SSH trebuie să aibă setate GatewayPorts da, AllowTcpForwarding da și PermitRootLogin da în /etc/ssh/sshd_config.", + "tunnelSettings": "Setări tunel", + "tunnelType": "Tipul de tunel" + }, + "nav": { + "portForwarding": "Redirecționare", + "tunnels": "Tuneluri" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (ascultați local)", + "localTargetHost": "127.0.0.1 (ținta pe acest computer)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (ascultă pe endpoint)", + "remoteTargetHost": "127.0.0.1 (ținta de la punctul final)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (ascultător SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} tunel(uri) client local configurat(e) pe acest desktop.", + "c2sLoadPreset": "Încărca", + "c2sNoPresetSelected": "Nicio presetare selectată", + "c2sNoPresets": "Nicio presetare salvată", + "c2sPresetDeleted": "Presetarea tunelului clientului a fost ștearsă", + "c2sPresetLoadError": "Presetările tunelului clientului nu au putut fi încărcate.", + "c2sPresetLoaded": "Presetarea tunelului clientului a fost încărcată local", + "c2sPresetName": "Nume presetat", + "c2sPresetNamePlaceholder": "Numele presetat al clientului", + "c2sPresetRenamed": "Presetarea tunelului clientului a fost redenumită", + "c2sPresetSaved": "Presetarea tunelului clientului a fost salvată", + "c2sPresetSyncNote": "Presetările sunt instantanee explicite; încărcarea uneia înlocuiește lista de tuneluri de clienți locali a acestui client desktop.", + "c2sPresetToLoad": "Presetare pentru încărcare", + "c2sTunnelPresets": "Presetări tunel client", + "c2sTunnelPresetsUnavailable": "Presetările tunelului client sunt disponibile numai în clientul desktop." + }, + "tunnels": { + "attempt": "Încercare {{current}} din {{max}}", + "autoNameClientDynamic": "ȘOSETE {{localPort}} prin {{endpoint}}", + "autoNameClientLocal": "Local {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → local {{localPort}}", + "autoStart": "Pornire automată", + "cancel": "Anula", + "canceling": "Se anulează...", + "clientAutoStartDesc": "Pornește când se deschide acest client desktop și rămâne conectat.", + "clientManualStartDesc": "Folosește Start și Stop de pe acest rând. Termix nu îl va deschide automat.", + "clientRemoteServerNote": "Redirecționarea la distanță poate necesita AllowTcpForwarding și GatewayPorts pe serverul SSH al terminalului. Portul la distanță se închide când acest desktop se deconectează.", + "clientTunnelStarted": "Tunelul clientului a fost pornit", + "clientTunnelStopped": "Tunelul clientului s-a oprit", + "clientTunnels": "Tuneluri client", + "connected": "Conectat", + "connecting": "Se conectează...", + "createFirstTunnelMessage": "Nu ați creat încă niciun tunel SSH. Configurați conexiunile la tunel în Host Manager pentru a începe.", + "currentHostPort": "Portul gazdă curent", + "destination": "Destinaţie", + "destinationAddress": "Adresă de destinație", + "destinationPort": "Port de destinație", + "disconnected": "Deconectat", + "duplicateAutoStartBind": "Doar un tunel client cu pornire automată poate utiliza {{bind}}.", + "endpointPort": "Portul punctului final", + "endpointSshHost": "Gazdă SSH pentru punct final", + "endpointSshHostPlaceholder": "Selectați o gazdă configurată", + "endpointSshHostRequired": "Selectați o gazdă SSH endpoint pentru fiecare tunel client.", + "error": "Eroare", + "forwardDescriptionClientDynamic": "ȘOSETE pe portul local {{sourcePort}}.", + "forwardDescriptionClientLocal": "Local {{sourcePort}} → la distanță {{endpointPort}}.", + "forwardDescriptionClientRemote": "La distanță {{sourcePort}} → local {{endpointPort}}.", + "forwardDescriptionServerDynamic": "ȘOSETE pe gazda curentă {{sourcePort}}.", + "forwardDescriptionServerLocal": "Gazdă curentă {{sourcePort}} → punct final {{endpointPort}}.", + "forwardDescriptionServerRemote": "Punct final {{endpointPort}} → gazdă curentă {{sourcePort}}.", + "host": "Gazdă", + "intermediateHost": "Gazdă intermediară", + "invalidBindIp": "Adresa IP locală trebuie să fie o adresă IPv4 validă.", + "invalidEndpointPort": "Portul punctului final trebuie să fie între 1 și 65535.", + "invalidLocalPort": "Portul local trebuie să fie între 1 și 65535.", + "invalidLocalTargetIp": "Adresa IP locală țintă trebuie să fie o adresă IPv4 validă.", + "invalidLocalTargetPort": "Portul țintă local trebuie să fie între 1 și 65535.", + "invalidRemoteAddress": "Este necesară adresa la distanță.", + "invalidRemotePort": "Portul la distanță trebuie să fie între 1 și 65535.", + "lastError": "Ultima eroare", + "lastStarted": "Ultima pornire", + "lastTested": "Ultima testare", + "localAddress": "Adresă locală", + "localPort": "Port local", + "localSaveError": "Nu s-au putut salva tunelurile clientului local", + "localSaved": "Tunelurile clientului au fost salvate", + "manualControlError": "Nu s-a putut actualiza starea tunelului.", + "maxRetries": "Număr maxim de reîncercări", + "mode": "Mod", + "nextRetryIn": "Următoarea reîncercare în {{seconds}} secunde", + "noClientTunnels": "Nu sunt configurate tuneluri client pe acest desktop.", + "noHostSelected": "Nicio gazdă selectată", + "noSshTunnels": "Fără tuneluri SSH", + "port": "Port", + "remoteBindAddress": "Adresă de legare la distanță", + "remoteHost": "Gazdă la distanță", + "remotePort": "Port la distanță", + "retryInterval": "Interval de reîncercare (secunde)", + "route": "Traseu:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ȘOSETE prin {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} prin {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} pe {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test", + "tunnelName": "Numele tunelului", + "tunnelTestFailed": "Testul tunelului a eșuat", + "tunnelTestSucceeded": "Testul tunelului a reușit", + "type": "Tipul de tunel", + "typeDynamic": "Dinamic (-D)", + "typeLocal": "Local (-L)", + "typeRemote": "Telecomandă (-R)", + "working": "Lucru..." + } +} diff --git a/plugins/tunnels/locales/translated/ru_RU.json b/plugins/tunnels/locales/translated/ru_RU.json new file mode 100644 index 000000000..0f2b0e30a --- /dev/null +++ b/plugins/tunnels/locales/translated/ru_RU.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Добавить туннель", + "autoStartDesc": "Автоматически подключать этот туннель при загрузке хоста", + "autoStartLabel": "Автозапуск", + "connectBtn": "Подключиться", + "disconnectBtn": "Отключиться", + "enableTunneling": "Включить туннелирование", + "enableTunnelingDesc": "Включить функциональность SSH-туннеля для этого хоста", + "endpointHost": "Целевой хост", + "endpointHostPlaceholder": "Тот же хост, SSH-хост или доступный хост/IP-адрес", + "endpointPort": "Целевой порт", + "failedToConnectTunnel": "Не удалось подключиться", + "failedToDisconnectTunnel": "Не удалось отключиться", + "maxRetries": "Макс. число попыток", + "noTunnelsConfigured": "Туннели не настроены.", + "retryIntervalS": "Интервал повтора (с)", + "serverTunnelsSection": "Серверные туннели", + "sourcePort": "Исходный порт", + "tabTunnels": "Туннели", + "tunnelConnecting": "Туннель подключается...", + "tunnelDisconnected": "Туннель отключён", + "tunnelLabel": "Туннель {{number}}", + "tunnelModeDynamicDesc": "Создать SOCKS5-прокси на локальном порту для динамического пробрасывания портов.", + "tunnelModeLocalDesc": "Пробросить локальный порт на порт удалённого сервера (или хоста, доступного с него).", + "tunnelModeRemoteDesc": "Пробросить порт на удалённом сервере на локальный порт вашей машины.", + "tunnelRequirementsText": "На SSH-сервере должны быть установлены параметры GatewayPorts yes, AllowTcpForwarding yes и PermitRootLogin yes в /etc/ssh/sshd_config.", + "tunnelSettings": "Настройки туннеля", + "tunnelType": "Тип туннеля" + }, + "nav": { + "portForwarding": "Пересылка", + "tunnels": "Туннели" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (слушать локально)", + "localTargetHost": "127.0.0.1 (цель на этом компьютере)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (прослушивание конечной точки)", + "remoteTargetHost": "127.0.0.1 (цель с конечной точки)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-слушатель)" + }, + "profile": { + "c2sCurrentLocalConfig": "На этом рабочем столе настроено {{count}} локальных клиентских туннелей.", + "c2sLoadPreset": "Загрузить", + "c2sNoPresetSelected": "Предустановка не выбрана", + "c2sNoPresets": "Нет сохраненных предустановок", + "c2sPresetDeleted": "Предустановка клиентского туннеля удалена", + "c2sPresetLoadError": "Не удалось загрузить предустановки клиентских туннелей", + "c2sPresetLoaded": "Предустановка клиентского туннеля загружена локально", + "c2sPresetName": "Имя предустановки", + "c2sPresetNamePlaceholder": "Имя клиентской предустановки", + "c2sPresetRenamed": "Предустановка клиентского туннеля переименована", + "c2sPresetSaved": "Предустановка клиентского туннеля сохранена", + "c2sPresetSyncNote": "Предустановки — это явные снимки; загрузка одной заменяет список локальных клиентских туннелей этого десктопного клиента.", + "c2sPresetToLoad": "Предустановка для загрузки", + "c2sTunnelPresets": "Предустановки клиентских туннелей", + "c2sTunnelPresetsUnavailable": "Предустановки клиентских туннелей доступны только в десктопном клиенте." + }, + "tunnels": { + "attempt": "Попытка {{current}} из {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} через {{endpoint}}", + "autoNameClientLocal": "Локальный {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → локальный {{localPort}}", + "autoStart": "Автозапуск", + "cancel": "Отмена", + "canceling": "Отмена...", + "clientAutoStartDesc": "Запускается при открытии этого клиента рабочего стола и остается подключенным.", + "clientManualStartDesc": "Используйте «Запустить» и «Остановить» в этой строке. Termix не будет запускать его автоматически.", + "clientRemoteServerNote": "Удаленная переадресация может потребовать AllowTcpForwarding и GatewayPorts на конечном SSH-сервере. Удаленный порт закрывается при отключении этого рабочего стола.", + "clientTunnelStarted": "Клиентский туннель запущен", + "clientTunnelStopped": "Клиентский туннель остановлен", + "clientTunnels": "Клиентские туннели", + "connected": "Подключено", + "connecting": "Подключение...", + "createFirstTunnelMessage": "Вы ещё не создали ни одного SSH-туннеля. Настройте туннельные соединения в Менеджере хостов, чтобы начать.", + "currentHostPort": "Порт текущего хоста", + "destination": "Назначение", + "destinationAddress": "Адрес назначения", + "destinationPort": "Порт назначения", + "disconnected": "Отключено", + "duplicateAutoStartBind": "Только один клиентский туннель с автозапуском может использовать {{bind}}.", + "endpointPort": "Порт конечной точки", + "endpointSshHost": "Хост SSH конечной точки", + "endpointSshHostPlaceholder": "Выберите настроенный хост", + "endpointSshHostRequired": "Выберите хост SSH конечной точки для каждого клиентского туннеля.", + "error": "Ошибка", + "forwardDescriptionClientDynamic": "SOCKS на локальном порту {{sourcePort}}.", + "forwardDescriptionClientLocal": "Локальный {{sourcePort}} → удалённый {{endpointPort}}.", + "forwardDescriptionClientRemote": "Удалённый {{sourcePort}} → локальный {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS на текущем хосте {{sourcePort}}.", + "forwardDescriptionServerLocal": "Текущий хост {{sourcePort}} → конечная точка {{endpointPort}}.", + "forwardDescriptionServerRemote": "Конечная точка {{endpointPort}} → текущий хост {{sourcePort}}.", + "host": "Хост", + "intermediateHost": "Промежуточный хост", + "invalidBindIp": "Локальный IP-адрес должен быть действительным адресом IPv4.", + "invalidEndpointPort": "Порт конечной точки должен быть в диапазоне от 1 до 65535.", + "invalidLocalPort": "Локальный порт должен быть в диапазоне от 1 до 65535.", + "invalidLocalTargetIp": "Локальный целевой IP-адрес должен быть действительным адресом IPv4.", + "invalidLocalTargetPort": "Локальный целевой порт должен быть в диапазоне от 1 до 65535.", + "invalidRemoteAddress": "Требуется удаленный адрес.", + "invalidRemotePort": "Удаленный порт должен быть в диапазоне от 1 до 65535.", + "lastError": "Последняя ошибка", + "lastStarted": "Последний запуск", + "lastTested": "Последняя проверка", + "localAddress": "Местный адрес", + "localPort": "Локальный порт", + "localSaveError": "Не удалось сохранить локальные клиентские туннели", + "localSaved": "Клиентские туннели сохранены", + "manualControlError": "Не удалось обновить состояние туннеля.", + "maxRetries": "Макс. попыток", + "mode": "Режим", + "nextRetryIn": "Следующая попытка через {{seconds}} сек.", + "noClientTunnels": "На этом рабочем столе не настроено ни одного клиентского туннеля.", + "noHostSelected": "Хост не выбран", + "noSshTunnels": "Нет SSH-туннелей", + "port": "Порт", + "remoteBindAddress": "Удаленный адрес привязки", + "remoteHost": "Удаленный хост", + "remotePort": "Удаленный порт", + "retryInterval": "Интервал повтора (секунд)", + "route": "Маршрут:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS через {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} через {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} на {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Проверить", + "tunnelName": "Имя туннеля", + "tunnelTestFailed": "Проверка туннеля не удалась", + "tunnelTestSucceeded": "Проверка туннеля успешна", + "type": "Тип туннеля", + "typeDynamic": "Динамический (-D)", + "typeLocal": "Локальный (-L)", + "typeRemote": "Удалённый (-R)", + "working": "Выполняется..." + } +} diff --git a/plugins/tunnels/locales/translated/sr_SP.json b/plugins/tunnels/locales/translated/sr_SP.json new file mode 100644 index 000000000..d64e08b69 --- /dev/null +++ b/plugins/tunnels/locales/translated/sr_SP.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Додај тунел", + "autoStartDesc": "Аутоматски повежи овај тунел када се хост учита", + "autoStartLabel": "Аутоматско покретање", + "connectBtn": "Повежи се", + "disconnectBtn": "Прекини везу", + "enableTunneling": "Омогући тунелирање", + "enableTunnelingDesc": "Омогући функционалност SSH тунела за овај хост", + "endpointHost": "Крајњи хост", + "endpointHostPlaceholder": "Исти хост, SSH хост или доступни хост/IP адреса", + "endpointPort": "Порт крајње тачке", + "failedToConnectTunnel": "Повезивање није успело", + "failedToDisconnectTunnel": "Прекид везе није успео", + "maxRetries": "Максималан број поновних покушаја", + "noTunnelsConfigured": "Није конфигурисан ниједан тунел.", + "retryIntervalS": "Интервал поновног покушаја (s)", + "serverTunnelsSection": "Серверски тунели", + "sourcePort": "Изворни порт", + "tabTunnels": "Тунели", + "tunnelConnecting": "Тунел који се повезује...", + "tunnelDisconnected": "Тунел је искључен", + "tunnelLabel": "Тунел {{number}}", + "tunnelModeDynamicDesc": "Направите SOCKS5 прокси на локалном порту за динамичко прослеђивање портова.", + "tunnelModeLocalDesc": "Прослеђује локални порт на порт на удаљеном серверу (или хосту који је доступан са њега).", + "tunnelModeRemoteDesc": "Проследите порт на удаљеном серверу назад на локални порт на вашој машини.", + "tunnelRequirementsText": "SSH сервер мора имати подешена подешавања за GatewayPorts, AllowTcpForwarding и PermitRootLogin у /etc/ssh/sshd_config.", + "tunnelSettings": "Подешавања тунела", + "tunnelType": "Тип тунела" + }, + "nav": { + "portForwarding": "Преусмеравање", + "tunnels": "Тунели" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (слушај локално)", + "localTargetHost": "127.0.0.1 (циљ на овом рачунару)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (слушање на крајњој тачки)", + "remoteTargetHost": "127.0.0.1 (циљ са крајње тачке)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS слушалац)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} локалних клијентских тунела конфигурисаних на овој радној површини.", + "c2sLoadPreset": "Учитај", + "c2sNoPresetSelected": "Није изабран ниједан унапред подешени подешавања", + "c2sNoPresets": "Нема сачуваних предефинисаних подешавања", + "c2sPresetDeleted": "Унапред подешено подешавање тунела клијента је избрисано", + "c2sPresetLoadError": "Није успело учитавање унапред подешених подешавања клијентског тунела", + "c2sPresetLoaded": "Унапред унапред учитан тунел клијента", + "c2sPresetName": "Име пресета", + "c2sPresetNamePlaceholder": "Назив унапред подешеног подешавања клијента", + "c2sPresetRenamed": "Преименован је унапред одређен тунел клијента", + "c2sPresetSaved": "Унапред подешено подешавање тунела клијента је сачувано", + "c2sPresetSyncNote": "Унапред подешена подешавања су експлицитни снимци; учитавање једног замењује листу локалних тунела клијената овог десктоп клијента.", + "c2sPresetToLoad": "Унапред подешено за учитавање", + "c2sTunnelPresets": "Унапред подешена подешавања клијентског тунела", + "c2sTunnelPresetsUnavailable": "Унапред подешена подешавања тунела клијента доступна су само у десктоп клијенту." + }, + "tunnels": { + "attempt": "Покушај {{current}} од {{max}}", + "autoNameClientDynamic": "ЧАРАПЕ {{localPort}} преко {{endpoint}}", + "autoNameClientLocal": "Локално {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → локално {{localPort}}", + "autoStart": "Аутоматски старт", + "cancel": "Откажи", + "canceling": "Отказивање...", + "clientAutoStartDesc": "Покреће се када се овај десктоп клијент отвори и остане повезан.", + "clientManualStartDesc": "Користите опције „Старт“ и „Стоп“ из овог реда. Termix га неће аутоматски отворити.", + "clientRemoteServerNote": "Даљинско преусмеравање може захтевати AllowTcpForwarding и GatewayPorts на SSH серверу крајње тачке. Удаљени порт се затвара када се ова радна површина искључи.", + "clientTunnelStarted": "Тунел клијента је покренут", + "clientTunnelStopped": "Тунел клијента је заустављен", + "clientTunnels": "Клијентски тунели", + "connected": "Повезано", + "connecting": "Повезивање...", + "createFirstTunnelMessage": "Још увек нисте креирали ниједан SSH тунел. Конфигуришите тунелске везе у Host Manager-у да бисте започели.", + "currentHostPort": "Тренутни порт хоста", + "destination": "Одредиште", + "destinationAddress": "Адреса одредишта", + "destinationPort": "Одредишна лука", + "disconnected": "Искључено", + "duplicateAutoStartBind": "Само један аутоматски покренути клијентски тунел може да користи {{bind}}.", + "endpointPort": "Порт крајње тачке", + "endpointSshHost": "SSH хост крајње тачке", + "endpointSshHostPlaceholder": "Изаберите конфигурисани хост", + "endpointSshHostRequired": "Изаберите SSH хост крајње тачке за сваки клијентски тунел.", + "error": "Грешка", + "forwardDescriptionClientDynamic": "SOCKS на локалном порту {{sourcePort}}.", + "forwardDescriptionClientLocal": "Локално {{sourcePort}} → удаљено {{endpointPort}}.", + "forwardDescriptionClientRemote": "Удаљено {{sourcePort}} → локално {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS на тренутном хосту {{sourcePort}}.", + "forwardDescriptionServerLocal": "Тренутни хост {{sourcePort}} → крајња тачка {{endpointPort}}.", + "forwardDescriptionServerRemote": "Крајња тачка {{endpointPort}} → тренутни хост {{sourcePort}}.", + "host": "Домаћин", + "intermediateHost": "Посредни домаћин", + "invalidBindIp": "Локална IP адреса мора бити важећа IPv4 адреса.", + "invalidEndpointPort": "Порт крајње тачке мора бити између 1 и 65535.", + "invalidLocalPort": "Локални порт мора бити између 1 и 65535.", + "invalidLocalTargetIp": "Локална циљна IP адреса мора бити важећа IPv4 адреса.", + "invalidLocalTargetPort": "Локални циљни порт мора бити између 1 и 65535.", + "invalidRemoteAddress": "Удаљена адреса је обавезна.", + "invalidRemotePort": "Удаљени порт мора бити између 1 и 65535.", + "lastError": "Последња грешка", + "lastStarted": "Последњи пут започет", + "lastTested": "Последње тестирање", + "localAddress": "Локална адреса", + "localPort": "Локални порт", + "localSaveError": "Чување локалних клијентских тунела није успело", + "localSaved": "Тунели клијента сачувани", + "manualControlError": "Ажурирање стања тунела није успело.", + "maxRetries": "Максималан број поновних покушаја", + "mode": "Режим", + "nextRetryIn": "Следећи поновни покушај за {{seconds}} секунди", + "noClientTunnels": "Ниједан клијентски тунел није конфигурисан на овој радној површини.", + "noHostSelected": "Није изабран домаћин", + "noSshTunnels": "Нема SSH тунела", + "port": "Лука", + "remoteBindAddress": "Адреса за удаљено повезивање", + "remoteHost": "Удаљени хост", + "remotePort": "Удаљени порт", + "retryInterval": "Интервал поновног покушаја (секунде)", + "route": "Рута:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ЧАРАПЕ преко {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} преко {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} на {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Тест", + "tunnelName": "Назив тунела", + "tunnelTestFailed": "Тест тунела није успео", + "tunnelTestSucceeded": "Тест тунела је успешан", + "type": "Тип тунела", + "typeDynamic": "Динамички (-Д)", + "typeLocal": "Локално (-Л)", + "typeRemote": "Даљински (-R)", + "working": "Ради се..." + } +} diff --git a/plugins/tunnels/locales/translated/sv_SE.json b/plugins/tunnels/locales/translated/sv_SE.json new file mode 100644 index 000000000..b315cf508 --- /dev/null +++ b/plugins/tunnels/locales/translated/sv_SE.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Lägg till tunnel", + "autoStartDesc": "Anslut automatiskt den här tunneln när värden laddas", + "autoStartLabel": "Autostart", + "connectBtn": "Ansluta", + "disconnectBtn": "Koppla från", + "enableTunneling": "Aktivera tunnelering", + "enableTunnelingDesc": "Aktivera SSH-tunnelfunktionalitet för den här värden", + "endpointHost": "Slutpunktsvärd", + "endpointHostPlaceholder": "Samma värd, SSH-värd eller nåbar värd/IP", + "endpointPort": "Slutpunktsport", + "failedToConnectTunnel": "Misslyckades med att ansluta", + "failedToDisconnectTunnel": "Misslyckades med att koppla från", + "maxRetries": "Max antal återförsök", + "noTunnelsConfigured": "Inga tunnlar konfigurerade.", + "retryIntervalS": "Intervall för återförsök (s)", + "serverTunnelsSection": "Servertunnlar", + "sourcePort": "Källport", + "tabTunnels": "Tunnlar", + "tunnelConnecting": "Tunnelförbindelse...", + "tunnelDisconnected": "Tunneln frånkopplad", + "tunnelLabel": "Tunnel {{number}}", + "tunnelModeDynamicDesc": "Skapa en SOCKS5-proxy på en lokal port för dynamisk portvidarebefordran.", + "tunnelModeLocalDesc": "Vidarebefordra en lokal port till en port på fjärrservern (eller en värd som är nåbar från den).", + "tunnelModeRemoteDesc": "Vidarebefordra en port på fjärrservern tillbaka till en lokal port på din maskin.", + "tunnelRequirementsText": "SSH-servern måste ha GatewayPorts ja, AllowTcpForwarding ja och PermitRootLogin ja angivna i /etc/ssh/sshd_config.", + "tunnelSettings": "Tunnelinställningar", + "tunnelType": "Tunneltyp" + }, + "nav": { + "portForwarding": "Spedition", + "tunnels": "Tunnlar" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lyssna lokalt)", + "localTargetHost": "127.0.0.1 (mål på den här datorn)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (lyssna på slutpunkten)", + "remoteTargetHost": "127.0.0.1 (mål från slutpunkt)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS-lyssnare)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} lokala klienttunnlar konfigurerade på den här skrivbordet.", + "c2sLoadPreset": "Ladda", + "c2sNoPresetSelected": "Ingen förinställning vald", + "c2sNoPresets": "Inga förinställningar sparade", + "c2sPresetDeleted": "Förinställningen för klienttunneln har raderats", + "c2sPresetLoadError": "Misslyckades med att läsa in förinställningar för klienttunneln", + "c2sPresetLoaded": "Förinställningen för klienttunnel laddas lokalt", + "c2sPresetName": "Förinställt namn", + "c2sPresetNamePlaceholder": "Klientförinställningsnamn", + "c2sPresetRenamed": "Förinställningen för klienttunneln har bytt namn", + "c2sPresetSaved": "Förinställningen för klienttunneln sparad", + "c2sPresetSyncNote": "Förinställningar är explicita ögonblicksbilder; om en sådan läses in ersätts den här skrivbordsklientens lokala klienttunnellista.", + "c2sPresetToLoad": "Förinställning att ladda", + "c2sTunnelPresets": "Förinställningar för klienttunnel", + "c2sTunnelPresetsUnavailable": "Förinställningar för klienttunneln är endast tillgängliga i skrivbordsklienten." + }, + "tunnels": { + "attempt": "Försök {{current}} av {{max}}", + "autoNameClientDynamic": "STRUMPOCKOR {{localPort}} via {{endpoint}}", + "autoNameClientLocal": "Lokal {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → lokal {{localPort}}", + "autoStart": "Automatisk start", + "cancel": "Avboka", + "canceling": "Inställande...", + "clientAutoStartDesc": "Startar när den här skrivbordsklienten öppnas och förblir ansluten.", + "clientManualStartDesc": "Använd Start och Stopp från den här raden. Termix öppnar den inte automatiskt.", + "clientRemoteServerNote": "Fjärrvidarebefordran kan kräva AllowTcpForwarding och GatewayPorts på slutpunktens SSH-server. Fjärrporten stängs när den här skrivbordsmiljön kopplas bort.", + "clientTunnelStarted": "Klienttunneln har startats", + "clientTunnelStopped": "Klienttunneln stoppad", + "clientTunnels": "Klienttunnlar", + "connected": "Ansluten", + "connecting": "Ansluter...", + "createFirstTunnelMessage": "Du har inte skapat några SSH-tunnlar än. Konfigurera tunnelanslutningar i Host Manager för att komma igång.", + "currentHostPort": "Nuvarande värdport", + "destination": "Destination", + "destinationAddress": "Destinationsadress", + "destinationPort": "Destinationshamn", + "disconnected": "Osammanhängande", + "duplicateAutoStartBind": "Endast en automatiskt startad klienttunnel kan använda {{bind}}.", + "endpointPort": "Slutpunktsport", + "endpointSshHost": "Slutpunkts-SSH-värd", + "endpointSshHostPlaceholder": "Välj en konfigurerad värd", + "endpointSshHostRequired": "Välj en SSH-värd för slutpunkten för varje klienttunnel.", + "error": "Fel", + "forwardDescriptionClientDynamic": "SOCKS på lokal port {{sourcePort}}.", + "forwardDescriptionClientLocal": "Lokal {{sourcePort}} → fjärrkontroll {{endpointPort}}.", + "forwardDescriptionClientRemote": "Fjärrstyrd {{sourcePort}} → lokal {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS på nuvarande värd {{sourcePort}}.", + "forwardDescriptionServerLocal": "Nuvarande värd {{sourcePort}} → slutpunkt {{endpointPort}}.", + "forwardDescriptionServerRemote": "Slutpunkt {{endpointPort}} → aktuell värd {{sourcePort}}.", + "host": "Värd", + "intermediateHost": "Mellanvärd", + "invalidBindIp": "Lokal IP-adress måste vara en giltig IPv4-adress.", + "invalidEndpointPort": "Slutpunktsporten måste vara mellan 1 och 65535.", + "invalidLocalPort": "Den lokala porten måste vara mellan 1 och 65535.", + "invalidLocalTargetIp": "Den lokala mål-IP-adressen måste vara en giltig IPv4-adress.", + "invalidLocalTargetPort": "Den lokala målporten måste vara mellan 1 och 65535.", + "invalidRemoteAddress": "Fjärradress krävs.", + "invalidRemotePort": "Fjärrporten måste vara mellan 1 och 65535.", + "lastError": "Senaste felet", + "lastStarted": "Senast startade", + "lastTested": "Senast testad", + "localAddress": "Lokal adress", + "localPort": "Lokal hamn", + "localSaveError": "Misslyckades med att spara lokala klienttunnlar", + "localSaved": "Klienttunnlar sparade", + "manualControlError": "Misslyckades med att uppdatera tunnelns tillstånd.", + "maxRetries": "Max antal återförsök", + "mode": "Läge", + "nextRetryIn": "Nästa försök om {{seconds}} sekunder", + "noClientTunnels": "Inga klienttunnlar konfigurerade på den här skrivbordet.", + "noHostSelected": "Ingen värd vald", + "noSshTunnels": "Inga SSH-tunnlar", + "port": "Hamn", + "remoteBindAddress": "Fjärrbindningsadress", + "remoteHost": "Fjärrvärd", + "remotePort": "Fjärrport", + "retryInterval": "Intervall för återförsök (sekunder)", + "route": "Rutt:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS via {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} på {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Testa", + "tunnelName": "Tunnelnamn", + "tunnelTestFailed": "Tunneltestet misslyckades", + "tunnelTestSucceeded": "Tunneltestet lyckades", + "type": "Tunneltyp", + "typeDynamic": "Dynamisk (-D)", + "typeLocal": "Lokal (-L)", + "typeRemote": "Fjärrkontroll (-R)", + "working": "Arbetssätt..." + } +} diff --git a/plugins/tunnels/locales/translated/th_TH.json b/plugins/tunnels/locales/translated/th_TH.json new file mode 100644 index 000000000..4e916ce40 --- /dev/null +++ b/plugins/tunnels/locales/translated/th_TH.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "เพิ่มอุโมงค์", + "autoStartDesc": "เชื่อมต่ออุโมงค์นี้โดยอัตโนมัติเมื่อโหลดโฮสต์เสร็จ", + "autoStartLabel": "เริ่มอัตโนมัติ", + "connectBtn": "เชื่อมต่อ", + "disconnectBtn": "ตัดการเชื่อมต่อ", + "enableTunneling": "เปิดใช้งานการสร้างอุโมงค์", + "enableTunnelingDesc": "เปิดใช้งานฟังก์ชันอุโมงค์ SSH สำหรับโฮสต์นี้", + "endpointHost": "โฮสต์ปลายทาง", + "endpointHostPlaceholder": "โฮสต์เดียวกัน โฮสต์ SSH หรือโฮสต์/IP ที่สามารถเข้าถึงได้", + "endpointPort": "พอร์ตปลายทาง", + "failedToConnectTunnel": "ไม่สามารถเชื่อมต่อได้", + "failedToDisconnectTunnel": "ไม่สามารถตัดการเชื่อมต่อได้", + "maxRetries": "จำนวนครั้งการลองใหม่สูงสุด", + "noTunnelsConfigured": "ไม่มีการกำหนดค่าอุโมงค์ใดๆ", + "retryIntervalS": "ช่วงเวลาการลองใหม่ (วินาที)", + "serverTunnelsSection": "อุโมงค์เซิร์ฟเวอร์", + "sourcePort": "พอร์ตต้นทาง", + "tabTunnels": "อุโมงค์", + "tunnelConnecting": "อุโมงค์เชื่อมต่อ...", + "tunnelDisconnected": "อุโมงค์ถูกตัดการเชื่อมต่อ", + "tunnelLabel": "อุโมงค์ {{number}}", + "tunnelModeDynamicDesc": "สร้างพร็อกซี SOCKS5 บนพอร์ตภายในเครื่องเพื่อใช้ในการส่งต่อพอร์ตแบบไดนามิก", + "tunnelModeLocalDesc": "ส่งต่อพอร์ตภายในเครื่องไปยังพอร์ตบนเซิร์ฟเวอร์ระยะไกล (หรือโฮสต์ที่สามารถเข้าถึงได้จากเซิร์ฟเวอร์นั้น)", + "tunnelModeRemoteDesc": "ส่งต่อพอร์ตบนเซิร์ฟเวอร์ระยะไกลกลับมายังพอร์ตภายในเครื่องของคุณ", + "tunnelRequirementsText": "เซิร์ฟเวอร์ SSH ต้องตั้งค่า GatewayPorts yes, AllowTcpForwarding yes และ PermitRootLogin yes ในไฟล์ /etc/ssh/sshd_config", + "tunnelSettings": "การตั้งค่าอุโมงค์", + "tunnelType": "ประเภทอุโมงค์" + }, + "nav": { + "portForwarding": "การส่งต่อ", + "tunnels": "อุโมงค์" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (ฟังในพื้นที่ของคุณ)", + "localTargetHost": "127.0.0.1 (เป้าหมายบนคอมพิวเตอร์เครื่องนี้)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (รับฟังที่ปลายทาง)", + "remoteTargetHost": "127.0.0.1 (เป้าหมายจากปลายทาง)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (ผู้ฟัง SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} อุโมงค์ไคลเอ็นต์ภายในเครื่องที่กำหนดค่าไว้บนเดสก์ท็อปนี้", + "c2sLoadPreset": "โหลด", + "c2sNoPresetSelected": "ไม่ได้เลือกค่าที่ตั้งไว้ล่วงหน้า", + "c2sNoPresets": "ไม่มีการบันทึกค่าที่ตั้งไว้ล่วงหน้า", + "c2sPresetDeleted": "ลบการตั้งค่าล่วงหน้าของอุโมงค์ไคลเอ็นต์แล้ว", + "c2sPresetLoadError": "ไม่สามารถโหลดค่าที่ตั้งไว้ล่วงหน้าของอุโมงค์ไคลเอ็นต์ได้", + "c2sPresetLoaded": "โหลดค่าที่ตั้งไว้ล่วงหน้าของอุโมงค์ไคลเอ็นต์ในเครื่องแล้ว", + "c2sPresetName": "ชื่อพรีเซ็ต", + "c2sPresetNamePlaceholder": "ชื่อการตั้งค่าล่วงหน้าของลูกค้า", + "c2sPresetRenamed": "เปลี่ยนชื่อพรีเซ็ตอุโมงค์ไคลเอ็นต์แล้ว", + "c2sPresetSaved": "บันทึกการตั้งค่าอุโมงค์ไคลเอ็นต์ไว้แล้ว", + "c2sPresetSyncNote": "ค่าที่ตั้งไว้ล่วงหน้าเป็นภาพรวมที่ถูกกำหนดไว้อย่างชัดเจน การโหลดค่าใดค่าหนึ่งจะแทนที่รายการอุโมงค์ไคลเอ็นต์ในเครื่องของไคลเอ็นต์เดสก์ท็อปนี้", + "c2sPresetToLoad": "ตั้งค่าล่วงหน้าเพื่อโหลด", + "c2sTunnelPresets": "ค่าที่ตั้งไว้ล่วงหน้าสำหรับอุโมงค์ไคลเอ็นต์", + "c2sTunnelPresetsUnavailable": "การตั้งค่าล่วงหน้าสำหรับอุโมงค์ไคลเอ็นต์มีให้ใช้งานเฉพาะในไคลเอ็นต์เดสก์ท็อปเท่านั้น" + }, + "tunnels": { + "attempt": "ความพยายาม {{current}} ของ {{max}}", + "autoNameClientDynamic": "ถุงเท้า {{localPort}} ผ่าน {{endpoint}}", + "autoNameClientLocal": "โลคอล {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → โลคอล {{localPort}}", + "autoStart": "เริ่มอัตโนมัติ", + "cancel": "ยกเลิก", + "canceling": "ยกเลิก...", + "clientAutoStartDesc": "เริ่มทำงานเมื่อโปรแกรมไคลเอ็นต์บนเดสก์ท็อปนี้เปิดขึ้นและเชื่อมต่ออยู่ตลอดเวลา", + "clientManualStartDesc": "ใช้ปุ่ม Start และ Stop จากแถวนี้ Termix จะไม่เปิดไฟล์นี้โดยอัตโนมัติ", + "clientRemoteServerNote": "การส่งต่อพอร์ตระยะไกลอาจต้องใช้การตั้งค่า AllowTcpForwarding และ GatewayPorts บนเซิร์ฟเวอร์ SSH ปลายทาง พอร์ตระยะไกลจะปิดลงเมื่อเดสก์ท็อปนี้ตัดการเชื่อมต่อ", + "clientTunnelStarted": "อุโมงค์ไคลเอ็นต์เริ่มต้นแล้ว", + "clientTunnelStopped": "อุโมงค์ไคลเอ็นต์หยุดทำงานแล้ว", + "clientTunnels": "อุโมงค์ไคลเอ็นต์", + "connected": "เชื่อมต่อแล้ว", + "connecting": "กำลังเชื่อมต่อ...", + "createFirstTunnelMessage": "คุณยังไม่ได้สร้างอุโมงค์ SSH ใดๆ เลย กำหนดค่าการเชื่อมต่ออุโมงค์ใน Host Manager เพื่อเริ่มต้นใช้งาน", + "currentHostPort": "พอร์ตโฮสต์ปัจจุบัน", + "destination": "ปลายทาง", + "destinationAddress": "ที่อยู่ปลายทาง", + "destinationPort": "ท่าเรือปลายทาง", + "disconnected": "ตัดการเชื่อมต่อ", + "duplicateAutoStartBind": "อุโมงค์ไคลเอ็นต์ที่เริ่มต้นอัตโนมัติเพียงหนึ่งเดียวเท่านั้นที่สามารถใช้ {{bind}} ได้", + "endpointPort": "พอร์ตปลายทาง", + "endpointSshHost": "โฮสต์ SSH ปลายทาง", + "endpointSshHostPlaceholder": "เลือกโฮสต์ที่กำหนดค่าไว้", + "endpointSshHostRequired": "เลือกโฮสต์ SSH ปลายทางสำหรับแต่ละอุโมงค์ไคลเอ็นต์", + "error": "ข้อผิดพลาด", + "forwardDescriptionClientDynamic": "SOCKS บนพอร์ตท้องถิ่น {{sourcePort}}", + "forwardDescriptionClientLocal": "เครื่องโลคอล {{sourcePort}} → รีโมท {{endpointPort}}", + "forwardDescriptionClientRemote": "รีโมท {{sourcePort}} → โลคอล {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS บนโฮสต์ปัจจุบัน {{sourcePort}}.", + "forwardDescriptionServerLocal": "โฮสต์ปัจจุบัน {{sourcePort}} → ปลายทาง {{endpointPort}}", + "forwardDescriptionServerRemote": "ปลายทาง {{endpointPort}} → โฮสต์ปัจจุบัน {{sourcePort}}", + "host": "เจ้าภาพ", + "intermediateHost": "โฮสต์ตัวกลาง", + "invalidBindIp": "ที่อยู่ IP ภายในเครื่องต้องเป็นที่อยู่ IPv4 ที่ถูกต้อง", + "invalidEndpointPort": "พอร์ตปลายทางต้องอยู่ระหว่าง 1 ถึง 65535", + "invalidLocalPort": "หมายเลขพอร์ตท้องถิ่นต้องอยู่ระหว่าง 1 ถึง 65535", + "invalidLocalTargetIp": "ที่อยู่ IP เป้าหมายในเครือข่ายท้องถิ่นต้องเป็นที่อยู่ IPv4 ที่ถูกต้อง", + "invalidLocalTargetPort": "พอร์ตเป้าหมายในเครื่องต้องอยู่ระหว่าง 1 ถึง 65535", + "invalidRemoteAddress": "ต้องระบุที่อยู่เครือข่ายระยะไกล", + "invalidRemotePort": "พอร์ตระยะไกลต้องอยู่ระหว่าง 1 ถึง 65535", + "lastError": "ข้อผิดพลาดล่าสุด", + "lastStarted": "เริ่มครั้งล่าสุด", + "lastTested": "ทดสอบครั้งล่าสุด", + "localAddress": "ที่อยู่ท้องถิ่น", + "localPort": "ท่าเรือท้องถิ่น", + "localSaveError": "ไม่สามารถบันทึกอุโมงค์ไคลเอ็นต์ในพื้นที่ได้", + "localSaved": "บันทึกอุโมงค์ไคลเอ็นต์แล้ว", + "manualControlError": "ไม่สามารถอัปเดตสถานะอุโมงค์ได้", + "maxRetries": "จำนวนครั้งการลองใหม่สูงสุด", + "mode": "โหมด", + "nextRetryIn": "ลองใหม่อีกครั้งใน {{seconds}} วินาที", + "noClientTunnels": "ไม่มีการกำหนดค่าอุโมงค์ไคลเอ็นต์บนเดสก์ท็อปนี้", + "noHostSelected": "ไม่ได้เลือกโฮสต์", + "noSshTunnels": "ไม่มีอุโมงค์ SSH", + "port": "ท่าเรือ", + "remoteBindAddress": "ที่อยู่การเชื่อมต่อระยะไกล", + "remoteHost": "โฮสต์ระยะไกล", + "remotePort": "พอร์ตระยะไกล", + "retryInterval": "ช่วงเวลาการลองใหม่ (วินาที)", + "route": "เส้นทาง:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ถุงเท้า ผ่านทาง {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} ผ่าน {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} บน {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "ทดสอบ", + "tunnelName": "ชื่ออุโมงค์", + "tunnelTestFailed": "การทดสอบอุโมงค์ล้มเหลว", + "tunnelTestSucceeded": "การทดสอบอุโมงค์ประสบความสำเร็จ", + "type": "ประเภทอุโมงค์", + "typeDynamic": "ไดนามิก (-D)", + "typeLocal": "ท้องถิ่น (-L)", + "typeRemote": "รีโมท (-R)", + "working": "การทำงาน..." + } +} diff --git a/plugins/tunnels/locales/translated/tr_TR.json b/plugins/tunnels/locales/translated/tr_TR.json new file mode 100644 index 000000000..853496539 --- /dev/null +++ b/plugins/tunnels/locales/translated/tr_TR.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Tünel Ekle", + "autoStartDesc": "Ana bilgisayar yüklendiğinde bu tüneli otomatik olarak bağla", + "autoStartLabel": "Otomatik başlat", + "connectBtn": "Bağlan", + "disconnectBtn": "Bağlantıyı Kes", + "enableTunneling": "Tünellemeyi Etkinleştir", + "enableTunnelingDesc": "Bu ana bilgisayar için SSH tünel işlevselliğini etkinleştir", + "endpointHost": "Hedef Ana Bilgisayar", + "endpointHostPlaceholder": "Aynı ana bilgisayar, SSH ana bilgisayarı veya erişilebilir ana bilgisayar/IP", + "endpointPort": "Hedef Port", + "failedToConnectTunnel": "Bağlantı başarısız oldu", + "failedToDisconnectTunnel": "Bağlantı kesme başarısız oldu", + "maxRetries": "Maksimum Yeniden Deneme", + "noTunnelsConfigured": "Yapılandırılmış tünel yok.", + "retryIntervalS": "Yeniden Deneme Aralığı (sn)", + "serverTunnelsSection": "Sunucu Tünelleri", + "sourcePort": "Kaynak Port", + "tabTunnels": "Tüneller", + "tunnelConnecting": "Tünel bağlanıyor...", + "tunnelDisconnected": "Tünel bağlantısı kesildi", + "tunnelLabel": "Tünel {{number}}", + "tunnelModeDynamicDesc": "Dinamik port yönlendirme için yerel bir portta bir SOCKS5 proxy oluşturun.", + "tunnelModeLocalDesc": "Yerel bir portu uzak sunucudaki bir porta (veya ondan erişilebilen bir sunucuya) yönlendirin.", + "tunnelModeRemoteDesc": "Uzak sunucudaki bir portu, makinenizdeki yerel bir porta geri yönlendirin.", + "tunnelRequirementsText": "SSH sunucusunda /etc/ssh/sshd_config dosyasında GatewayPorts yes, AllowTcpForwarding yes ve PermitRootLogin yes ayarlanmış olmalıdır.", + "tunnelSettings": "Tünel Ayarları", + "tunnelType": "Tünel Türü" + }, + "nav": { + "portForwarding": "İletme", + "tunnels": "Tüneller" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (yerel olarak dinle)", + "localTargetHost": "127.0.0.1 (bu bilgisayardaki hedef)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (uç noktada dinleme)", + "remoteTargetHost": "127.0.0.1 (uç noktadan hedef)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (SOCKS dinleyici)" + }, + "profile": { + "c2sCurrentLocalConfig": "Bu masaüstünde yapılandırılmış {{count}} yerel istemci tüneli.", + "c2sLoadPreset": "Yükle", + "c2sNoPresetSelected": "Ön ayar seçilmedi", + "c2sNoPresets": "Kayıtlı ön ayar yok", + "c2sPresetDeleted": "İstemci tünel ön ayarı silindi", + "c2sPresetLoadError": "İstemci tünel ön ayarları yüklenemedi", + "c2sPresetLoaded": "İstemci tünel ön ayarı yerel olarak yüklendi", + "c2sPresetName": "Ön Ayar Adı", + "c2sPresetNamePlaceholder": "İstemci ön ayar adı", + "c2sPresetRenamed": "İstemci tünel ön ayarı yeniden adlandırıldı", + "c2sPresetSaved": "İstemci tünel ön ayarı kaydedildi", + "c2sPresetSyncNote": "Ön ayarlar belirli anlık görüntülerdir; birini yüklemek, bu masaüstü istemcinin yerel istemci tünel listesini değiştirir.", + "c2sPresetToLoad": "Yüklenecek Ön Ayar", + "c2sTunnelPresets": "İstemci Tünel Ön Ayarları", + "c2sTunnelPresetsUnavailable": "İstemci tünel ön ayarları yalnızca masaüstü istemcisinde kullanılabilir." + }, + "tunnels": { + "attempt": "Deneme {{current}}/{{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} üzerinden {{endpoint}}", + "autoNameClientLocal": "Yerel {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → yerel {{localPort}}", + "autoStart": "Otomatik Başlat", + "cancel": "İptal", + "canceling": "İptal ediliyor...", + "clientAutoStartDesc": "Bu masaüstü istemcisi açıldığında başlar ve bağlı kalır.", + "clientManualStartDesc": "Bu satırdaki Başlat ve Durdur'u kullanın. Termix otomatik olarak açmaz.", + "clientRemoteServerNote": "Uzak yönlendirme, uç nokta SSH sunucusunda AllowTcpForwarding ve GatewayPorts gerektirebilir. Bu masaüstü bağlantısı kesildiğinde uzak port kapanır.", + "clientTunnelStarted": "İstemci tüneli başlatıldı", + "clientTunnelStopped": "İstemci tüneli durduruldu", + "clientTunnels": "İstemci Tünelleri", + "connected": "Bağlı", + "connecting": "Bağlanıyor...", + "createFirstTunnelMessage": "Henüz hiç SSH tüneli oluşturmadınız. Başlamak için Ana Bilgisayar Yöneticisi'nde tünel bağlantılarını yapılandırın.", + "currentHostPort": "Geçerli Sunucu Portu", + "destination": "Hedef", + "destinationAddress": "Hedef Adresi", + "destinationPort": "Varış Limanı", + "disconnected": "Bağlantı kesildi", + "duplicateAutoStartBind": "Yalnızca bir otomatik başlatmalı istemci tüneli {{bind}} kullanabilir.", + "endpointPort": "Uç Nokta Portu", + "endpointSshHost": "Uç Nokta SSH Sunucusu", + "endpointSshHostPlaceholder": "Yapılandırılmış bir sunucu seçin", + "endpointSshHostRequired": "Her istemci tüneli için bir uç nokta SSH sunucusu seçin.", + "error": "Hata", + "forwardDescriptionClientDynamic": "Yerel port {{sourcePort}} üzerinde SOCKS.", + "forwardDescriptionClientLocal": "Yerel {{sourcePort}} → uzak {{endpointPort}}.", + "forwardDescriptionClientRemote": "Uzak {{sourcePort}} → yerel {{endpointPort}}.", + "forwardDescriptionServerDynamic": "Geçerli sunucuda SOCKS {{sourcePort}}.", + "forwardDescriptionServerLocal": "Geçerli sunucu {{sourcePort}} → uç nokta {{endpointPort}}.", + "forwardDescriptionServerRemote": "Uç nokta {{endpointPort}} → geçerli sunucu {{sourcePort}}.", + "host": "Host", + "intermediateHost": "Ara Ev Sahibi", + "invalidBindIp": "Yerel IP geçerli bir IPv4 adresi olmalıdır.", + "invalidEndpointPort": "Uç nokta portu 1 ile 65535 arasında olmalıdır.", + "invalidLocalPort": "Yerel port 1 ile 65535 arasında olmalıdır.", + "invalidLocalTargetIp": "Yerel hedef IP geçerli bir IPv4 adresi olmalıdır.", + "invalidLocalTargetPort": "Yerel hedef portu 1 ile 65535 arasında olmalıdır.", + "invalidRemoteAddress": "Uzak adres gereklidir.", + "invalidRemotePort": "Uzak port 1 ile 65535 arasında olmalıdır.", + "lastError": "Son hata", + "lastStarted": "Son başlatma", + "lastTested": "Son test", + "localAddress": "Yerel Adres", + "localPort": "Yerel Port", + "localSaveError": "Yerel istemci tünelleri kaydedilemedi", + "localSaved": "İstemci tünelleri kaydedildi", + "manualControlError": "Tünel durumu güncellenemedi.", + "maxRetries": "Maks. Yeniden Deneme", + "mode": "Mod", + "nextRetryIn": "Sonraki deneme {{seconds}} saniye sonra", + "noClientTunnels": "Bu masaüstünde hiçbir istemci tüneli yapılandırılmamış.", + "noHostSelected": "Hiçbir host seçilmedi", + "noSshTunnels": "SSH Tüneli yok", + "port": "Port", + "remoteBindAddress": "Uzak Bağlantı Adresi", + "remoteHost": "Uzak Sunucu", + "remotePort": "Uzak Port", + "retryInterval": "Yeniden Deneme Aralığı (saniye)", + "route": "Rota:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → {{endpoint}} üzerinden SOCKS", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Test Et", + "tunnelName": "Tünel Adı", + "tunnelTestFailed": "Tünel testi başarısız", + "tunnelTestSucceeded": "Tünel testi başarılı", + "type": "Tünel Türü", + "typeDynamic": "Dinamik (-D)", + "typeLocal": "Yerel (-L)", + "typeRemote": "Uzak (-R)", + "working": "Çalışıyor..." + } +} diff --git a/plugins/tunnels/locales/translated/uk_UA.json b/plugins/tunnels/locales/translated/uk_UA.json new file mode 100644 index 000000000..122b3c81d --- /dev/null +++ b/plugins/tunnels/locales/translated/uk_UA.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Додати тунель", + "autoStartDesc": "Автоматично підключати цей тунель, коли хост завантажено", + "autoStartLabel": "Автоматичний запуск", + "connectBtn": "Підключитися", + "disconnectBtn": "Відключитися", + "enableTunneling": "Увімкнути тунелювання", + "enableTunnelingDesc": "Увімкнути функцію SSH-тунелю для цього хоста", + "endpointHost": "Кінцевий хост", + "endpointHostPlaceholder": "Той самий хост, хост SSH або доступний хост/IP-адреса", + "endpointPort": "Порт кінцевої точки", + "failedToConnectTunnel": "Не вдалося підключитися", + "failedToDisconnectTunnel": "Не вдалося відключитися", + "maxRetries": "Макс. кількість повторних спроб", + "noTunnelsConfigured": "Тунелі не налаштовано.", + "retryIntervalS": "Інтервал повторних спроб (с)", + "serverTunnelsSection": "Тунелі серверів", + "sourcePort": "Порт джерела", + "tabTunnels": "Тунелі", + "tunnelConnecting": "Тунель, що з'єднує...", + "tunnelDisconnected": "Тунель відключено", + "tunnelLabel": "Тунель {{number}}", + "tunnelModeDynamicDesc": "Створіть проксі-сервер SOCKS5 на локальному порту для динамічного переадресації портів.", + "tunnelModeLocalDesc": "Перенаправити локальний порт на порт на віддаленому сервері (або на хост, доступний з нього).", + "tunnelModeRemoteDesc": "Перенаправте порт на віддаленому сервері назад на локальний порт на вашому комп'ютері.", + "tunnelRequirementsText": "Для SSH-сервера у файлі /etc/ssh/sshd_config мають бути встановлені значення GatewayPorts: «так», AllowTcpForwarding: «так» та PermitRootLogin: «так».", + "tunnelSettings": "Налаштування тунелю", + "tunnelType": "Тип тунелю" + }, + "nav": { + "portForwarding": "Переадресація", + "tunnels": "Тунелі" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (прослуховувати локально)", + "localTargetHost": "127.0.0.1 (ціль на цьому комп'ютері)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (прослуховування на кінцевій точці)", + "remoteTargetHost": "127.0.0.1 (ціль з кінцевої точки)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (слухач SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} локальних клієнтських тунелів, налаштованих на цьому робочому столі.", + "c2sLoadPreset": "Навантаження", + "c2sNoPresetSelected": "Не вибрано пресетів", + "c2sNoPresets": "Немає збережених пресетів", + "c2sPresetDeleted": "Попередній налаштування тунелю клієнта видалено", + "c2sPresetLoadError": "Не вдалося завантажити попередні налаштування тунелю клієнта", + "c2sPresetLoaded": "Попередній набір тунелю клієнта завантажено локально", + "c2sPresetName": "Назва пресета", + "c2sPresetNamePlaceholder": "Назва попереднього налаштування клієнта", + "c2sPresetRenamed": "Попередній заготовку тунелю клієнта перейменовано", + "c2sPresetSaved": "Збережено пресет тунелю клієнта", + "c2sPresetSyncNote": "Пресети – це явні знімки; завантаження одного з них замінює список тунелів локальних клієнтів цього клієнта робочого столу.", + "c2sPresetToLoad": "Попередньо налаштовані для завантаження", + "c2sTunnelPresets": "Пресети тунелю клієнта", + "c2sTunnelPresetsUnavailable": "Попередні налаштування тунелю клієнта доступні лише у клієнтській версії для настільних комп'ютерів." + }, + "tunnels": { + "attempt": "Спроба {{current}} з {{max}}", + "autoNameClientDynamic": "ШКАРПЕТКИ {{localPort}} через {{endpoint}}", + "autoNameClientLocal": "Місцевий {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → місцевий {{localPort}}", + "autoStart": "Автоматичний запуск", + "cancel": "Скасувати", + "canceling": "Скасування...", + "clientAutoStartDesc": "Запускається, коли цей клієнт для робочого столу відкривається та залишається підключеним.", + "clientManualStartDesc": "Використовуйте «Пуск» і «Стоп» з цього рядка. Termix не відкриє його автоматично.", + "clientRemoteServerNote": "Для віддаленого переадресування можуть знадобитися параметри AllowTcpForwarding та GatewayPorts на SSH-сервері кінцевої точки. Віддалений порт закривається, коли цей робочий стіл відключається.", + "clientTunnelStarted": "Тунель клієнта розпочато", + "clientTunnelStopped": "Тунель клієнта зупинено", + "clientTunnels": "Тунелі клієнтів", + "connected": "Підключено", + "connecting": "Підключення...", + "createFirstTunnelMessage": "Ви ще не створили жодного SSH-тунелю. Налаштуйте тунельні з’єднання в Host Manager, щоб розпочати.", + "currentHostPort": "Поточний порт хоста", + "destination": "Пункт призначення", + "destinationAddress": "Адреса призначення", + "destinationPort": "Порт призначення", + "disconnected": "Відключено", + "duplicateAutoStartBind": "Тільки один тунель клієнта з автозапуском може використовувати {{bind}}.", + "endpointPort": "Порт кінцевої точки", + "endpointSshHost": "Кінцева точка SSH-хост", + "endpointSshHostPlaceholder": "Виберіть налаштований хост", + "endpointSshHostRequired": "Виберіть кінцевий SSH-хост для кожного клієнтського тунелю.", + "error": "Помилка", + "forwardDescriptionClientDynamic": "SOCKS на локальному порту {{sourcePort}}.", + "forwardDescriptionClientLocal": "Локальний {{sourcePort}} → віддалений {{endpointPort}}.", + "forwardDescriptionClientRemote": "Віддалений {{sourcePort}} → локальний {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS на поточному хості {{sourcePort}}.", + "forwardDescriptionServerLocal": "Поточний хост {{sourcePort}} → кінцева точка {{endpointPort}}.", + "forwardDescriptionServerRemote": "Кінцева точка {{endpointPort}} → поточний хост {{sourcePort}}.", + "host": "Хост", + "intermediateHost": "Проміжний господар", + "invalidBindIp": "Локальна IP-адреса має бути дійсною IPv4-адресою.", + "invalidEndpointPort": "Порт кінцевої точки має бути в діапазоні від 1 до 65535.", + "invalidLocalPort": "Локальний порт має бути в діапазоні від 1 до 65535.", + "invalidLocalTargetIp": "Локальна цільова IP-адреса має бути дійсною IPv4-адресою.", + "invalidLocalTargetPort": "Локальний цільовий порт має бути в діапазоні від 1 до 65535.", + "invalidRemoteAddress": "Потрібна віддалена адреса.", + "invalidRemotePort": "Віддалений порт має бути в діапазоні від 1 до 65535.", + "lastError": "Остання помилка", + "lastStarted": "Останній запуск", + "lastTested": "Останнє тестування", + "localAddress": "Локальна адреса", + "localPort": "Локальний порт", + "localSaveError": "Не вдалося зберегти локальні тунелі клієнта", + "localSaved": "Тунелі клієнтів збережено", + "manualControlError": "Не вдалося оновити стан тунелю.", + "maxRetries": "Макс. кількість повторних спроб", + "mode": "Режим", + "nextRetryIn": "Наступна спроба через {{seconds}} секунд", + "noClientTunnels": "На цьому робочому столі не налаштовано жодних клієнтських тунелів.", + "noHostSelected": "Хост не вибрано", + "noSshTunnels": "Без SSH-тунелів", + "port": "Порт", + "remoteBindAddress": "Адреса віддаленого зв'язування", + "remoteHost": "Віддалений хост", + "remotePort": "Віддалений порт", + "retryInterval": "Інтервал повторних спроб (секунди)", + "route": "Маршрут:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → ШКАРПЕТКИ через {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} через {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} на {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Тест", + "tunnelName": "Назва тунелю", + "tunnelTestFailed": "Випробування тунелю не вдалося", + "tunnelTestSucceeded": "Випробування тунелю успішно", + "type": "Тип тунелю", + "typeDynamic": "Динамічний (-D)", + "typeLocal": "Місцевий (-L)", + "typeRemote": "Віддалений (-R)", + "working": "Працюємо..." + } +} diff --git a/plugins/tunnels/locales/translated/vi_VN.json b/plugins/tunnels/locales/translated/vi_VN.json new file mode 100644 index 000000000..297b50d85 --- /dev/null +++ b/plugins/tunnels/locales/translated/vi_VN.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "Thêm đường hầm", + "autoStartDesc": "Tự động kết nối đường hầm này khi máy chủ được tải", + "autoStartLabel": "Tự động khởi động", + "connectBtn": "Kết nối", + "disconnectBtn": "Ngắt kết nối", + "enableTunneling": "Kích hoạt đường hầm", + "enableTunnelingDesc": "Kích hoạt chức năng đường hầm SSH cho máy chủ này", + "endpointHost": "Máy chủ đích", + "endpointHostPlaceholder": "Cùng máy chủ, máy chủ SSH, hoặc máy chủ/IP có thể truy cập", + "endpointPort": "Cổng đích", + "failedToConnectTunnel": "Kết nối thất bại", + "failedToDisconnectTunnel": "Ngắt kết nối thất bại", + "maxRetries": "Số lần thử lại tối đa", + "noTunnelsConfigured": "Chưa cấu hình đường hầm nào.", + "retryIntervalS": "Khoảng thời gian thử lại (giây)", + "serverTunnelsSection": "Đường hầm máy chủ", + "sourcePort": "Cổng nguồn", + "tabTunnels": "Đường hầm", + "tunnelConnecting": "Đang kết nối đường hầm...", + "tunnelDisconnected": "Đã ngắt kết nối đường hầm", + "tunnelLabel": "Đường hầm {{number}}", + "tunnelModeDynamicDesc": "Tạo proxy SOCKS5 trên một cổng cục bộ để chuyển tiếp cổng động.", + "tunnelModeLocalDesc": "Chuyển tiếp một cổng cục bộ đến một cổng trên máy chủ từ xa (hoặc máy chủ có thể truy cập từ đó).", + "tunnelModeRemoteDesc": "Chuyển tiếp một cổng trên máy chủ từ xa về một cổng cục bộ trên máy của bạn.", + "tunnelRequirementsText": "Máy chủ SSH phải có GatewayPorts yes, AllowTcpForwarding yes, và PermitRootLogin yes được đặt trong /etc/ssh/sshd_config.", + "tunnelSettings": "Cài đặt đường hầm", + "tunnelType": "Loại đường hầm" + }, + "nav": { + "portForwarding": "Chuyển tiếp", + "tunnels": "Đường hầm" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (lắng nghe cục bộ)", + "localTargetHost": "127.0.0.1 (đích trên máy này)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1 (lắng nghe trên điểm cuối)", + "remoteTargetHost": "127.0.0.1 (mục tiêu từ điểm cuối)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1 (Trình nghe SOCKS)" + }, + "profile": { + "c2sCurrentLocalConfig": "{{count}} đường hầm máy khách cục bộ đã được cấu hình trên máy tính này.", + "c2sLoadPreset": "Tải", + "c2sNoPresetSelected": "Chưa chọn cài đặt sẵn", + "c2sNoPresets": "Chưa lưu cài đặt sẵn nào", + "c2sPresetDeleted": "Đã xóa cài đặt sẵn đường hầm máy khách", + "c2sPresetLoadError": "Tải cài đặt sẵn đường hầm máy khách thất bại", + "c2sPresetLoaded": "Đã tải cài đặt sẵn đường hầm máy khách cục bộ", + "c2sPresetName": "Tên cài đặt sẵn", + "c2sPresetNamePlaceholder": "Tên cài đặt sẵn máy khách", + "c2sPresetRenamed": "Đã đổi tên cài đặt sẵn đường hầm máy khách", + "c2sPresetSaved": "Đã lưu cài đặt sẵn đường hầm máy khách", + "c2sPresetSyncNote": "Cài đặt sẵn là ảnh chụp tức thời; tải một cài đặt sẽ thay thế danh sách đường hầm máy khách cục bộ trên máy này.", + "c2sPresetToLoad": "Cài đặt sẵn để tải", + "c2sTunnelPresets": "Cài đặt sẵn Đường hầm Máy khách", + "c2sTunnelPresetsUnavailable": "Cài đặt sẵn đường hầm máy khách chỉ khả dụng trên ứng dụng máy tính." + }, + "tunnels": { + "attempt": "Lần thử {{current}} / {{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} qua {{endpoint}}", + "autoNameClientLocal": "Cục bộ {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → cục bộ {{localPort}}", + "autoStart": "Tự động khởi động", + "cancel": "Hủy", + "canceling": "Đang hủy...", + "clientAutoStartDesc": "Tự động khởi động khi mở ứng dụng máy khách và duy trì kết nối.", + "clientManualStartDesc": "Sử dụng nút Bắt đầu và Dừng trên dòng này. Termix sẽ không tự động mở.", + "clientRemoteServerNote": "Chuyển tiếp từ xa có thể yêu cầu AllowTcpForwarding và GatewayPorts trên máy chủ SSH điểm cuối. Cổng từ xa sẽ đóng khi máy này ngắt kết nối.", + "clientTunnelStarted": "Đường hầm máy khách đã khởi động", + "clientTunnelStopped": "Đường hầm máy khách đã dừng", + "clientTunnels": "Đường hầm máy khách", + "connected": "Đã kết nối", + "connecting": "Đang kết nối...", + "createFirstTunnelMessage": "Bạn chưa tạo đường hầm SSH nào. Hãy cấu hình kết nối đường hầm trong Trình quản lý máy chủ để bắt đầu.", + "currentHostPort": "Cổng máy hiện tại", + "destination": "Điểm đến", + "destinationAddress": "Địa chỉ đích", + "destinationPort": "Cảng đích", + "disconnected": "Đã ngắt kết nối", + "duplicateAutoStartBind": "Chỉ một đường hầm máy khách tự động có thể sử dụng {{bind}}.", + "endpointPort": "Cổng điểm cuối", + "endpointSshHost": "Máy chủ SSH điểm cuối", + "endpointSshHostPlaceholder": "Chọn máy chủ đã cấu hình", + "endpointSshHostRequired": "Chọn máy chủ SSH điểm cuối cho mỗi đường hầm máy khách.", + "error": "Lỗi", + "forwardDescriptionClientDynamic": "SOCKS trên cổng cục bộ {{sourcePort}}.", + "forwardDescriptionClientLocal": "Cục bộ {{sourcePort}} → từ xa {{endpointPort}}.", + "forwardDescriptionClientRemote": "Từ xa {{sourcePort}} → cục bộ {{endpointPort}}.", + "forwardDescriptionServerDynamic": "SOCKS trên máy chủ hiện tại {{sourcePort}}.", + "forwardDescriptionServerLocal": "Máy chủ hiện tại {{sourcePort}} → điểm cuối {{endpointPort}}.", + "forwardDescriptionServerRemote": "Điểm cuối {{endpointPort}} → máy chủ hiện tại {{sourcePort}}.", + "host": "Máy chủ", + "intermediateHost": "Máy chủ trung gian", + "invalidBindIp": "IP cục bộ phải là địa chỉ IPv4 hợp lệ.", + "invalidEndpointPort": "Cổng điểm cuối phải nằm trong khoảng 1 đến 65535.", + "invalidLocalPort": "Cổng cục bộ phải nằm trong khoảng 1 đến 65535.", + "invalidLocalTargetIp": "IP đích cục bộ phải là địa chỉ IPv4 hợp lệ.", + "invalidLocalTargetPort": "Cổng đích cục bộ phải nằm trong khoảng 1 đến 65535.", + "invalidRemoteAddress": "Cần có địa chỉ từ xa.", + "invalidRemotePort": "Cổng từ xa phải nằm trong khoảng 1 đến 65535.", + "lastError": "Lỗi cuối cùng", + "lastStarted": "Lần bắt đầu cuối", + "lastTested": "Lần kiểm tra cuối", + "localAddress": "Địa chỉ địa phương", + "localPort": "Cổng cục bộ", + "localSaveError": "Lưu đường hầm máy khách cục bộ thất bại", + "localSaved": "Đã lưu đường hầm máy khách", + "manualControlError": "Cập nhật trạng thái đường hầm thất bại.", + "maxRetries": "Số lần thử lại tối đa", + "mode": "Chế độ", + "nextRetryIn": "Thử lại sau {{seconds}} giây", + "noClientTunnels": "Chưa có đường hầm máy khách nào được cấu hình trên máy này.", + "noHostSelected": "Chưa chọn máy chủ", + "noSshTunnels": "Không có đường hầm SSH", + "port": "Cổng", + "remoteBindAddress": "Địa chỉ liên kết từ xa", + "remoteHost": "Máy chủ từ xa", + "remotePort": "Cổng từ xa", + "retryInterval": "Khoảng thời gian thử lại (giây)", + "route": "Tuyến:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS qua {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} qua {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} trên {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "Kiểm tra", + "tunnelName": "Tên đường hầm", + "tunnelTestFailed": "Kiểm tra đường hầm thất bại", + "tunnelTestSucceeded": "Kiểm tra đường hầm thành công", + "type": "Loại đường hầm", + "typeDynamic": "Động (-D)", + "typeLocal": "Cục bộ (-L)", + "typeRemote": "Từ xa (-R)", + "working": "Đang làm việc..." + } +} diff --git a/plugins/tunnels/locales/translated/zh_CN.json b/plugins/tunnels/locales/translated/zh_CN.json new file mode 100644 index 000000000..2d2baf4a2 --- /dev/null +++ b/plugins/tunnels/locales/translated/zh_CN.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "添加隧道", + "autoStartDesc": "主机加载时自动连接此隧道", + "autoStartLabel": "自动启动", + "connectBtn": "连接", + "disconnectBtn": "断开", + "enableTunneling": "启用隧道", + "enableTunnelingDesc": "为此主机启用 SSH 隧道功能", + "endpointHost": "端点主机", + "endpointHostPlaceholder": "相同主机、SSH 主机或可访问的主机/IP", + "endpointPort": "端点端口", + "failedToConnectTunnel": "连接失败", + "failedToDisconnectTunnel": "断开连接失败", + "maxRetries": "最大重试次数", + "noTunnelsConfigured": "未配置隧道。", + "retryIntervalS": "重试间隔(秒)", + "serverTunnelsSection": "服务器隧道", + "sourcePort": "源端口", + "tabTunnels": "隧道", + "tunnelConnecting": "隧道连接中...", + "tunnelDisconnected": "隧道已断开连接", + "tunnelLabel": "隧道 {{number}}", + "tunnelModeDynamicDesc": "在本地端口上创建 SOCKS5 代理,用于动态端口转发。", + "tunnelModeLocalDesc": "将本地端口转发到远程服务器(或可从其访问的主机)上的端口。", + "tunnelModeRemoteDesc": "将远程服务器上的端口转发回您机器上的本地端口。", + "tunnelRequirementsText": "SSH 服务器必须在 /etc/ssh/sshd_config 中设置 GatewayPorts yes、AllowTcpForwarding yes 和 PermitRootLogin yes。", + "tunnelSettings": "隧道设置", + "tunnelType": "隧道类型" + }, + "nav": { + "portForwarding": "转发", + "tunnels": "隧道" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (本地监听)", + "localTargetHost": "127.0.0.1 (此计算机上的目标)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1(监听端点)", + "remoteTargetHost": "127.0.0.1(来自端点的目标)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1(SOCKS 监听器)" + }, + "profile": { + "c2sCurrentLocalConfig": "此桌面上已配置 {{count}} 条本地客户端隧道。", + "c2sLoadPreset": "加载", + "c2sNoPresetSelected": "未选择预设", + "c2sNoPresets": "无保存的预设", + "c2sPresetDeleted": "客户端隧道预设已删除", + "c2sPresetLoadError": "加载客户端隧道预设失败", + "c2sPresetLoaded": "客户端隧道预设已在本地加载", + "c2sPresetName": "预设名称", + "c2sPresetNamePlaceholder": "客户端预设名称", + "c2sPresetRenamed": "客户端隧道预设已重命名", + "c2sPresetSaved": "客户端隧道预设已保存", + "c2sPresetSyncNote": "预设是显式快照;加载预设将替换此桌面客户端的本地客户端隧道列表。", + "c2sPresetToLoad": "要加载的预设", + "c2sTunnelPresets": "客户端隧道预设", + "c2sTunnelPresetsUnavailable": "客户端隧道预设仅在桌面客户端中可用。" + }, + "tunnels": { + "attempt": "尝试 {{current}}/{{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} 通过 {{endpoint}}", + "autoNameClientLocal": "本地 {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → 本地 {{localPort}}", + "autoStart": "自动启动", + "cancel": "取消", + "canceling": "取消中...", + "clientAutoStartDesc": "在此桌面客户端打开时启动并保持连接。", + "clientManualStartDesc": "从此行使用启动和停止。Termix 不会自动启动它。", + "clientRemoteServerNote": "远程转发可能需要在端点 SSH 服务器上设置 AllowTcpForwarding 和 GatewayPorts。此桌面断开连接时远程端口将关闭。", + "clientTunnelStarted": "客户端隧道已启动", + "clientTunnelStopped": "客户端隧道已停止", + "clientTunnels": "客户端隧道", + "connected": "已连接", + "connecting": "连接中...", + "createFirstTunnelMessage": "您尚未创建任何 SSH 隧道。在主机管理器中配置隧道连接以开始使用。", + "currentHostPort": "当前主机端口", + "destination": "目标", + "destinationAddress": "目的地地址", + "destinationPort": "目的港", + "disconnected": "已断开", + "duplicateAutoStartBind": "只有一个自启动客户端隧道可以使用 {{bind}}。", + "endpointPort": "端点端口", + "endpointSshHost": "端点 SSH 主机", + "endpointSshHostPlaceholder": "选择已配置的主机", + "endpointSshHostRequired": "为每个客户端隧道选择一个端点 SSH 主机。", + "error": "错误", + "forwardDescriptionClientDynamic": "本地端口 {{sourcePort}} 上的 SOCKS。", + "forwardDescriptionClientLocal": "本地 {{sourcePort}} → 远程 {{endpointPort}}。", + "forwardDescriptionClientRemote": "远程 {{sourcePort}} → 本地 {{endpointPort}}。", + "forwardDescriptionServerDynamic": "当前主机上的 SOCKS {{sourcePort}}。", + "forwardDescriptionServerLocal": "当前主机 {{sourcePort}} → 端点 {{endpointPort}}。", + "forwardDescriptionServerRemote": "端点 {{endpointPort}} → 当前主机 {{sourcePort}}。", + "host": "主机", + "intermediateHost": "中间宿主", + "invalidBindIp": "本地 IP 必须是有效的 IPv4 地址。", + "invalidEndpointPort": "端点端口必须在 1 到 65535 之间。", + "invalidLocalPort": "本地端口必须在 1 到 65535 之间。", + "invalidLocalTargetIp": "本地目标 IP 必须是有效的 IPv4 地址。", + "invalidLocalTargetPort": "本地目标端口必须在 1 到 65535 之间。", + "invalidRemoteAddress": "需要远程地址。", + "invalidRemotePort": "远程端口必须在 1 到 65535 之间。", + "lastError": "最后错误", + "lastStarted": "最后启动", + "lastTested": "最后测试", + "localAddress": "本地地址", + "localPort": "本地端口", + "localSaveError": "保存本地客户端隧道失败", + "localSaved": "客户端隧道已保存", + "manualControlError": "更新隧道状态失败。", + "maxRetries": "最大重试次数", + "mode": "模式", + "nextRetryIn": "{{seconds}} 秒后重试", + "noClientTunnels": "此桌面未配置客户端隧道。", + "noHostSelected": "未选择主机", + "noSshTunnels": "无 SSH 隧道", + "port": "端口", + "remoteBindAddress": "远程绑定地址", + "remoteHost": "远程主机", + "remotePort": "远程端口", + "retryInterval": "重试间隔(秒)", + "route": "路由:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS 通过 {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} 经由 {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} 在 {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "测试", + "tunnelName": "隧道名称", + "tunnelTestFailed": "隧道测试失败", + "tunnelTestSucceeded": "隧道测试成功", + "type": "隧道类型", + "typeDynamic": "动态 (-D)", + "typeLocal": "本地 (-L)", + "typeRemote": "远程 (-R)", + "working": "处理中..." + } +} diff --git a/plugins/tunnels/locales/translated/zh_TW.json b/plugins/tunnels/locales/translated/zh_TW.json new file mode 100644 index 000000000..96e0a5f93 --- /dev/null +++ b/plugins/tunnels/locales/translated/zh_TW.json @@ -0,0 +1,139 @@ +{ + "hosts": { + "addTunnelBtn": "新增通道", + "autoStartDesc": "載入主機時自動連線此通道", + "autoStartLabel": "自動啟動", + "connectBtn": "連線", + "disconnectBtn": "中斷連線", + "enableTunneling": "啟用通道", + "enableTunnelingDesc": "為此主機啟用 SSH 通道功能", + "endpointHost": "端點主機", + "endpointHostPlaceholder": "同一主機、SSH 主機或可連線的主機/IP", + "endpointPort": "端點連接埠", + "failedToConnectTunnel": "連線失敗", + "failedToDisconnectTunnel": "中斷連線失敗", + "maxRetries": "最大重試次數", + "noTunnelsConfigured": "未設定任何通道。", + "retryIntervalS": "重試間隔(秒)", + "serverTunnelsSection": "伺服器通道", + "sourcePort": "來源連接埠", + "tabTunnels": "通道", + "tunnelConnecting": "通道連線中…", + "tunnelDisconnected": "通道已中斷連線", + "tunnelLabel": "通道 {{number}}", + "tunnelModeDynamicDesc": "在本機連接埠上建立 SOCKS5 代理以進行動態連接埠轉送。", + "tunnelModeLocalDesc": "將本機連接埠轉送至遠端伺服器的連接埠(或可從其連線的主機)。", + "tunnelModeRemoteDesc": "將遠端伺服器的連接埠轉送回本機的連接埠。", + "tunnelRequirementsText": "SSH 伺服器必須在 /etc/ssh/sshd_config 中設定 GatewayPorts yes、AllowTcpForwarding yes 以及 PermitRootLogin yes。", + "tunnelSettings": "通道設定", + "tunnelType": "通道類型" + }, + "nav": { + "portForwarding": "轉發", + "tunnels": "隧道" + }, + "placeholders": { + "defaultEndpointPort": "224", + "defaultPort": "22", + "localListenerHost": "127.0.0.1 (本機監聽)", + "localTargetHost": "127.0.0.1 (此電腦上的目標)", + "maxRetries": "3", + "remoteBindHost": "127.0.0.1(監聽端點)", + "remoteTargetHost": "127.0.0.1(來自端點的目標)", + "retryInterval": "10", + "socksListenerHost": "127.0.0.1(SOCKS 監聽器)" + }, + "profile": { + "c2sCurrentLocalConfig": "此桌面上設定了 {{count}} 個本機用戶端通道。", + "c2sLoadPreset": "載入", + "c2sNoPresetSelected": "未選取預設組", + "c2sNoPresets": "無儲存的預設組", + "c2sPresetDeleted": "用戶端通道預設組已刪除", + "c2sPresetLoadError": "無法載入用戶端通道預設組", + "c2sPresetLoaded": "用戶端通道預設組已在本機載入", + "c2sPresetName": "預設組名稱", + "c2sPresetNamePlaceholder": "用戶端預設組名稱", + "c2sPresetRenamed": "用戶端通道預設組已重新命名", + "c2sPresetSaved": "用戶端通道預設組已儲存", + "c2sPresetSyncNote": "預設組是明確的快照;載入預設組將會取代此桌面用戶端的本機用戶端通道清單。", + "c2sPresetToLoad": "要載入的預設組", + "c2sTunnelPresets": "用戶端通道預設組", + "c2sTunnelPresetsUnavailable": "用戶端通道預設組僅在桌面用戶端中可用。" + }, + "tunnels": { + "attempt": "嘗試 {{current}}/{{max}}", + "autoNameClientDynamic": "SOCKS {{localPort}} 透過 {{endpoint}}", + "autoNameClientLocal": "本機 {{localPort}} → {{endpoint}} {{remotePort}}", + "autoNameClientRemote": "{{endpoint}} {{remotePort}} → 本機 {{localPort}}", + "autoStart": "自動啟動", + "cancel": "取消", + "canceling": "正在取消…", + "clientAutoStartDesc": "在此桌面用戶端開啟時啟動並保持連線。", + "clientManualStartDesc": "從此列使用「啟動」與「停止」。Termix 不會自動開啟。", + "clientRemoteServerNote": "遠端轉送可能需要在端點 SSH 伺服器上啟用 AllowTcpForwarding 和 GatewayPorts。遠端連接埠會在此桌面中斷連線時關閉。", + "clientTunnelStarted": "用戶端通道已啟動", + "clientTunnelStopped": "用戶端通道已停止", + "clientTunnels": "用戶端通道", + "connected": "已連線", + "connecting": "連線中…", + "createFirstTunnelMessage": "您尚未建立任何 SSH 通道。請在主機管理員中設定通道連線以開始使用。", + "currentHostPort": "目前主機連接埠", + "destination": "目的地", + "destinationAddress": "目的地地址", + "destinationPort": "目的港", + "disconnected": "已離線", + "duplicateAutoStartBind": "只有一個自動啟動的用戶端通道可以使用 {{bind}}。", + "endpointPort": "端點連接埠", + "endpointSshHost": "端點 SSH 主機", + "endpointSshHostPlaceholder": "選擇已設定的主機", + "endpointSshHostRequired": "為每個用戶端通道選取一個端點 SSH 主機。", + "error": "錯誤", + "forwardDescriptionClientDynamic": "本機連接埠 {{sourcePort}} 上的 SOCKS。", + "forwardDescriptionClientLocal": "本機 {{sourcePort}} → 遠端 {{endpointPort}}。", + "forwardDescriptionClientRemote": "遠端 {{sourcePort}} → 本機 {{endpointPort}}。", + "forwardDescriptionServerDynamic": "目前主機上的 SOCKS {{sourcePort}}。", + "forwardDescriptionServerLocal": "目前主機 {{sourcePort}} → 端點 {{endpointPort}}。", + "forwardDescriptionServerRemote": "端點 {{endpointPort}} → 目前主機 {{sourcePort}}。", + "host": "主機", + "intermediateHost": "中間宿主", + "invalidBindIp": "本機 IP 必須是有效的 IPv4 位址。", + "invalidEndpointPort": "端點連接埠必須介於 1 到 65535 之間。", + "invalidLocalPort": "本機連接埠必須介於 1 到 65535 之間。", + "invalidLocalTargetIp": "本機目標 IP 必須是有效的 IPv4 位址。", + "invalidLocalTargetPort": "本機目標連接埠必須介於 1 到 65535 之間。", + "invalidRemoteAddress": "需要遠端位址。", + "invalidRemotePort": "遠端連接埠必須介於 1 到 65535 之間。", + "lastError": "上次錯誤", + "lastStarted": "上次啟動", + "lastTested": "上次測試", + "localAddress": "本地地址", + "localPort": "本機連接埠", + "localSaveError": "無法儲存本機用戶端通道", + "localSaved": "用戶端通道已儲存", + "manualControlError": "無法更新通道狀態。", + "maxRetries": "最大重試次數", + "mode": "模式", + "nextRetryIn": "下次重試於 {{seconds}} 秒後", + "noClientTunnels": "此桌面未設定任何用戶端通道。", + "noHostSelected": "未選取主機", + "noSshTunnels": "無 SSH 通道", + "port": "連接埠", + "remoteBindAddress": "遠端綁定位址", + "remoteHost": "遠端主機", + "remotePort": "遠端連接埠", + "retryInterval": "重試間隔(秒)", + "route": "路由:", + "summaryClientDynamic": "{{localHost}}:{{localPort}} → SOCKS 透過 {{endpoint}}", + "summaryClientLocal": "{{localHost}}:{{localPort}} → {{remoteHost}}:{{remotePort}} via {{endpoint}}", + "summaryClientRemote": "{{remoteHost}}:{{remotePort}} on {{endpoint}} → {{localHost}}:{{localPort}}", + "test": "測試", + "tunnelName": "通道名稱", + "tunnelTestFailed": "通道測試失敗", + "tunnelTestSucceeded": "通道測試成功", + "type": "通道類型", + "typeDynamic": "動態 (-D)", + "typeLocal": "本機 (-L)", + "typeRemote": "遠端 (-R)", + "working": "處理中..." + } +} diff --git a/plugins/tunnels/manifest.json b/plugins/tunnels/manifest.json new file mode 100644 index 000000000..8ba85d8a9 --- /dev/null +++ b/plugins/tunnels/manifest.json @@ -0,0 +1,92 @@ +{ + "id": "tunnels", + "name": "Tunnels", + "version": "1.0.0", + "description": "SSH port forwarding between servers, and client tunnels from the desktop app.", + "author": { + "name": "Termix" + }, + "license": "MIT", + "repository": "https://github.com/Termix-SSH/Termix", + "category": "Networking", + "icon": "ArrowLeftRight", + "engine": { + "termix": ">=2.9.0", + "api": "1" + }, + "capabilities": [ + "hosts:read", + "credentials:use", + "ssh:connect", + "db:own", + "network:serve", + "ui:surface" + ], + "provides": [ + { + "service": "tunnels.access", + "version": "1.0.0", + "permission": "tunnels.use" + } + ], + "contributes": { + "tabs": [ + { + "id": "tunnel", + "titleKey": "nav.tunnels", + "icon": "ArrowLeftRight", + "openFrom": ["host-context-menu"] + } + ], + "panels": [ + { + "id": "port-forwarding", + "titleKey": "nav.portForwarding", + "icon": "Network" + } + ], + "actions": [ + { + "id": "tunnels.statuses", + "titleKey": "nav.tunnels", + "handler": "statuses", + "permission": "tunnels.use" + }, + { + "id": "tunnels.open", + "titleKey": "nav.tunnels", + "handler": "open", + "permission": "tunnels.use" + } + ], + "permissions": [ + { + "name": "use", + "titleKey": "permissions.use.title", + "descriptionKey": "permissions.use.description", + "defaultRoles": ["admin", "user"] + } + ], + "settings": { + "host": { + "enableKey": "enableTunnel", + "enableLabelKey": "settings.host.enable.label", + "fields": [ + { + "key": "tunnelConnections", + "type": "custom", + "component": "tunnelConnections", + "requires": "enableTunnel" + } + ] + } + }, + "hostCapability": { + "key": "enableTunnel", + "labelKey": "hosts.tabTunnels", + "editorTab": "general" + } + }, + "locales": "locales", + "platforms": ["linux", "win32", "darwin"] +} diff --git a/plugins/tunnels/migrations/mysql/0001_adopt_c2s_tunnel_presets.sql b/plugins/tunnels/migrations/mysql/0001_adopt_c2s_tunnel_presets.sql new file mode 100644 index 000000000..bf119f097 --- /dev/null +++ b/plugins/tunnels/migrations/mysql/0001_adopt_c2s_tunnel_presets.sql @@ -0,0 +1,15 @@ +-- tunnels 0001: adopt_c2s_tunnel_presets +-- Generated by termix-plugin migrations. Review before committing. + +CREATE TABLE IF NOT EXISTS `c2s_tunnel_presets` ( + `id` int AUTO_INCREMENT PRIMARY KEY, + `user_id` varchar(255) NOT NULL, + `name` text NOT NULL, + `config` text NOT NULL, + `platform` text, + `computer_name` text, + `created_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP), + `updated_at` text NOT NULL DEFAULT (CURRENT_TIMESTAMP), + FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE +); +RENAME TABLE `c2s_tunnel_presets` TO `p_tunnels_presets`; diff --git a/plugins/tunnels/migrations/postgres/0001_adopt_c2s_tunnel_presets.sql b/plugins/tunnels/migrations/postgres/0001_adopt_c2s_tunnel_presets.sql new file mode 100644 index 000000000..beb98af9b --- /dev/null +++ b/plugins/tunnels/migrations/postgres/0001_adopt_c2s_tunnel_presets.sql @@ -0,0 +1,15 @@ +-- tunnels 0001: adopt_c2s_tunnel_presets +-- Generated by termix-plugin migrations. Review before committing. + +CREATE TABLE IF NOT EXISTS "c2s_tunnel_presets" ( + "id" serial PRIMARY KEY, + "user_id" varchar(255) NOT NULL, + "name" text NOT NULL, + "config" text NOT NULL, + "platform" text, + "computer_name" text, + "created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE +); +ALTER TABLE "c2s_tunnel_presets" RENAME TO "p_tunnels_presets"; diff --git a/plugins/tunnels/migrations/snapshot.json b/plugins/tunnels/migrations/snapshot.json new file mode 100644 index 000000000..878bb8b7e --- /dev/null +++ b/plugins/tunnels/migrations/snapshot.json @@ -0,0 +1,45 @@ +{ + "version": 1, + "tables": { + "presets": { + "columns": { + "id": { + "type": "id", + "primaryKey": true, + "notNull": true + }, + "userId": { + "type": "refUser", + "length": 255, + "notNull": true + }, + "name": { + "type": "text", + "notNull": true + }, + "config": { + "type": "text", + "notNull": true + }, + "platform": { + "type": "text" + }, + "computerName": { + "type": "text" + }, + "createdAt": { + "type": "timestamp", + "notNull": true, + "defaultNow": true + }, + "updatedAt": { + "type": "timestamp", + "notNull": true, + "defaultNow": true + } + }, + "indexes": [], + "adopts": "c2s_tunnel_presets" + } + } +} diff --git a/plugins/tunnels/migrations/sqlite/0001_adopt_c2s_tunnel_presets.sql b/plugins/tunnels/migrations/sqlite/0001_adopt_c2s_tunnel_presets.sql new file mode 100644 index 000000000..79fe51da2 --- /dev/null +++ b/plugins/tunnels/migrations/sqlite/0001_adopt_c2s_tunnel_presets.sql @@ -0,0 +1,15 @@ +-- tunnels 0001: adopt_c2s_tunnel_presets +-- Generated by termix-plugin migrations. Review before committing. + +CREATE TABLE IF NOT EXISTS "c2s_tunnel_presets" ( + "id" integer PRIMARY KEY AUTOINCREMENT, + "user_id" text NOT NULL, + "name" text NOT NULL, + "config" text NOT NULL, + "platform" text, + "computer_name" text, + "created_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" text NOT NULL DEFAULT CURRENT_TIMESTAMP, + FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE +); +ALTER TABLE "c2s_tunnel_presets" RENAME TO "p_tunnels_presets"; diff --git a/plugins/tunnels/package.json b/plugins/tunnels/package.json new file mode 100644 index 000000000..240bf15d2 --- /dev/null +++ b/plugins/tunnels/package.json @@ -0,0 +1,15 @@ +{ + "name": "@termix-plugin/tunnels", + "private": true, + "version": "1.0.0", + "type": "module", + "scripts": { + "build": "termix-plugin build", + "test": "termix-plugin test", + "typecheck": "tsc -p tsconfig.json", + "validate": "termix-plugin validate" + }, + "devDependencies": { + "@termix/plugin-sdk": "*" + } +} diff --git a/plugins/tunnels/src/backend/authorize.ts b/plugins/tunnels/src/backend/authorize.ts new file mode 100644 index 000000000..05f88f697 --- /dev/null +++ b/plugins/tunnels/src/backend/authorize.ts @@ -0,0 +1,29 @@ +import { isReservedTunnelName, parseReservedTunnelName } from "./utils.js"; + +/** + * Ownership check for an action addressed by tunnel name alone. + * + * On-demand (forward) tunnels are deliberately never registered as configs, + * so a check that only ran for a registered config would never run for them. + * Host ids are small sequential integers and endpoint ids come from the + * client, so anyone could guess `web:{hostId}:{endpointId}` and force-close + * another user's live tunnel. The host id is read back out of the reserved + * name instead, and a reserved name whose host id cannot be parsed fails + * closed rather than falling through to the unchecked path. + */ +export async function authorizeTunnelAction( + canAccessHost: (hostId: number) => Promise, + tunnelName: string, + config: { sourceHostId?: number } | undefined, +): Promise<{ allowed: boolean; hostId?: number }> { + const hostId = + config?.sourceHostId ?? parseReservedTunnelName(tunnelName)?.hostId; + + if (hostId === undefined) { + // Not reserved and not registered: nothing is running under this name + // that anyone could own, so there is nothing to protect. + return { allowed: !isReservedTunnelName(tunnelName) }; + } + + return { allowed: await canAccessHost(hostId), hostId }; +} diff --git a/plugins/tunnels/src/backend/autostart.ts b/plugins/tunnels/src/backend/autostart.ts new file mode 100644 index 000000000..92d669a88 --- /dev/null +++ b/plugins/tunnels/src/backend/autostart.ts @@ -0,0 +1,94 @@ +import type { PluginContext } from "@termix/plugin-sdk/backend"; +import type { TunnelManager } from "./manager.js"; +import { errorMessage } from "./manager.js"; +import { + buildTunnelConfig, + connectionToRequest, + readTunnelConnections, + resolveEndpoint, +} from "./config.js"; + +export interface HostOwner { + id: number; + userId: string; +} + +/** Every host and its owner, straight from ssh_data. */ +export async function listHostOwners(ctx: PluginContext): Promise { + /* eslint-disable @typescript-eslint/no-explicit-any */ + const { hosts } = await ctx.db.refs<{ hosts: any }>(); + const drizzle = await ctx.db.client(); + /* eslint-enable @typescript-eslint/no-explicit-any */ + const rows = (await drizzle + .select({ id: hosts.id, userId: hosts.userId }) + .from(hosts)) as HostOwner[]; + return rows.filter((row) => Number.isInteger(row.id) && !!row.userId); +} + +/** + * Starts every saved tunnel marked autoStart, across every user. + * + * ctx.hosts only sees the acting user's hosts, so the owners come from + * ssh_data first and each host is then resolved and connected as its owner. + */ +export async function startAutoStartTunnels( + ctx: PluginContext, + manager: TunnelManager, + listOwners: () => Promise = () => listHostOwners(ctx), +): Promise { + let started = 0; + let owners: HostOwner[]; + try { + owners = await listOwners(); + } catch (error) { + ctx.log.warn( + `Could not list hosts for tunnel autostart: ${errorMessage(error)}`, + ); + return 0; + } + + for (const owner of owners) { + try { + if (!(await ctx.settings.getHost(owner.id, "enableTunnel"))) { + continue; + } + const connections = readTunnelConnections( + await ctx.settings.getHost(owner.id, "tunnelConnections"), + ); + if (!connections.some((connection) => connection.autoStart)) continue; + + started += await ctx.asUser(owner.userId, async () => { + const host = await ctx.hosts.get(owner.id); + if (!host) return 0; + let count = 0; + for (const [index, connection] of connections.entries()) { + if (!connection.autoStart) continue; + try { + const config = await resolveEndpoint( + ctx, + buildTunnelConfig( + host, + connectionToRequest(host, index, connection), + owner.userId, + ), + ); + await manager.start(config); + count++; + } catch (error) { + ctx.log.warn( + `Autostart tunnel ${index + 1} on host ${owner.id} skipped: ${errorMessage(error)}`, + ); + } + } + return count; + }); + } catch (error) { + ctx.log.warn( + `Autostart failed for host ${owner.id}: ${errorMessage(error)}`, + ); + } + } + + if (started > 0) ctx.log.info(`Started ${started} autostart tunnel(s)`); + return started; +} diff --git a/plugins/tunnels/src/backend/c2s-relay.ts b/plugins/tunnels/src/backend/c2s-relay.ts new file mode 100644 index 000000000..58d5fa0ff --- /dev/null +++ b/plugins/tunnels/src/backend/c2s-relay.ts @@ -0,0 +1,450 @@ +import type { Duplex } from "node:stream"; +import type { Client, ClientChannel } from "ssh2"; +import type { WebSocket } from "ws"; +import type { + PluginContext, + PluginSshConnection, +} from "@termix/plugin-sdk/backend"; +import type { TunnelMode } from "./types.js"; +import { + bindForwardIn, + forwardOut, + unbindForwardIn, +} from "./ssh-primitives.js"; +import { getTunnelMode } from "./utils.js"; + +/** What the desktop app sends in the first message on the relay socket. */ +export interface C2SRelayTunnel { + name?: string; + mode?: TunnelMode; + tunnelType?: "local" | "remote"; + localAddress?: string; + remoteAddress?: string; + bindHost?: string; + targetHost?: string; + sourceHostId?: number; + sourceHostSyncId?: string; + sourcePort?: number; + endpointPort?: number; +} + +export interface C2SOpenMessage { + type: "open" | "test"; + tunnelConfig?: C2SRelayTunnel; + targetHost?: string; + targetPort?: number; +} + +const WS_HIGH_WATERMARK = 1024 * 1024; +const WS_LOW_WATERMARK = 256 * 1024; +const STREAM_WRITE_LIMIT = 8 * 1024 * 1024; + +export function sendC2SError(ws: WebSocket, message: string): void { + if (ws.readyState === 1) { + ws.send(JSON.stringify({ type: "error", error: message })); + } +} + +export function describeC2SRelayError(error: unknown): string { + const message = error instanceof Error ? error.message : String(error); + const lower = message.toLowerCase(); + + if ( + lower.includes("administratively prohibited") || + lower.includes("forwarding disabled") || + lower.includes("open failed") + ) { + return `SSH forwarding was rejected by the endpoint server: ${message}`; + } + if ( + lower.includes("address already in use") || + lower.includes("unable to bind") || + lower.includes("bind") + ) { + return `Remote port is not available on the endpoint server: ${message}`; + } + if ( + lower.includes("name or service not known") || + lower.includes("enotfound") || + lower.includes("econnrefused") + ) { + return `Tunnel target is not reachable from the endpoint host: ${message}`; + } + + return message || "Failed to open relay"; +} + +function pauseForBackpressure(ws: WebSocket, source?: Duplex): void { + if (!source || ws.bufferedAmount <= WS_HIGH_WATERMARK) return; + + source.pause(); + const resumeTimer = setInterval(() => { + if ( + ws.readyState !== 1 || + source.destroyed || + ws.bufferedAmount <= WS_LOW_WATERMARK + ) { + clearInterval(resumeTimer); + if (ws.readyState === 1 && !source.destroyed) source.resume(); + } + }, 25); +} + +function sendMessage( + ws: WebSocket, + message: Record, + source?: Duplex, +): void { + if (ws.readyState !== 1) return; + ws.send(JSON.stringify(message), (error) => { + if (error && source && !source.destroyed) source.destroy(error); + }); + pauseForBackpressure(ws, source); +} + +function writeRemoteChunk( + target: ClientChannel, + chunk: Buffer, + ws: WebSocket, + closeTarget: () => void, +): void { + if (!target || target.destroyed) return; + if (target.writableLength > STREAM_WRITE_LIMIT) { + closeTarget(); + return; + } + if (!target.write(chunk)) { + ws.pause(); + target.once("drain", () => { + if (ws.readyState === 1) ws.resume(); + }); + } +} + +/** + * The host a client tunnel runs through. A desktop app synced with this + * server knows the host by its sync id, since numeric ids differ between the + * two databases, and must never fall back to a numeric id that could point + * at a different machine here. + */ +export async function resolveC2SSourceHostId( + tunnel: Pick, + findHostIdBySyncId: (syncId: string) => Promise, +): Promise { + const syncId = tunnel.sourceHostSyncId?.trim(); + if (syncId) { + const hostId = await findHostIdBySyncId(syncId); + if (!hostId) { + throw new Error("Endpoint SSH host was not found on the remote server"); + } + return hostId; + } + + if (!tunnel.sourceHostId) throw new Error("Endpoint SSH host is required"); + return tunnel.sourceHostId; +} + +function address(value: unknown, fallback: string): string { + const trimmed = typeof value === "string" ? value.trim() : ""; + return trimmed || fallback; +} + +interface ResolvedRelay { + name: string; + hostId: number; + mode: TunnelMode; + remoteAddress: string; + sourcePort: number; + endpointPort: number; +} + +/** + * The client tunnel relay: the desktop app listens locally and streams each + * connection over this socket, and the server forwards it through one of the + * user's hosts. Runs as the socket's user for every host lookup and connect. + */ +export function createC2SRelay(ctx: PluginContext) { + let streamCounter = 0; + + async function findHostIdBySyncId(syncId: string): Promise { + /* eslint-disable @typescript-eslint/no-explicit-any */ + const { hosts } = await ctx.db.refs<{ hosts: any }>(); + const drizzle = await ctx.db.client(); + /* eslint-enable @typescript-eslint/no-explicit-any */ + const { eq } = await import("drizzle-orm"); + const rows = await drizzle + .select({ id: hosts.id }) + .from(hosts) + .where(eq(hosts.syncId, syncId)) + .limit(1); + return rows[0]?.id ?? null; + } + + async function resolve(tunnel: C2SRelayTunnel): Promise { + const hostId = await resolveC2SSourceHostId(tunnel, findHostIdBySyncId); + const access = await ctx.hosts.checkAccess(hostId, "connect"); + if (!access.hasAccess) throw new Error("Access denied to this host"); + + return { + name: tunnel.name || `c2s:${hostId}`, + hostId, + mode: getTunnelMode({ + mode: tunnel.mode, + tunnelType: tunnel.tunnelType, + }), + remoteAddress: address( + tunnel.remoteAddress, + address(tunnel.targetHost, "127.0.0.1"), + ), + sourcePort: Number(tunnel.sourcePort) || 0, + endpointPort: Number(tunnel.endpointPort) || 0, + }; + } + + function connectSource(hostId: number): Promise> { + return ctx.ssh.connect(hostId, { + purpose: "tunnel", + timeoutMs: 60_000, + }); + } + + async function openRemote(ws: WebSocket, relay: ResolvedRelay) { + const bindHost = relay.remoteAddress; + const bindPort = relay.sourcePort; + if (!Number.isInteger(bindPort) || bindPort < 1 || bindPort > 65535) { + throw new Error("Invalid remote port"); + } + + const source = await connectSource(relay.hostId); + const sourceClient = source.client; + let actualPort: number; + try { + actualPort = await bindForwardIn(sourceClient, bindHost, bindPort); + } catch (error) { + source.dispose(); + throw error; + } + + const streams = new Map(); + let closed = false; + + const closeStream = (streamId: string) => { + const stream = streams.get(streamId); + if (!stream) return; + streams.delete(streamId); + try { + stream.destroy(); + } catch { + // Already gone. + } + }; + + const close = () => { + if (closed) return; + closed = true; + for (const streamId of [...streams.keys()]) closeStream(streamId); + unbindForwardIn(sourceClient, bindHost, actualPort, ctx.log); + source.dispose(); + }; + + sourceClient.on("tcp connection", (info, accept, reject) => { + if (info.destPort !== actualPort) { + reject(); + return; + } + const inbound = accept(); + const streamId = `${Date.now()}-${++streamCounter}`; + streams.set(streamId, inbound); + sendMessage(ws, { type: "connection", streamId }); + + inbound.on("data", (chunk: Buffer) => { + sendMessage( + ws, + { type: "data", streamId, data: chunk.toString("base64") }, + inbound, + ); + }); + inbound.on("close", () => { + streams.delete(streamId); + sendMessage(ws, { type: "close", streamId }); + }); + inbound.on("error", (error: Error) => { + streams.delete(streamId); + sendMessage(ws, { type: "close", streamId, error: error.message }); + }); + }); + + ws.on("message", (data, isBinary) => { + if (isBinary) return; + try { + const message = JSON.parse(data.toString()) as { + type?: string; + streamId?: string; + data?: string; + }; + if (!message.streamId) return; + const streamId = message.streamId; + if (message.type === "data" && message.data) { + const stream = streams.get(streamId); + if (stream) { + writeRemoteChunk( + stream, + Buffer.from(message.data, "base64"), + ws, + () => closeStream(streamId), + ); + } + } else if (message.type === "close") { + closeStream(streamId); + } + } catch (error) { + ctx.log.warn( + `Invalid client tunnel relay message for ${relay.name}: ${ + error instanceof Error ? error.message : String(error) + }`, + ); + } + }); + + ws.on("close", close); + ws.on("error", close); + sourceClient.on("close", () => { + if (ws.readyState === 1) ws.close(); + }); + sourceClient.on("error", (error: Error) => { + sendMessage(ws, { type: "error", error: error.message }); + if (ws.readyState === 1) ws.close(); + }); + + ctx.log.info( + `Client tunnel ${relay.name} bound ${bindHost}:${actualPort} on host ${relay.hostId}`, + ); + sendMessage(ws, { type: "ready", bindHost, bindPort: actualPort }); + } + + async function open(ws: WebSocket, message: C2SOpenMessage): Promise { + const relay = await resolve(message.tunnelConfig ?? {}); + if (relay.mode === "remote") { + await openRemote(ws, relay); + return; + } + + const targetHost = + relay.mode === "dynamic" ? message.targetHost : relay.remoteAddress; + const targetPort = + relay.mode === "dynamic" + ? Number(message.targetPort) + : relay.endpointPort; + if (!targetHost || !Number.isInteger(targetPort) || targetPort < 1) { + throw new Error("Invalid client tunnel target"); + } + + const source = await connectSource(relay.hostId); + let outbound: ClientChannel; + try { + outbound = await forwardOut(source.client, targetHost, targetPort); + } catch (error) { + source.dispose(); + throw error; + } + + const close = () => { + try { + outbound.destroy(); + } catch { + // Already gone. + } + source.dispose(); + }; + + outbound.on("data", (chunk: Buffer) => { + if (ws.readyState === 1) ws.send(chunk); + }); + outbound.on("close", () => { + if (ws.readyState === 1) ws.close(); + }); + outbound.on("error", () => { + if (ws.readyState === 1) ws.close(); + }); + ws.on("close", close); + ws.on("error", close); + ws.on("message", (data, isBinary) => { + if (!isBinary) return; + const chunk = Buffer.isBuffer(data) + ? data + : Array.isArray(data) + ? Buffer.concat(data) + : Buffer.from(data as ArrayBuffer); + outbound.write(chunk); + }); + + ws.send(JSON.stringify({ type: "ready" })); + } + + async function test(ws: WebSocket, message: C2SOpenMessage): Promise { + const relay = await resolve(message.tunnelConfig ?? {}); + const source = await connectSource(relay.hostId); + try { + if (relay.mode === "remote") { + const bindPort = relay.sourcePort; + if (!Number.isInteger(bindPort) || bindPort < 1 || bindPort > 65535) { + throw new Error("Invalid remote port"); + } + const actualPort = await bindForwardIn( + source.client, + relay.remoteAddress, + bindPort, + ); + unbindForwardIn(source.client, relay.remoteAddress, actualPort); + } else if (relay.mode === "local") { + if (!Number.isInteger(relay.endpointPort) || relay.endpointPort < 1) { + throw new Error("Invalid remote target port"); + } + const outbound = await forwardOut( + source.client, + relay.remoteAddress, + relay.endpointPort, + ); + outbound.destroy(); + } + sendMessage(ws, { type: "ready" }); + } finally { + source.dispose(); + } + } + + /** The ctx.ws.route handler. Core has already authenticated the socket. */ + return function handleConnection(ws: WebSocket, userId: string): void { + let opened = false; + + ws.on("error", (error: Error) => { + ctx.log.warn(`Client tunnel relay socket error: ${error.message}`); + }); + + ws.once("message", (raw) => { + void ctx + .asUser(userId, async () => { + if (!(await ctx.rbac.has("use"))) { + throw new Error("Access denied"); + } + const message = JSON.parse(raw.toString()) as C2SOpenMessage; + if (message.type !== "open" && message.type !== "test") { + throw new Error("Invalid client tunnel relay request"); + } + opened = true; + if (message.type === "test") await test(ws, message); + else await open(ws, message); + }) + .catch((error: unknown) => { + const message = describeC2SRelayError(error); + ctx.log.warn(`Failed to open client tunnel relay: ${message}`); + sendC2SError(ws, message); + ws.close(); + }); + }); + + ws.on("close", () => { + if (!opened) ctx.log.debug("Client tunnel relay closed before opening"); + }); + }; +} diff --git a/plugins/tunnels/src/backend/config.ts b/plugins/tunnels/src/backend/config.ts new file mode 100644 index 000000000..a425edbf2 --- /dev/null +++ b/plugins/tunnels/src/backend/config.ts @@ -0,0 +1,172 @@ +import type { + PluginContext, + PluginHostSummary, +} from "@termix/plugin-sdk/backend"; +import type { + TunnelConfig, + TunnelConnectRequest, + TunnelConnection, +} from "./types.js"; +import { serverTunnelName } from "../shared/tunnel-naming.js"; +import { + findHostByTunnelEndpoint, + getTunnelMode, + isSingleHostTunnel, + parseTunnelName, +} from "./utils.js"; + +export function hostLabel(host: { + name?: string | null; + username: string; + ip: string; +}): string { + return host.name || `${host.username}@${host.ip}`; +} + +/** The name a host's saved tunnel runs under. */ +export function savedTunnelName( + host: PluginHostSummary, + index: number, + connection: Pick< + TunnelConnection, + "sourcePort" | "endpointHost" | "endpointPort" + >, +): string { + return serverTunnelName(host, index, connection); +} + +/** + * Builds the runtime config for a tunnel from what the client or a host's + * saved list says about it. Credentials are never part of it: both legs + * resolve theirs through ctx.ssh as `userId`. + */ +export function buildTunnelConfig( + host: PluginHostSummary, + request: Omit, + userId: string, +): TunnelConfig { + const mode = getTunnelMode(request); + return { + name: request.name, + scope: request.scope || "s2s", + mode, + tunnelType: request.tunnelType || (mode === "remote" ? "remote" : "local"), + bindHost: request.bindHost, + targetHost: request.targetHost, + sourceHostId: host.id, + tunnelIndex: request.tunnelIndex, + requestingUserId: userId, + hostName: hostLabel(host), + sourceIP: host.ip, + sourceSSHPort: host.port, + sourceUsername: host.username, + endpointHost: (request.endpointHost ?? "").trim(), + sourcePort: Number(request.sourcePort), + endpointPort: Number(request.endpointPort), + maxRetries: Number(request.maxRetries) || 3, + retryInterval: (Number(request.retryInterval) || 5) * 1000, + autoStart: Boolean(request.autoStart), + }; +} + +export function connectionToRequest( + host: PluginHostSummary, + index: number, + connection: TunnelConnection, +): Omit { + return { + name: savedTunnelName(host, index, connection), + tunnelIndex: index, + scope: connection.scope || "s2s", + mode: connection.mode, + tunnelType: connection.tunnelType, + bindHost: connection.bindHost, + targetHost: connection.targetHost, + endpointHost: connection.endpointHost, + sourcePort: connection.sourcePort, + endpointPort: connection.endpointPort, + maxRetries: connection.maxRetries, + retryInterval: connection.retryInterval, + autoStart: connection.autoStart, + }; +} + +/** + * Fills in the endpoint leg from the user's own host list. A local or + * dynamic tunnel whose endpoint is not a saved host just forwards to that + * address through the source; a remote tunnel needs a real SSH host there. + * Must run as the tunnel's user. + */ +export async function resolveEndpoint( + ctx: PluginContext, + config: TunnelConfig, +): Promise { + if (isSingleHostTunnel(config)) return config; + + const hosts = await ctx.hosts.list(); + const endpoint = findHostByTunnelEndpoint(hosts, config.endpointHost); + + if (!endpoint) { + if (getTunnelMode(config) === "remote") { + throw new Error( + `Endpoint host '${config.endpointHost}' not found in database`, + ); + } + return { ...config, endpointIP: config.endpointIP || config.endpointHost }; + } + + const access = await ctx.hosts.checkAccess(endpoint.id, "connect"); + if (!access.hasAccess) throw new Error("Endpoint host not found"); + + return { + ...config, + endpointHostId: endpoint.id, + endpointIP: endpoint.ip, + endpointSSHPort: endpoint.port, + endpointUsername: endpoint.username, + }; +} + +/** A host's saved tunnel list, as its host setting holds it. */ +export function readTunnelConnections(value: unknown): TunnelConnection[] { + let parsed = value; + if (typeof parsed === "string") { + try { + parsed = JSON.parse(parsed); + } catch { + return []; + } + } + return Array.isArray(parsed) ? (parsed as TunnelConnection[]) : []; +} + +/** + * The saved tunnel a name points at, for starting one by name alone + * (automations). Must run as the user it is for. + */ +export async function findSavedTunnel( + ctx: PluginContext, + name: string, +): Promise<{ + host: PluginHostSummary; + index: number; + connection: TunnelConnection; +} | null> { + const parsed = parseTunnelName(name); + if (parsed.isLegacyFormat || parsed.hostId === undefined) return null; + const index = parsed.tunnelIndex ?? -1; + + const host = await ctx.hosts.get(parsed.hostId); + if (!host) return null; + if (!(await ctx.settings.getHost(host.id, "enableTunnel"))) { + return null; + } + + const connections = readTunnelConnections( + await ctx.settings.getHost(host.id, "tunnelConnections"), + ); + const connection = connections[index]; + if (!connection) return null; + if (savedTunnelName(host, index, connection) !== name) return null; + return { host, index, connection }; +} diff --git a/plugins/tunnels/src/backend/index.ts b/plugins/tunnels/src/backend/index.ts new file mode 100644 index 000000000..b0bab12b2 --- /dev/null +++ b/plugins/tunnels/src/backend/index.ts @@ -0,0 +1,50 @@ +import type { Router } from "express"; +import type { WebSocket } from "ws"; +import type { PluginContext } from "@termix/plugin-sdk/backend"; +import { presets } from "./tables.js"; +import { createPresetRepository } from "./repository.js"; +import { createTunnelManager } from "./manager.js"; +import { registerTunnelRoutes } from "./routes.js"; +import { createC2SRelay } from "./c2s-relay.js"; +import { createTunnelsService } from "./service.js"; +import { startAutoStartTunnels } from "./autostart.js"; + +export type { + TunnelsAccess, + TunnelForwardHandle, + TunnelForwardTarget, +} from "./service.js"; + +// Long enough for core's host settings migration, which runs right after +// plugins activate, to have copied the saved tunnels across on an upgrade. +const AUTOSTART_DELAY_MS = 3000; + +export async function activate(ctx: PluginContext) { + const table = await ctx.db.define(presets); + const repository = createPresetRepository(ctx.db, table); + + const manager = createTunnelManager(ctx); + ctx.disposables.add(() => manager.dispose()); + + registerTunnelRoutes(ctx.http.router(), ctx, manager, repository); + + const relay = createC2SRelay(ctx); + ctx.ws.route("/c2s/stream", (connection) => + relay(connection.socket as WebSocket, connection.userId), + ); + + ctx.services.provide("tunnels.access", createTunnelsService(ctx, manager)); + + // Deferred so activation is not held up by SSH handshakes. + const autostart = setTimeout(() => { + void startAutoStartTunnels(ctx, manager); + }, AUTOSTART_DELAY_MS); + autostart.unref?.(); + ctx.disposables.add(() => clearTimeout(autostart)); + + ctx.log.info("Tunnel routes mounted at /plugin-api/tunnels"); +} + +export async function deactivate() { + // Everything above was registered through ctx and is disposed by core. +} diff --git a/plugins/tunnels/src/backend/manager.ts b/plugins/tunnels/src/backend/manager.ts new file mode 100644 index 000000000..a0bda97c7 --- /dev/null +++ b/plugins/tunnels/src/backend/manager.ts @@ -0,0 +1,838 @@ +import { createServer, Socket, type Server } from "node:net"; +import type { Client, ClientChannel } from "ssh2"; +import type { + PluginContext, + PluginSshConnection, +} from "@termix/plugin-sdk/backend"; +import { + CONNECTION_STATES, + type TunnelConfig, + type TunnelStatus, +} from "./types.js"; +import { + bindForwardIn, + forwardOut, + pipeTunnelStreams, + unbindForwardIn, +} from "./ssh-primitives.js"; +import { handleSocks5Connect } from "./socks5-relay.js"; +import { + classifyTunnelError, + getTunnelBindHost, + getTunnelMode, + getTunnelScope, + isReservedTunnelName, + resolveS2SLocalTargetHost, + shouldEstablishDirectTunnel, +} from "./utils.js"; + +export interface TunnelRuntime { + sourceClient: Client; + endpointClient?: Client; + bindHost: string; + bindPort: number; + close: () => void; +} + +/** A status snapshot as a user sees it, keyed by tunnel name. */ +export type TunnelStatusMap = Record; + +const CONNECT_TIMEOUT_MS = 60_000; +const MANUAL_DISCONNECT_HOLD_MS = 5_000; +const ACCESS_CACHE_MS = 60_000; + +export function errorMessage( + error: unknown, + fallback = "Unknown error", +): string { + if (error instanceof Error && error.message) return error.message; + if (typeof error === "string" && error) return error; + return fallback; +} + +export type TunnelManager = ReturnType; + +/** + * Every running tunnel and its retry state, created fresh in activate so a + * disable-then-enable starts clean. + * + * Both SSH legs go through ctx.ssh.connect, so tunnels get host key checks, + * auth providers, proxies and jump hosts the same way every other transport + * does. The endpoint leg of a source-to-endpoint tunnel is opened over a + * forwardOut channel on the source connection, handed to ctx.ssh as `sock`. + */ +export function createTunnelManager(ctx: PluginContext) { + const log = ctx.log; + + const configs = new Map(); + const statuses = new Map(); + const runtimes = new Map(); + const retryCounters = new Map(); + const retryTimers = new Map(); + const countdownTimers = new Map(); + const manualDisconnects = new Set(); + const manualHoldTimers = new Set(); + const retryExhausted = new Set(); + const cleanupInProgress = new Set(); + const connecting = new Set(); + const lastErrors = new Map(); + const lastErrorTypes = new Map(); + const pendingOperations = new Map>(); + const listeners = new Set<() => void>(); + const accessCache = new Map(); + let disposed = false; + + function notify(): void { + for (const listener of listeners) { + try { + listener(); + } catch (error) { + log.warn(`Tunnel status listener failed: ${errorMessage(error)}`); + } + } + } + + function broadcast(name: string, status: TunnelStatus): void { + if ( + status.status === CONNECTION_STATES.CONNECTED && + retryTimers.has(name) + ) { + return; + } + + const next = { ...status }; + + if (retryExhausted.has(name) && next.status === CONNECTION_STATES.FAILED) { + const previous = lastErrors.get(name); + next.reason = previous + ? `Max retries exhausted: ${previous}` + : "Max retries exhausted"; + } + + if (next.status === CONNECTION_STATES.FAILED && next.reason) { + lastErrors.set(name, next.reason); + if (next.errorType) lastErrorTypes.set(name, next.errorType); + } else if ( + (next.status === CONNECTION_STATES.CONNECTING || + next.status === CONNECTION_STATES.RETRYING || + next.status === CONNECTION_STATES.WAITING) && + !next.reason + ) { + next.reason = lastErrors.get(name); + next.errorType = lastErrorTypes.get(name); + } else if ( + next.status === CONNECTION_STATES.CONNECTED || + (next.status === CONNECTION_STATES.DISCONNECTED && next.manualDisconnect) + ) { + lastErrors.delete(name); + lastErrorTypes.delete(name); + } + + statuses.set(name, next); + ctx.events.emit("plugin.tunnels.status", { + name, + sourceHostId: configs.get(name)?.sourceHostId, + status: next, + }); + notify(); + } + + function clearRetryTimers(name: string): void { + const retry = retryTimers.get(name); + if (retry) { + clearTimeout(retry); + retryTimers.delete(name); + } + const countdown = countdownTimers.get(name); + if (countdown) { + clearInterval(countdown); + countdownTimers.delete(name); + } + } + + function resetRetryState(name: string): void { + retryCounters.delete(name); + retryExhausted.delete(name); + lastErrors.delete(name); + lastErrorTypes.delete(name); + cleanupInProgress.delete(name); + connecting.delete(name); + clearRetryTimers(name); + } + + async function cleanup(name: string, force = false): Promise { + if (cleanupInProgress.has(name)) return; + if (!force && connecting.has(name)) return; + + cleanupInProgress.add(name); + const runtime = runtimes.get(name); + if (runtime) { + runtimes.delete(name); + try { + runtime.close(); + } catch (error) { + log.error( + `Error while closing tunnel ${name}`, + error instanceof Error ? error : undefined, + ); + } + } + cleanupInProgress.delete(name); + clearRetryTimers(name); + } + + /** One SSH leg, as the tunnel's owner, through core's connect pipeline. */ + async function openLeg( + userId: string, + hostId: number, + sock?: ClientChannel, + ): Promise> { + return ctx.asUser(userId, () => + ctx.ssh.connect(hostId, { + purpose: "tunnel", + timeoutMs: CONNECT_TIMEOUT_MS, + sock, + }), + ); + } + + function directTargetHost(config: TunnelConfig): string { + const target = config.targetHost?.trim(); + if (target) return target; + if ( + config.endpointHostId !== undefined && + config.endpointHostId === config.sourceHostId + ) { + return "127.0.0.1"; + } + return config.endpointHost || "127.0.0.1"; + } + + async function establishDirect( + source: PluginSshConnection, + config: TunnelConfig, + ): Promise { + const sourceClient = source.client; + const name = config.name; + const mode = getTunnelMode(config); + const bindHost = getTunnelBindHost(config); + const targetHost = directTargetHost(config); + const targetPort = config.endpointPort; + + if (mode === "remote") { + const remoteBindPort = await bindForwardIn( + sourceClient, + targetHost, + config.sourcePort, + ); + const sockets = new Set(); + const onTcp = ( + info: { destPort: number }, + accept: () => ClientChannel, + reject: () => void, + ) => { + if (info.destPort !== remoteBindPort) { + reject(); + return; + } + const inbound = accept(); + const local = new Socket(); + sockets.add(local); + local.connect(targetPort, bindHost, () => { + pipeTunnelStreams(inbound, Promise.resolve(local), name, log); + }); + local.on("error", () => { + inbound.destroy(); + sockets.delete(local); + }); + local.on("close", () => sockets.delete(local)); + }; + sourceClient.on("tcp connection", onTcp); + + return { + sourceClient, + bindHost: targetHost, + bindPort: remoteBindPort, + close: () => { + sourceClient.off("tcp connection", onTcp); + unbindForwardIn(sourceClient, targetHost, remoteBindPort, log); + for (const socket of sockets) socket.destroy(); + sockets.clear(); + source.dispose(); + }, + }; + } + + // Local and dynamic: listen here, forward through the source. + const sockets = new Set(); + const server: Server = createServer((socket) => { + sockets.add(socket); + socket.on("close", () => sockets.delete(socket)); + socket.on("error", () => { + sockets.delete(socket); + socket.destroy(); + }); + + if (mode === "dynamic") { + handleSocks5Connect( + socket, + (host, port) => forwardOut(sourceClient, host, port), + name, + log, + ); + return; + } + + forwardOut(sourceClient, targetHost, targetPort) + .then((outbound) => + pipeTunnelStreams(socket, Promise.resolve(outbound), name, log), + ) + .catch(() => socket.destroy()); + }); + + const boundPort = await new Promise((resolve, reject) => { + server.once("error", reject); + server.listen({ host: bindHost, port: config.sourcePort }, () => { + server.removeListener("error", reject); + // With port 0 the kernel picks, so report what was actually bound. + resolve((server.address() as { port: number }).port); + }); + }); + + let idleTimer: NodeJS.Timeout | undefined; + const close = () => { + if (idleTimer) clearInterval(idleTimer); + for (const socket of sockets) socket.destroy(); + sockets.clear(); + server.close(); + source.dispose(); + }; + + // On-demand tunnels close themselves once nothing has used them for a + // while. The socket set only exists in here, so the timer does too. + if (config.idleTimeoutMs && config.idleTimeoutMs > 0) { + const idleTimeoutMs = config.idleTimeoutMs; + let idleSince: number | null = Date.now(); + idleTimer = setInterval( + () => { + if (sockets.size > 0) { + idleSince = null; + return; + } + if (idleSince === null) { + idleSince = Date.now(); + return; + } + if (Date.now() - idleSince < idleTimeoutMs) return; + // Acts by name, so skip it if a reopen already replaced this one. + if (runtimes.get(name)?.sourceClient !== sourceClient) return; + log.info(`Closing idle tunnel ${name}`); + void cleanup(name, true); + }, + Math.min(30_000, idleTimeoutMs), + ); + idleTimer.unref(); + } + + log.info( + `Tunnel ${name} listening on ${bindHost}:${boundPort} (${mode}) to ${targetHost}:${targetPort}`, + ); + + return { sourceClient, bindHost, bindPort: boundPort, close }; + } + + async function establishManaged( + source: PluginSshConnection, + config: TunnelConfig, + ): Promise { + const sourceClient = source.client; + const name = config.name; + if (config.endpointHostId === undefined || !config.endpointIP) { + throw new Error("Endpoint host not found"); + } + + const channel = await forwardOut( + sourceClient, + config.endpointIP, + config.endpointSSHPort ?? 22, + ); + let endpoint: PluginSshConnection; + try { + endpoint = await openLeg( + config.requestingUserId, + config.endpointHostId, + channel, + ); + } catch (error) { + channel.destroy(); + throw error; + } + const endpointClient = endpoint.client; + + const mode = getTunnelMode(config); + const bindHost = getTunnelBindHost(config); + const bindClient = mode === "remote" ? endpointClient : sourceClient; + const outboundClient = mode === "remote" ? sourceClient : endpointClient; + const bindPort = + mode === "remote" ? config.endpointPort : config.sourcePort; + const targetHost = + mode === "remote" + ? config.targetHost || "127.0.0.1" + : resolveS2SLocalTargetHost(config); + const targetPort = + mode === "remote" ? config.sourcePort : config.endpointPort; + + let actualPort: number; + try { + actualPort = await bindForwardIn(bindClient, bindHost, bindPort); + } catch (error) { + endpoint.dispose(); + throw error; + } + + const onTcp = ( + info: { destPort: number }, + accept: () => ClientChannel, + reject: () => void, + ) => { + if (info.destPort !== actualPort) { + reject(); + return; + } + const inbound = accept(); + if (mode === "dynamic") { + handleSocks5Connect( + inbound, + (host, port) => forwardOut(outboundClient, host, port), + name, + log, + ); + return; + } + pipeTunnelStreams( + inbound, + forwardOut(outboundClient, targetHost, targetPort), + name, + log, + ); + }; + bindClient.on("tcp connection", onTcp); + + // Losing the endpoint leg makes the tunnel useless, so let the source + // close too and the usual disconnect handling take it from there. + endpointClient.once("close", () => { + if (runtimes.get(name)?.endpointClient === endpointClient) { + source.dispose(); + } + }); + + log.info( + `Tunnel ${name} bound ${bindHost}:${actualPort} (${mode}) to ${targetHost}:${targetPort}`, + ); + + return { + sourceClient, + endpointClient, + bindHost, + bindPort: actualPort, + close: () => { + bindClient.off("tcp connection", onTcp); + unbindForwardIn(bindClient, bindHost, actualPort, log); + endpoint.dispose(); + source.dispose(); + }, + }; + } + + async function establish(config: TunnelConfig): Promise { + const source = await openLeg(config.requestingUserId, config.sourceHostId); + try { + return shouldEstablishDirectTunnel(config) + ? await establishDirect(source, config) + : await establishManaged(source, config); + } catch (error) { + source.dispose(); + throw error; + } + } + + /** Reacts to the source connection dropping after the tunnel was up. */ + function watch(runtime: TunnelRuntime, config: TunnelConfig): void { + const name = config.name; + const client = runtime.sourceClient; + client.on("error", (error: Error) => { + log.warn(`Tunnel ${name} connection error: ${error.message}`); + }); + client.once("close", () => { + if (runtimes.get(name)?.sourceClient !== client) return; + if (retryTimers.has(name)) return; + if (!manualDisconnects.has(name)) { + const current = statuses.get(name); + if (current?.status !== CONNECTION_STATES.FAILED) { + broadcast(name, { + connected: false, + status: CONNECTION_STATES.DISCONNECTED, + }); + } + } + void handleDisconnect(name, config, !manualDisconnects.has(name), client); + }); + } + + async function handleDisconnect( + name: string, + config: TunnelConfig | null, + shouldRetry = true, + closingClient?: Client, + ): Promise { + if (isReservedTunnelName(name)) { + // On-demand tunnels are reopened by whoever needs them, never retried + // here. A deferred close for a client that a reopen already replaced + // must not tear down the replacement. + const current = runtimes.get(name); + if (closingClient && current && current.sourceClient !== closingClient) { + return; + } + await cleanup(name, true); + return; + } + + while (cleanupInProgress.has(name)) { + await new Promise((resolve) => setTimeout(resolve, 100)); + } + await cleanup(name); + + if (manualDisconnects.has(name)) { + resetRetryState(name); + broadcast(name, { + connected: false, + status: CONNECTION_STATES.DISCONNECTED, + manualDisconnect: true, + }); + return; + } + + // Past the manual branch, so this is a drop nobody asked for. + if (config?.requestingUserId) { + ctx.events.emit("plugin.tunnels.tunnel_disconnected", { + userId: config.requestingUserId, + hostId: config.sourceHostId, + tunnelName: name, + }); + } + + if (retryExhausted.has(name)) { + broadcast(name, { + connected: false, + status: CONNECTION_STATES.FAILED, + reason: "Max retries already exhausted", + }); + return; + } + + if (retryTimers.has(name) || disposed) return; + + if (!shouldRetry || !config) { + // Keep the reason the failure was just reported with. + broadcast(name, { + connected: false, + status: CONNECTION_STATES.FAILED, + reason: lastErrors.get(name), + errorType: lastErrorTypes.get(name), + }); + return; + } + + const maxRetries = config.maxRetries || 3; + const retryInterval = config.retryInterval || 5000; + const retryCount = (retryCounters.get(name) || 0) + 1; + + if (retryCount > maxRetries) { + log.error(`All ${maxRetries} retries failed for ${name}`); + retryExhausted.add(name); + retryCounters.delete(name); + broadcast(name, { + connected: false, + status: CONNECTION_STATES.FAILED, + retryExhausted: true, + reason: "Max retries exhausted", + }); + return; + } + + retryCounters.set(name, retryCount); + broadcast(name, { + connected: false, + status: CONNECTION_STATES.RETRYING, + retryCount, + maxRetries, + nextRetryIn: retryInterval / 1000, + }); + + let nextRetryIn = Math.ceil(retryInterval / 1000); + broadcast(name, { + connected: false, + status: CONNECTION_STATES.WAITING, + retryCount, + maxRetries, + nextRetryIn, + }); + + countdownTimers.set( + name, + setInterval(() => { + nextRetryIn--; + if (nextRetryIn > 0) { + broadcast(name, { + connected: false, + status: CONNECTION_STATES.WAITING, + retryCount, + maxRetries, + nextRetryIn, + }); + } + }, 1000), + ); + + retryTimers.set( + name, + setTimeout(() => { + clearRetryTimers(name); + if (!manualDisconnects.has(name)) { + void connect(config, retryCount); + } + }, retryInterval), + ); + } + + /** + * Opens a tunnel. Failures are reported over the status broadcast and + * retried there, so by default this never rejects. `throwOnError` is for a + * caller that waits on the result (forward()), which gets the runtime back. + */ + async function connect( + config: TunnelConfig, + retryAttempt = 0, + options: { throwOnError?: boolean } = {}, + ): Promise { + const name = config.name; + if (manualDisconnects.has(name) || disposed) return null; + + connecting.add(name); + await cleanup(name, true); + + if (retryAttempt === 0) { + retryExhausted.delete(name); + retryCounters.delete(name); + } + + const current = statuses.get(name); + if (!current || current.status !== CONNECTION_STATES.WAITING) { + broadcast(name, { + connected: false, + status: CONNECTION_STATES.CONNECTING, + retryCount: retryAttempt > 0 ? retryAttempt : undefined, + }); + } + + try { + if (getTunnelScope(config) !== "s2s") { + throw new Error( + "Client tunnels must be started from the desktop app's local configuration", + ); + } + + const runtime = await establish(config); + connecting.delete(name); + + if (manualDisconnects.has(name) || disposed) { + runtime.close(); + return null; + } + + runtimes.set(name, runtime); + watch(runtime, config); + broadcast(name, { connected: true, status: CONNECTION_STATES.CONNECTED }); + return runtime; + } catch (error) { + connecting.delete(name); + const message = errorMessage(error, "Failed to create tunnel"); + const errorType = classifyTunnelError(message); + log.error( + `Tunnel ${name} failed to connect: ${message}`, + error instanceof Error ? error : undefined, + ); + + if (!manualDisconnects.has(name)) { + broadcast(name, { + connected: false, + status: CONNECTION_STATES.FAILED, + errorType, + reason: message, + }); + } + + const shouldNotRetry = + errorType === "AUTHENTICATION_FAILED" || + errorType === "CONNECTION_FAILED" || + manualDisconnects.has(name) || + options.throwOnError === true; + await handleDisconnect(name, config, !shouldNotRetry); + + if (options.throwOnError) throw error; + return null; + } + } + + /** Stops a tunnel on request. Holds off retries for a few seconds. */ + async function stop(name: string): Promise { + const config = configs.get(name) ?? null; + manualDisconnects.add(name); + retryCounters.delete(name); + retryExhausted.delete(name); + clearRetryTimers(name); + + await cleanup(name, true); + broadcast(name, { + connected: false, + status: CONNECTION_STATES.DISCONNECTED, + manualDisconnect: true, + }); + await handleDisconnect(name, config, false); + + const hold = setTimeout(() => { + manualHoldTimers.delete(hold); + manualDisconnects.delete(name); + }, MANUAL_DISCONNECT_HOLD_MS); + manualHoldTimers.add(hold); + } + + /** + * Starts a configured tunnel by name, waiting for any operation already in + * flight for it first. The start itself is not awaited: its outcome comes + * back over the status stream. + */ + async function start(config: TunnelConfig): Promise { + const name = config.name; + const pending = pendingOperations.get(name); + if (pending) { + await pending.catch(() => undefined); + } + + const existing = configs.get(name); + if ( + existing && + (existing.sourceHostId !== config.sourceHostId || + existing.tunnelIndex !== config.tunnelIndex) + ) { + throw new Error(`Tunnel name collision detected: ${name}`); + } + + manualDisconnects.delete(name); + retryCounters.delete(name); + retryExhausted.delete(name); + configs.set(name, config); + + const operation = connect(config, 0).then(() => undefined); + pendingOperations.set(name, operation); + void operation.finally(() => { + if (pendingOperations.get(name) === operation) { + pendingOperations.delete(name); + } + }); + } + + /** Whether `userId` can reach `hostId`, cached briefly so broadcasts stay cheap. */ + async function canAccessHost( + userId: string, + hostId: number, + ): Promise { + const cacheKey = `${userId}:${hostId}`; + const cached = accessCache.get(cacheKey); + if (cached && Date.now() - cached.at < ACCESS_CACHE_MS) { + return cached.allowed; + } + let allowed = false; + try { + const access = + ctx.currentActor() === userId + ? await ctx.hosts.checkAccess(hostId, "connect") + : await ctx.asUser(userId, () => + ctx.hosts.checkAccess(hostId, "connect"), + ); + allowed = access.hasAccess; + } catch { + allowed = false; + } + accessCache.set(cacheKey, { allowed, at: Date.now() }); + return allowed; + } + + /** + * Status of every tunnel whose source host the user can reach. Names carry + * host labels and endpoints and errors can name internal hosts, so nothing + * else is shown. On-demand tunnels are never listed. + */ + async function statusesFor(userId: string): Promise { + const result: TunnelStatusMap = {}; + for (const [name, status] of statuses) { + if (isReservedTunnelName(name)) continue; + const hostId = configs.get(name)?.sourceHostId; + if (hostId === undefined) continue; + if (await canAccessHost(userId, hostId)) result[name] = status; + } + return result; + } + + async function canAccessTunnel( + userId: string, + name: string, + ): Promise { + const hostId = configs.get(name)?.sourceHostId; + if (hostId === undefined) return false; + return canAccessHost(userId, hostId); + } + + function onChange(listener: () => void): () => void { + listeners.add(listener); + return () => listeners.delete(listener); + } + + function dispose(): void { + disposed = true; + for (const name of [...runtimes.keys()]) { + const runtime = runtimes.get(name); + runtimes.delete(name); + try { + runtime?.close(); + } catch { + // Already gone. + } + } + for (const name of [...retryTimers.keys(), ...countdownTimers.keys()]) { + clearRetryTimers(name); + } + for (const hold of manualHoldTimers) clearTimeout(hold); + manualHoldTimers.clear(); + listeners.clear(); + } + + return { + configs, + statuses, + runtimes, + manualDisconnects, + connecting, + broadcast, + cleanup, + connect, + start, + stop, + handleDisconnect, + statusesFor, + canAccessHost, + canAccessTunnel, + onChange, + dispose, + }; +} diff --git a/plugins/tunnels/src/backend/repository.ts b/plugins/tunnels/src/backend/repository.ts new file mode 100644 index 000000000..caae9ff30 --- /dev/null +++ b/plugins/tunnels/src/backend/repository.ts @@ -0,0 +1,133 @@ +import { and, asc, eq, ne } from "drizzle-orm"; +import type { PluginDatabase } from "@termix/plugin-sdk/backend"; + +export interface PresetRecord { + id: number; + userId: string; + name: string; + config: string; + platform: string | null; + computerName: string | null; + createdAt: string; + updatedAt: string; +} + +export interface PresetCreateInput { + name: string; + config: string; + platform?: string | null; + computerName?: string | null; +} + +export type PresetUpdateInput = Partial; + +/* eslint-disable @typescript-eslint/no-explicit-any */ +// The table comes from ctx.db.define, which the SDK hands back untyped, and +// the drizzle handle is the server's own. Typed at this module's edge instead. +type Table = any; +type Drizzle = any; +/* eslint-enable @typescript-eslint/no-explicit-any */ + +export type PresetRepository = ReturnType; + +/** + * Per-user client tunnel presets. + * + * No RETURNING, so it runs the same on all three engines: a new row is read + * back as the newest row for that user and name, which the name check before + * every insert keeps unique. + */ +export function createPresetRepository(db: PluginDatabase, table: Table) { + const client = () => db.client(); + + async function findByIdForUser( + userId: string, + id: number, + ): Promise { + const drizzle = await client(); + const rows = await drizzle + .select() + .from(table) + .where(and(eq(table.id, id), eq(table.userId, userId))) + .limit(1); + return (rows[0] as PresetRecord) ?? null; + } + + return { + findByIdForUser, + + async listByUserId(userId: string): Promise { + const drizzle = await client(); + return drizzle + .select() + .from(table) + .where(eq(table.userId, userId)) + .orderBy(asc(table.name)); + }, + + async hasNameForUser( + userId: string, + name: string, + excludingId?: number, + ): Promise { + const drizzle = await client(); + const conditions = [eq(table.userId, userId), eq(table.name, name)]; + if (excludingId !== undefined) conditions.push(ne(table.id, excludingId)); + const rows = await drizzle + .select({ id: table.id }) + .from(table) + .where(and(...conditions)) + .limit(1); + return rows.length > 0; + }, + + async createForUser( + userId: string, + input: PresetCreateInput, + now = new Date().toISOString(), + ): Promise { + const drizzle = await client(); + await drizzle.insert(table).values({ + userId, + name: input.name, + config: input.config, + platform: input.platform ?? null, + computerName: input.computerName ?? null, + createdAt: now, + updatedAt: now, + }); + await db.persist(); + const rows = await drizzle + .select() + .from(table) + .where(and(eq(table.userId, userId), eq(table.name, input.name))) + .limit(1); + return rows[0] as PresetRecord; + }, + + async updateForUser( + userId: string, + id: number, + updates: PresetUpdateInput, + now = new Date().toISOString(), + ): Promise { + const drizzle = await client(); + await drizzle + .update(table) + .set({ ...updates, updatedAt: now }) + .where(and(eq(table.id, id), eq(table.userId, userId))); + await db.persist(); + return findByIdForUser(userId, id); + }, + + async deleteForUser(userId: string, id: number): Promise { + if (!(await findByIdForUser(userId, id))) return false; + const drizzle = await client(); + await drizzle + .delete(table) + .where(and(eq(table.id, id), eq(table.userId, userId))); + await db.persist(); + return true; + }, + }; +} diff --git a/plugins/tunnels/src/backend/routes.ts b/plugins/tunnels/src/backend/routes.ts new file mode 100644 index 000000000..2d8299c74 --- /dev/null +++ b/plugins/tunnels/src/backend/routes.ts @@ -0,0 +1,588 @@ +import type { Request, Response, Router } from "express"; +import type { PluginContext } from "@termix/plugin-sdk/backend"; +import { + CONNECTION_STATES, + type TunnelConnectRequest, + type TunnelConnection, +} from "./types.js"; +import type { TunnelManager } from "./manager.js"; +import { errorMessage } from "./manager.js"; +import type { PresetRecord, PresetRepository } from "./repository.js"; +import { + RESERVED_TUNNEL_NAME_PREFIX, + isReservedTunnelName, + validateTunnelConfig, +} from "./utils.js"; +import { authorizeTunnelAction } from "./authorize.js"; +import { buildTunnelConfig, resolveEndpoint } from "./config.js"; + +function actor(ctx: PluginContext): string { + // Core's plugin router authenticates every request and runs it as that user. + return ctx.currentActor() as string; +} + +function isNonEmptyString(value: unknown): value is string { + return typeof value === "string" && value.trim().length > 0; +} + +function parsePreset(row: PresetRecord) { + let config: TunnelConnection[] = []; + try { + config = JSON.parse(row.config) as TunnelConnection[]; + } catch { + config = []; + } + return { ...row, config }; +} + +/** Every item must be a client tunnel with a known mode and valid ports. */ +export function validatePresetConfig( + config: unknown, +): config is TunnelConnection[] { + if (!Array.isArray(config)) return false; + return config.every((item) => { + if (!item || typeof item !== "object") return false; + const tunnel = item as Partial; + const mode = tunnel.mode || tunnel.tunnelType; + return ( + tunnel.scope === "c2s" && + (mode === "local" || mode === "remote" || mode === "dynamic") && + typeof tunnel.sourcePort === "number" && + tunnel.sourcePort >= 1 && + tunnel.sourcePort <= 65535 && + (mode === "dynamic" || + (typeof tunnel.endpointPort === "number" && + tunnel.endpointPort >= 1 && + tunnel.endpointPort <= 65535)) + ); + }); +} + +function trimmedOrNull(value: unknown): string | null { + return typeof value === "string" && value.trim() ? value.trim() : null; +} + +/** + * Mounts the tunnel routes on the plugin's router, which core serves at + * /plugin-api/tunnels with auth in front. Every route needs tunnels.use. + */ +export function registerTunnelRoutes( + router: Router, + ctx: PluginContext, + manager: TunnelManager, + presets: PresetRepository, +): void { + router.use(ctx.rbac.require("use") as never); + + const statusClients = new Map(); + + const sendSnapshot = (res: Response) => { + const userId = statusClients.get(res); + if (userId === undefined) return; + void manager + .statusesFor(userId) + .then((snapshot) => { + res.write(`event: statuses\ndata: ${JSON.stringify(snapshot)}\n\n`); + }) + .catch(() => { + statusClients.delete(res); + }); + }; + + const unsubscribe = manager.onChange(() => { + for (const res of statusClients.keys()) sendSnapshot(res); + }); + ctx.disposables.add(() => { + unsubscribe(); + for (const res of statusClients.keys()) { + try { + res.end(); + } catch { + // Already closed. + } + } + statusClients.clear(); + }); + + const canAccess = (userId: string) => (hostId: number) => + manager.canAccessHost(userId, hostId); + + /** + * @openapi + * /plugin-api/tunnels/status: + * get: + * summary: Get tunnel statuses + * description: Returns the status of every tunnel whose source host the caller can reach. + * tags: + * - Tunnels + * responses: + * 200: + * description: Tunnel statuses keyed by tunnel name. + * 403: + * description: Missing the tunnels.use permission. + */ + router.get("/status", async (_req: Request, res: Response) => { + res.json(await manager.statusesFor(actor(ctx))); + }); + + /** + * @openapi + * /plugin-api/tunnels/status/stream: + * get: + * summary: Stream tunnel statuses + * description: Server-sent events. Sends a "statuses" event with the full snapshot the caller can see on connect and after every change. + * tags: + * - Tunnels + * responses: + * 200: + * description: An event stream. + * 403: + * description: Missing the tunnels.use permission. + */ + router.get("/status/stream", (req: Request, res: Response) => { + res.writeHead(200, { + "Content-Type": "text/event-stream", + "Cache-Control": "no-store, no-transform", + Connection: "keep-alive", + "X-Accel-Buffering": "no", + }); + res.flushHeaders?.(); + + statusClients.set(res, actor(ctx)); + sendSnapshot(res); + + const heartbeat = setInterval(() => { + try { + res.write(": keepalive\n\n"); + } catch { + closeStream(); + } + }, 30_000); + + const closeStream = () => { + clearInterval(heartbeat); + statusClients.delete(res); + }; + + req.on("close", closeStream); + }); + + /** + * @openapi + * /plugin-api/tunnels/status/{tunnelName}: + * get: + * summary: Get one tunnel's status + * tags: + * - Tunnels + * parameters: + * - in: path + * name: tunnelName + * required: true + * schema: + * type: string + * responses: + * 200: + * description: The tunnel's status. + * 404: + * description: No such tunnel, or the caller cannot see it. + */ + router.get("/status/:tunnelName", async (req: Request, res: Response) => { + const tunnelName = String(req.params.tunnelName); + // 404 rather than 403 for someone else's tunnel: the name itself carries + // host details, so confirming it exists would leak them. + if (!(await manager.canAccessTunnel(actor(ctx), tunnelName))) { + return res.status(404).json({ error: "Tunnel not found" }); + } + const status = manager.statuses.get(tunnelName); + if (!status) return res.status(404).json({ error: "Tunnel not found" }); + res.json({ name: tunnelName, status }); + }); + + /** + * @openapi + * /plugin-api/tunnels/connect: + * post: + * summary: Connect a tunnel + * description: Starts a server tunnel from one of the caller's hosts. Credentials are resolved on the server. The result arrives over the status stream. + * tags: + * - Tunnels + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * name: + * type: string + * sourceHostId: + * type: integer + * tunnelIndex: + * type: integer + * mode: + * type: string + * endpointHost: + * type: string + * sourcePort: + * type: integer + * endpointPort: + * type: integer + * responses: + * 200: + * description: Connection request received. + * 400: + * description: Invalid tunnel configuration. + * 403: + * description: Access denied to this host. + */ + router.post("/connect", async (req: Request, res: Response) => { + const userId = actor(ctx); + const body = (req.body ?? {}) as Partial; + const tunnelName = body.name; + + if (!isNonEmptyString(tunnelName)) { + return res.status(400).json({ error: "Invalid tunnel configuration" }); + } + + // Reserved for on-demand forwards, which skip retries by name. A saved + // tunnel using it would silently lose its own reconnects. + if (isReservedTunnelName(tunnelName)) { + return res.status(400).json({ + error: `Tunnel names beginning with "${RESERVED_TUNNEL_NAME_PREFIX}" are reserved`, + }); + } + + const sourceHostId = Number(body.sourceHostId); + const tunnelIndex = Number(body.tunnelIndex ?? 0); + if (!Number.isInteger(sourceHostId) || !Number.isInteger(tunnelIndex)) { + return res.status(400).json({ error: "Invalid tunnel configuration" }); + } + + const request: TunnelConnectRequest = { + ...(body as TunnelConnectRequest), + endpointHost: (body.endpointHost ?? "").trim(), + name: tunnelName, + sourceHostId, + tunnelIndex, + }; + + if ( + !validateTunnelConfig(tunnelName, { + sourceHostId, + tunnelIndex, + sourcePort: request.sourcePort, + endpointHost: request.endpointHost ?? "", + endpointPort: request.endpointPort, + }) + ) { + return res + .status(400) + .json({ error: "Tunnel configuration does not match tunnel name" }); + } + + const access = await ctx.hosts.checkAccess(sourceHostId, "connect"); + const host = access.hasAccess ? await ctx.hosts.get(sourceHostId) : null; + if (!host) { + ctx.log.warn( + `User ${userId} tried to connect tunnel ${tunnelName} without access to host ${sourceHostId}`, + ); + return res.status(403).json({ error: "Access denied to this host" }); + } + + try { + const config = await resolveEndpoint( + ctx, + buildTunnelConfig(host, request, userId), + ); + await manager.start(config); + } catch (error) { + const reason = errorMessage(error); + ctx.log.warn(`Tunnel ${tunnelName} could not start: ${reason}`); + manager.broadcast(tunnelName, { + connected: false, + status: CONNECTION_STATES.FAILED, + reason, + }); + } + + res.json({ message: "Connection request received", tunnelName }); + }); + + const stopHandler = + (message: string) => async (req: Request, res: Response) => { + const userId = actor(ctx); + const tunnelName = (req.body ?? {}).tunnelName; + if (!isNonEmptyString(tunnelName)) { + return res.status(400).json({ error: "Tunnel name required" }); + } + + const decision = await authorizeTunnelAction( + canAccess(userId), + tunnelName, + manager.configs.get(tunnelName), + ); + if (!decision.allowed) { + return res.status(403).json({ error: "Access denied" }); + } + + await manager.stop(tunnelName); + res.json({ message, tunnelName }); + }; + + /** + * @openapi + * /plugin-api/tunnels/disconnect: + * post: + * summary: Disconnect a tunnel + * tags: + * - Tunnels + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * tunnelName: + * type: string + * responses: + * 200: + * description: Disconnect request received. + * 400: + * description: Tunnel name required. + * 403: + * description: Access denied. + */ + router.post("/disconnect", stopHandler("Disconnect request received")); + + /** + * @openapi + * /plugin-api/tunnels/cancel: + * post: + * summary: Cancel a tunnel's connect or retry + * tags: + * - Tunnels + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * tunnelName: + * type: string + * responses: + * 200: + * description: Cancel request received. + * 400: + * description: Tunnel name required. + * 403: + * description: Access denied. + */ + router.post("/cancel", stopHandler("Cancel request received")); + + /** + * @openapi + * /plugin-api/tunnels/presets: + * get: + * summary: List client tunnel presets + * description: Returns the caller's saved client-to-server tunnel presets. + * tags: + * - Tunnels + * responses: + * 200: + * description: List of tunnel presets. + * 403: + * description: Missing the tunnels.use permission. + */ + router.get("/presets", async (_req: Request, res: Response) => { + try { + const rows = await presets.listByUserId(actor(ctx)); + res.json(rows.map(parsePreset)); + } catch (error) { + ctx.log.error( + "Failed to fetch client tunnel presets", + error instanceof Error ? error : undefined, + ); + res.status(500).json({ error: "Failed to fetch C2S tunnel presets" }); + } + }); + + /** + * @openapi + * /plugin-api/tunnels/presets: + * post: + * summary: Create a client tunnel preset + * tags: + * - Tunnels + * requestBody: + * required: true + * content: + * application/json: + * schema: + * type: object + * properties: + * name: + * type: string + * config: + * type: array + * items: + * type: object + * platform: + * type: string + * computerName: + * type: string + * responses: + * 201: + * description: Preset created. + * 400: + * description: Invalid name or config. + * 409: + * description: A preset with that name already exists. + */ + router.post("/presets", async (req: Request, res: Response) => { + const userId = actor(ctx); + const { name, config, platform, computerName } = req.body ?? {}; + + if (!isNonEmptyString(name)) { + return res.status(400).json({ error: "Preset name is required" }); + } + if (!validatePresetConfig(config)) { + return res + .status(400) + .json({ error: "Invalid C2S tunnel configuration" }); + } + + const trimmedName = name.trim(); + try { + if (await presets.hasNameForUser(userId, trimmedName)) { + return res.status(409).json({ error: "Preset name already exists" }); + } + const created = await presets.createForUser(userId, { + name: trimmedName, + config: JSON.stringify(config), + platform: trimmedOrNull(platform), + computerName: trimmedOrNull(computerName), + }); + res.status(201).json(parsePreset(created)); + } catch (error) { + ctx.log.error( + "Failed to create client tunnel preset", + error instanceof Error ? error : undefined, + ); + res.status(500).json({ error: "Failed to create C2S tunnel preset" }); + } + }); + + /** + * @openapi + * /plugin-api/tunnels/presets/{id}: + * put: + * summary: Update a client tunnel preset + * tags: + * - Tunnels + * parameters: + * - in: path + * name: id + * required: true + * schema: + * type: integer + * responses: + * 200: + * description: Preset updated. + * 400: + * description: Invalid name or config. + * 404: + * description: Preset not found. + * 409: + * description: A preset with that name already exists. + */ + router.put("/presets/:id", async (req: Request, res: Response) => { + const userId = actor(ctx); + const id = Number(req.params.id); + const { name, config, platform, computerName } = req.body ?? {}; + + if (!Number.isInteger(id)) { + return res.status(400).json({ error: "Invalid request" }); + } + + try { + const existing = await presets.findByIdForUser(userId, id); + if (!existing) return res.status(404).json({ error: "Preset not found" }); + + const updates: Parameters[2] = {}; + + if (name !== undefined) { + if (!isNonEmptyString(name)) { + return res.status(400).json({ error: "Preset name is required" }); + } + const trimmedName = name.trim(); + if (await presets.hasNameForUser(userId, trimmedName, id)) { + return res.status(409).json({ error: "Preset name already exists" }); + } + updates.name = trimmedName; + } + + if (config !== undefined) { + if (!validatePresetConfig(config)) { + return res + .status(400) + .json({ error: "Invalid C2S tunnel configuration" }); + } + updates.config = JSON.stringify(config); + } + if (platform !== undefined) updates.platform = trimmedOrNull(platform); + if (computerName !== undefined) { + updates.computerName = trimmedOrNull(computerName); + } + + const updated = await presets.updateForUser(userId, id, updates); + res.json(parsePreset(updated ?? existing)); + } catch (error) { + ctx.log.error( + "Failed to update client tunnel preset", + error instanceof Error ? error : undefined, + ); + res.status(500).json({ error: "Failed to update C2S tunnel preset" }); + } + }); + + /** + * @openapi + * /plugin-api/tunnels/presets/{id}: + * delete: + * summary: Delete a client tunnel preset + * tags: + * - Tunnels + * parameters: + * - in: path + * name: id + * required: true + * schema: + * type: integer + * responses: + * 200: + * description: Preset deleted. + * 404: + * description: Preset not found. + */ + router.delete("/presets/:id", async (req: Request, res: Response) => { + const id = Number(req.params.id); + if (!Number.isInteger(id)) { + return res.status(400).json({ error: "Invalid request" }); + } + + try { + if (!(await presets.deleteForUser(actor(ctx), id))) { + return res.status(404).json({ error: "Preset not found" }); + } + res.json({ success: true }); + } catch (error) { + ctx.log.error( + "Failed to delete client tunnel preset", + error instanceof Error ? error : undefined, + ); + res.status(500).json({ error: "Failed to delete C2S tunnel preset" }); + } + }); +} diff --git a/plugins/tunnels/src/backend/service.ts b/plugins/tunnels/src/backend/service.ts new file mode 100644 index 000000000..811abdac2 --- /dev/null +++ b/plugins/tunnels/src/backend/service.ts @@ -0,0 +1,260 @@ +import type { Client } from "ssh2"; +import type { PluginContext } from "@termix/plugin-sdk/backend"; +import type { TunnelConfig, TunnelStatus } from "./types.js"; +import type { TunnelManager, TunnelRuntime } from "./manager.js"; +import { forwardOut } from "./ssh-primitives.js"; +import { + RESERVED_TUNNEL_NAME_PREFIX, + isReservedTunnelName, + parseReservedTunnelName, +} from "./utils.js"; +import { authorizeTunnelAction } from "./authorize.js"; +import { + buildTunnelConfig, + connectionToRequest, + findSavedTunnel, + hostLabel, + resolveEndpoint, +} from "./config.js"; + +export interface TunnelForwardTarget { + targetHost: string; + targetPort: number; + /** Where the local listener binds. Defaults to 127.0.0.1. */ + bindHost?: string; + /** A fixed local port. Defaults to one the kernel picks. */ + bindPort?: number; +} + +export interface TunnelForwardHandle { + bindHost: string; + bindPort: number; + close: () => Promise; +} + +/** What other plugins get from ctx.services.get("tunnels.access"). */ +export interface TunnelsAccess { + /** + * Opens (or reuses) a local forward to target through a source host and + * resolves only once it works: connected, listening and the target + * answered one probe. Rejects with the real reason otherwise. + */ + forward( + sourceHostId: number, + target: TunnelForwardTarget, + options?: { name?: string; idleTimeoutMs?: number }, + ): Promise; + /** Starts a saved tunnel by name. Its outcome arrives as status. */ + start(name: string): Promise; + /** Stops a tunnel by name and holds off its retries. */ + stop(name: string): Promise; + status(name: string): Promise; + list(): Promise>; +} + +const TARGET_PROBE_TIMEOUT_MS = 10_000; + +/** + * Opens one channel to the target and closes it again. Without it a forward + * reports success the moment its listener is up, and the likeliest failure + * (nothing listening on the target port) only shows up as a blank page. + */ +async function probeTarget( + client: Client, + targetHost: string, + targetPort: number, +): Promise { + let timer: NodeJS.Timeout | undefined; + try { + const channel = await Promise.race([ + forwardOut(client, targetHost, targetPort), + new Promise((_resolve, reject) => { + timer = setTimeout( + () => reject(new Error("Timed out reaching the endpoint port")), + TARGET_PROBE_TIMEOUT_MS, + ); + }), + ]); + try { + channel.end(); + } catch { + // Already gone; the probe succeeded either way. + } + } finally { + if (timer) clearTimeout(timer); + } +} + +function isPort(value: unknown, allowZero = false): value is number { + return ( + typeof value === "number" && + Number.isInteger(value) && + value >= (allowZero ? 0 : 1) && + value <= 65535 + ); +} + +export function createTunnelsService( + ctx: PluginContext, + manager: TunnelManager, +): TunnelsAccess { + // What each live forward was opened for, so an edited target reopens it + // instead of silently forwarding to the old one. + const fingerprints = new Map(); + + const actor = (): string => { + const userId = ctx.currentActor(); + if (!userId) throw new Error("No acting user"); + return userId; + }; + + const handleFor = ( + name: string, + runtime: TunnelRuntime, + ): TunnelForwardHandle => ({ + bindHost: runtime.bindHost, + bindPort: runtime.bindPort, + close: async () => { + fingerprints.delete(name); + await manager.cleanup(name, true); + }, + }); + + const canAccess = (hostId: number) => manager.canAccessHost(actor(), hostId); + + return { + async forward(sourceHostId, target, options = {}) { + const userId = actor(); + if (!isPort(target.targetPort)) throw new Error("Invalid target port"); + if (target.bindPort !== undefined && !isPort(target.bindPort, true)) { + throw new Error("Invalid bind port"); + } + const targetHost = target.targetHost?.trim(); + if (!targetHost) throw new Error("Invalid target host"); + + const access = await ctx.hosts.checkAccess(sourceHostId, "connect"); + const host = access.hasAccess ? await ctx.hosts.get(sourceHostId) : null; + if (!host) throw new Error("Host not found or access denied"); + + const name = + options.name ?? + `${RESERVED_TUNNEL_NAME_PREFIX}${sourceHostId}:${targetHost}:${target.targetPort}`; + if ( + !isReservedTunnelName(name) || + parseReservedTunnelName(name)?.hostId !== sourceHostId + ) { + throw new Error( + `Forward names must be "${RESERVED_TUNNEL_NAME_PREFIX}:" for the source host`, + ); + } + + const bindHost = target.bindHost?.trim() || "127.0.0.1"; + const fingerprint = JSON.stringify({ + targetHost, + targetPort: target.targetPort, + bindHost, + bindPort: target.bindPort ?? null, + ip: host.ip, + sshPort: host.port, + username: host.username, + }); + + const existing = manager.runtimes.get(name); + if (existing) { + const recorded = fingerprints.get(name); + if (recorded === undefined || recorded === fingerprint) { + fingerprints.set(name, fingerprint); + return handleFor(name, existing); + } + ctx.log.info(`Reopening tunnel ${name} after its target changed`); + await manager.cleanup(name, true); + fingerprints.delete(name); + } + + const config: TunnelConfig = { + name, + scope: "s2s", + mode: "local", + tunnelType: "local", + bindHost, + targetHost, + sourceHostId: host.id, + tunnelIndex: 0, + requestingUserId: userId, + hostName: hostLabel(host), + sourceIP: host.ip, + sourceSSHPort: host.port, + sourceUsername: host.username, + // Loopback marks it single host, which is what picks the + // listen-here-and-forwardOut path. + endpointHost: "127.0.0.1", + sourcePort: target.bindPort ?? 0, + endpointPort: target.targetPort, + maxRetries: 0, + retryInterval: 0, + autoStart: false, + idleTimeoutMs: options.idleTimeoutMs, + }; + + manager.manualDisconnects.delete(name); + try { + const runtime = await manager.connect(config, 0, { + throwOnError: true, + }); + if (!runtime) { + throw new Error("The tunnel closed before it could be used"); + } + await probeTarget(runtime.sourceClient, targetHost, target.targetPort); + fingerprints.set(name, fingerprint); + return handleFor(name, runtime); + } catch (error) { + // Nothing half-built may be handed out on the next call. + await manager.cleanup(name, true).catch(() => undefined); + fingerprints.delete(name); + throw error; + } + }, + + async start(name) { + const existing = manager.configs.get(name); + if (existing) { + if (!(await canAccess(existing.sourceHostId))) { + throw new Error(`Tunnel "${name}" is not configured`); + } + await manager.start(existing); + return; + } + + const saved = await findSavedTunnel(ctx, name); + if (!saved) throw new Error(`Tunnel "${name}" is not configured`); + const config = await resolveEndpoint( + ctx, + buildTunnelConfig( + saved.host, + connectionToRequest(saved.host, saved.index, saved.connection), + actor(), + ), + ); + await manager.start(config); + }, + + async stop(name) { + const decision = await authorizeTunnelAction( + canAccess, + name, + manager.configs.get(name), + ); + if (!decision.allowed) throw new Error("Access denied"); + await manager.stop(name); + }, + + async status(name) { + if (!(await manager.canAccessTunnel(actor(), name))) return null; + return manager.statuses.get(name) ?? null; + }, + + async list() { + return manager.statusesFor(actor()); + }, + }; +} diff --git a/src/backend/hosts/tunnel/socks5-relay.ts b/plugins/tunnels/src/backend/socks5-relay.ts similarity index 85% rename from src/backend/hosts/tunnel/socks5-relay.ts rename to plugins/tunnels/src/backend/socks5-relay.ts index 958ce7a66..d8395c973 100644 --- a/src/backend/hosts/tunnel/socks5-relay.ts +++ b/plugins/tunnels/src/backend/socks5-relay.ts @@ -1,5 +1,5 @@ -import type { Duplex } from "stream"; -import { tunnelLogger } from "../../utils/logger.js"; +import type { Duplex } from "node:stream"; +import type { PluginLogger } from "@termix/plugin-sdk/backend"; function parseSocksAddress(buffer: Buffer): { address: string; @@ -40,10 +40,12 @@ function parseSocksAddress(buffer: Buffer): { return { address, port, bytesRead: offset + 2 }; } +/** The server side of a SOCKS5 CONNECT, for dynamic mode tunnels. */ export function handleSocks5Connect( inbound: Duplex, openOutbound: (host: string, port: number) => Promise, tunnelName: string, + log?: PluginLogger, ): void { let buffer = Buffer.alloc(0); let stage: "greeting" | "connect" | "piping" = "greeting"; @@ -89,13 +91,12 @@ export function handleSocks5Connect( inbound.on("error", () => outbound.destroy()); outbound.on("error", () => inbound.destroy()); }) - .catch((error) => { - tunnelLogger.error("SOCKS5 tunnel connect failed", error, { - operation: "managed_tunnel_socks_connect_failed", - tunnelName, - targetHost: parsed.address, - targetPort: parsed.port, - }); + .catch((error: unknown) => { + log?.warn( + `SOCKS5 connect to ${parsed.address}:${parsed.port} failed for tunnel ${tunnelName}: ${ + error instanceof Error ? error.message : String(error) + }`, + ); fail(0x05); }); } diff --git a/plugins/tunnels/src/backend/ssh-primitives.ts b/plugins/tunnels/src/backend/ssh-primitives.ts new file mode 100644 index 000000000..8c4740b8b --- /dev/null +++ b/plugins/tunnels/src/backend/ssh-primitives.ts @@ -0,0 +1,78 @@ +import type { Client, ClientChannel } from "ssh2"; +import type { Duplex } from "node:stream"; +import type { PluginLogger } from "@termix/plugin-sdk/backend"; + +// Plain ssh2 channel operations on a client that already came from ctx.ssh. + +export function forwardOut( + client: Client, + targetHost: string, + targetPort: number, +): Promise { + return new Promise((resolve, reject) => { + client.forwardOut("127.0.0.1", 0, targetHost, targetPort, (err, stream) => { + if (err) { + reject(err); + return; + } + resolve(stream); + }); + }); +} + +export function bindForwardIn( + client: Client, + bindHost: string, + bindPort: number, +): Promise { + return new Promise((resolve, reject) => { + client.forwardIn(bindHost, bindPort, (err, actualPort) => { + if (err) { + reject(err); + return; + } + resolve(actualPort || bindPort); + }); + }); +} + +export function unbindForwardIn( + client: Client, + bindHost: string, + bindPort: number, + log?: PluginLogger, +): void { + try { + client.unforwardIn(bindHost, bindPort, (err) => { + if (err) { + log?.warn( + `Failed to unbind tunnel listener ${bindHost}:${bindPort}: ${err.message}`, + ); + } + }); + } catch { + // The connection may already be gone. + } +} + +export function pipeTunnelStreams( + inbound: Duplex, + outboundPromise: Promise, + tunnelName: string, + log?: PluginLogger, +): void { + outboundPromise + .then((outbound) => { + inbound.pipe(outbound).pipe(inbound); + inbound.on("error", () => outbound.destroy()); + outbound.on("error", () => inbound.destroy()); + }) + .catch((error: unknown) => { + log?.warn( + `Tunnel ${tunnelName} could not open its outbound stream: ${ + error instanceof Error ? error.message : String(error) + }`, + ); + inbound.destroy(); + }); +} diff --git a/plugins/tunnels/src/backend/tables.ts b/plugins/tunnels/src/backend/tables.ts new file mode 100644 index 000000000..50c69e521 --- /dev/null +++ b/plugins/tunnels/src/backend/tables.ts @@ -0,0 +1,32 @@ +import { + adoptLegacyTable, + defineTable, + id, + refUser, + text, + timestamp, +} from "@termix/plugin-sdk/db"; + +/** + * Client tunnel presets the desktop app saves per user. + * + * Adopted from core's c2s_tunnel_presets, so the column names are the legacy + * ones and the rename carries every existing row across. Core never indexed + * it, so there is no legacy index to keep. + */ +export const presets = adoptLegacyTable( + "c2s_tunnel_presets", + defineTable("presets", { + id: id(), + userId: refUser(), + name: text().notNull(), + // JSON: TunnelConnection[] + config: text().notNull(), + platform: text(), + computerName: text(), + createdAt: timestamp().notNull().defaultNow(), + updatedAt: timestamp().notNull().defaultNow(), + }), +); + +export const tables = [presets]; diff --git a/plugins/tunnels/src/backend/types.ts b/plugins/tunnels/src/backend/types.ts new file mode 100644 index 000000000..cac49bb25 --- /dev/null +++ b/plugins/tunnels/src/backend/types.ts @@ -0,0 +1,60 @@ +import type { TunnelMode, TunnelScope } from "../shared/types.js"; + +export type { + C2STunnelPreset, + ConnectionState, + TunnelConnectRequest, + TunnelConnection, + TunnelErrorType, + TunnelMode, + TunnelScope, + TunnelStatus, +} from "../shared/types.js"; +export { CONNECTION_STATES } from "../shared/types.js"; + +/** + * A tunnel as the manager runs it. Built server side from a saved connection + * or a connect request; it never carries credentials; both SSH legs resolve + * theirs through ctx.ssh. + */ +export interface TunnelConfig { + name: string; + scope?: TunnelScope; + mode?: TunnelMode; + tunnelType?: "local" | "remote"; + localAddress?: string; + remoteAddress?: string; + bindHost?: string; + targetHost?: string; + + sourceHostId: number; + sourceHostSyncId?: string; + tunnelIndex: number; + /** Who the SSH connections run as. */ + requestingUserId: string; + + hostName: string; + sourceIP: string; + sourceSSHPort: number; + sourceUsername: string; + + endpointHost: string; + /** The Termix host the endpoint leg connects to, when there is one. */ + endpointHostId?: number; + endpointIP?: string; + endpointSSHPort?: number; + endpointUsername?: string; + + sourcePort: number; + endpointPort: number; + maxRetries: number; + /** Milliseconds. */ + retryInterval: number; + autoStart: boolean; + + /** + * When set, the tunnel closes itself once it has had no connected sockets + * for this long. forward() uses it for on-demand tunnels. + */ + idleTimeoutMs?: number; +} diff --git a/src/backend/hosts/tunnel/utils.ts b/plugins/tunnels/src/backend/utils.ts similarity index 50% rename from src/backend/hosts/tunnel/utils.ts rename to plugins/tunnels/src/backend/utils.ts index 5064a7f63..164c79d0a 100644 --- a/src/backend/hosts/tunnel/utils.ts +++ b/plugins/tunnels/src/backend/utils.ts @@ -1,7 +1,7 @@ -import type { ErrorType, TunnelConfig } from "../../../types/index.js"; -import { tunnelLogger } from "../../utils/logger.js"; +import { buildTunnelName } from "../shared/tunnel-naming.js"; +import type { TunnelConfig, TunnelErrorType } from "./types.js"; -export function classifyTunnelError(errorMessage: string): ErrorType { +export function classifyTunnelError(errorMessage: string): TunnelErrorType { if (!errorMessage) return "UNKNOWN"; const message = errorMessage.toLowerCase(); @@ -17,6 +17,7 @@ export function classifyTunnelError(errorMessage: string): ErrorType { if ( message.includes("authentication failed") || + message.includes("authentication methods failed") || message.includes("permission denied") || message.includes("incorrect password") ) { @@ -47,32 +48,24 @@ export function classifyTunnelError(errorMessage: string): ErrorType { return "UNKNOWN"; } -export function getTunnelMarker(tunnelName: string): string { - return `TUNNEL_MARKER_${tunnelName.replace(/[^a-zA-Z0-9]/g, "_")}`; -} - -export function normalizeTunnelName( - hostId: number, - tunnelIndex: number, - displayName: string, - sourcePort: number, - endpointHost: string, - endpointPort: number, -): string { - return `${hostId}::${tunnelIndex}::${displayName}::${sourcePort}::${endpointHost}::${endpointPort}`; -} +/** The name a host's saved tunnel runs under. See shared/tunnel-naming.ts. */ +export const normalizeTunnelName = buildTunnelName; export function getTunnelMode( - tunnelConfig: TunnelConfig, + tunnelConfig: Pick, ): "local" | "remote" | "dynamic" { return tunnelConfig.mode || tunnelConfig.tunnelType || "remote"; } -export function getTunnelScope(tunnelConfig: TunnelConfig): "s2s" | "c2s" { +export function getTunnelScope( + tunnelConfig: Pick, +): "s2s" | "c2s" { return tunnelConfig.scope || "s2s"; } -export function getTunnelBindHost(tunnelConfig: TunnelConfig): string { +export function getTunnelBindHost( + tunnelConfig: Pick, +): string { return tunnelConfig.bindHost || "127.0.0.1"; } @@ -99,8 +92,6 @@ export function parseTunnelName(tunnelName: string): { }; } - tunnelLogger.warn(`Legacy tunnel name format: ${tunnelName}`); - const legacyParts = tunnelName.split("_"); return { displayName: legacyParts[0] || "unknown", @@ -113,7 +104,14 @@ export function parseTunnelName(tunnelName: string): { export function validateTunnelConfig( tunnelName: string, - tunnelConfig: TunnelConfig, + tunnelConfig: Pick< + TunnelConfig, + | "sourceHostId" + | "tunnelIndex" + | "sourcePort" + | "endpointHost" + | "endpointPort" + >, ): boolean { const parsed = parseTunnelName(tunnelName); @@ -131,13 +129,11 @@ export function validateTunnelConfig( } /** - * Tunnel names beginning with this prefix are reserved for web endpoint - * tunnels: they are opened on demand and never retried on disconnect (see the - * early return in `handleDisconnect`). A user-supplied tunnel name using this - * prefix would silently disable its own retry/reconnect behaviour, and could - * collide with a live web endpoint forward -- so the prefix is rejected at the - * point tunnel names are accepted from a request (the /ssh/tunnel/connect - * route). + * Tunnel names beginning with this prefix are reserved for forward() tunnels + * (web endpoints): they are opened on demand and never retried on disconnect. + * A user-supplied name using the prefix would silently lose its own retry + * behaviour and could collide with a live forward, so POST /connect rejects + * it. */ export const RESERVED_TUNNEL_NAME_PREFIX = "web:"; @@ -145,11 +141,7 @@ export function isReservedTunnelName(tunnelName: string): boolean { return tunnelName.startsWith(RESERVED_TUNNEL_NAME_PREFIX); } -/** - * The exact inverse of `parseReservedTunnelName`. Routes that open or close a - * web endpoint tunnel must call this rather than composing the string inline, - * so the two can never drift apart. - */ +/** The exact inverse of parseReservedTunnelName. */ export function buildWebEndpointTunnelName( hostId: number, endpointId: string, @@ -158,19 +150,13 @@ export function buildWebEndpointTunnelName( } /** - * Recovers the host id and endpoint id encoded in a web endpoint tunnel name, - * so a route that only has the name -- /ssh/tunnel/disconnect is not told - * which host a reserved tunnel belongs to -- can still perform an ownership - * check. + * Recovers the host id and endpoint id from a reserved name, so a route that + * only has the name can still check ownership. * - * Returns null for anything that is not a reserved name, or whose host id - * segment is not a positive integer. Callers must treat null as "cannot - * verify ownership" and FAIL CLOSED, never fall through to an unchecked path. - * - * The endpoint id is taken verbatim as everything after the first ":" - * following the host id, so it may itself contain colons -- endpoint ids are - * client-supplied with no character restriction. Splitting on the first colon - * rather than the last is safe because the host id segment is digits only. + * Returns null for anything that is not a reserved name or whose host id is + * not a positive integer. Callers must treat null as "cannot verify" and deny. + * The endpoint id is everything after the first ":" following the host id, + * so it may contain colons itself. */ export function parseReservedTunnelName( tunnelName: string, @@ -190,3 +176,90 @@ export function parseReservedTunnelName( return { hostId, endpointId }; } + +type EndpointHostLike = { + id: number | string; + name?: string | null; + ip: string; + username?: string | null; +}; + +/** Matches a saved endpointHost string against a host id, name, ip or user@ip. */ +export function findHostByTunnelEndpoint( + hosts: T[], + endpointHost?: string | null, +): T | undefined { + const value = endpointHost?.trim(); + if (!value) return undefined; + + return hosts.find((host) => { + const userAtIp = host.username ? `${host.username}@${host.ip}` : ""; + return ( + String(host.id) === value || + host.name === value || + host.ip === value || + userAtIp === value + ); + }); +} + +export function isSingleHostTunnel( + tunnelConfig: Pick< + TunnelConfig, + | "endpointHost" + | "endpointIP" + | "sourceIP" + | "endpointSSHPort" + | "sourceSSHPort" + | "endpointHostId" + | "sourceHostId" + >, +): boolean { + if (!tunnelConfig.endpointHost && !tunnelConfig.endpointIP) return true; + if ( + tunnelConfig.endpointHost === "127.0.0.1" || + tunnelConfig.endpointHost === "localhost" + ) { + return true; + } + if ( + tunnelConfig.endpointHostId !== undefined && + tunnelConfig.endpointHostId === tunnelConfig.sourceHostId + ) { + return true; + } + if ( + tunnelConfig.endpointIP && + tunnelConfig.endpointIP === tunnelConfig.sourceIP && + tunnelConfig.endpointSSHPort === tunnelConfig.sourceSSHPort + ) { + return true; + } + return false; +} + +/** + * Direct tunnels ride the source connection alone. Anything else needs a + * second SSH leg to a Termix endpoint host, reached through the source. + */ +export function shouldEstablishDirectTunnel( + tunnelConfig: TunnelConfig, +): boolean { + if (isSingleHostTunnel(tunnelConfig)) return true; + const mode = getTunnelMode(tunnelConfig); + return mode !== "remote" && tunnelConfig.endpointHostId === undefined; +} + +export function resolveS2SLocalTargetHost(tunnelConfig: TunnelConfig): string { + const targetHost = tunnelConfig.targetHost?.trim(); + + if ( + !targetHost || + targetHost === tunnelConfig.endpointHost || + targetHost === tunnelConfig.hostName + ) { + return "127.0.0.1"; + } + + return targetHost; +} diff --git a/src/ui/user/C2STunnelPresetManager.tsx b/plugins/tunnels/src/frontend/C2STunnelPresetManager.tsx similarity index 96% rename from src/ui/user/C2STunnelPresetManager.tsx rename to plugins/tunnels/src/frontend/C2STunnelPresetManager.tsx index 70720bc25..44a746b13 100644 --- a/src/ui/user/C2STunnelPresetManager.tsx +++ b/plugins/tunnels/src/frontend/C2STunnelPresetManager.tsx @@ -1,33 +1,4 @@ -import { getErrorMessage } from "../lib/error-message.js"; import React from "react"; -import { Button } from "@/components/button.tsx"; -import { Input } from "@/components/input.tsx"; -import { FakeSwitch } from "@/components/section-card.tsx"; -import { - getTunnelModeDescription, - getTunnelPortLabels, - getTunnelTypeForMode, -} from "@/features/tunnel/tunnel-form-utils.ts"; -import { - getTunnelMode, - normalizeClientTunnel, - stripClientTunnelDiagnostics, - type ClientTunnel, -} from "@/user/c2s-tunnel-config-utils.ts"; -import { - createC2STunnelPreset, - deleteC2STunnelPreset, - getC2STunnelPresets, - getSSHHosts, - updateC2STunnelPreset, -} from "@/main-axios.ts"; -import type { - C2STunnelPreset, - SSHHost, - TunnelConnection, - TunnelMode, - TunnelStatus, -} from "@/types/index.js"; import { Activity, ChevronDown, @@ -40,9 +11,45 @@ import { Square, Trash2, } from "lucide-react"; -import { useTranslation } from "react-i18next"; import { toast } from "sonner"; -import { Select2 } from "@/components/select2"; +import { useHosts, useTranslation } from "@termix/plugin-sdk/frontend"; +import { Button, FakeSwitch, Input, Select2 } from "@termix/plugin-sdk/ui"; +import type { + C2STunnelPreset, + TunnelConnection, + TunnelMode, + TunnelStatus, +} from "../shared/types"; +import { clientTunnelName } from "../shared/tunnel-naming"; +import { + getTunnelModeDescription, + getTunnelPortLabels, + getTunnelTypeForMode, +} from "./tunnel-form-utils"; +import { + getTunnelMode, + normalizeClientTunnel, + stripClientTunnelDiagnostics, + type ClientTunnel, +} from "./c2s-tunnel-config-utils"; +import { + apiErrorMessage, + createC2STunnelPreset, + deleteC2STunnelPreset, + getC2STunnelPresets, + updateC2STunnelPreset, +} from "./api"; + +interface SshHostOption { + id: number; + name: string; + syncId?: string | null; + connectionType?: string | null; +} + +function getErrorMessage(error: unknown, fallback: string): string { + return error instanceof Error && error.message ? error.message : fallback; +} function sortPresets(presets: C2STunnelPreset[]) { return [...presets].sort((a, b) => a.name.localeCompare(b.name)); @@ -142,7 +149,19 @@ export function C2STunnelPresetManager(): React.ReactElement { const [savedLocalConfig, setSavedLocalConfig] = React.useState< ClientTunnel[] >([]); - const [hosts, setHosts] = React.useState([]); + const { hosts: pluginHosts, loaded: hostsLoaded } = useHosts(); + const hosts = React.useMemo( + () => + pluginHosts.map((host) => ({ + id: Number(host.id), + name: host.name, + syncId: host.syncId as string | null | undefined, + connectionType: host.connectionType as string | null | undefined, + })), + [pluginHosts], + ); + const hostsRef = React.useRef(hosts); + hostsRef.current = hosts; const [presets, setPresets] = React.useState([]); const [tunnelStatuses, setTunnelStatuses] = React.useState< Record @@ -174,12 +193,10 @@ export function C2STunnelPresetManager(): React.ReactElement { if (!isExpired) return false; - toast.warning( - "Remote Sync session expired. Reconnect Remote Sync and try again.", - ); + toast.warning(t("tunnels.remoteSessionExpired")); return true; }, - [], + [t], ); const sshHosts = React.useMemo( @@ -221,20 +238,7 @@ export function C2STunnelPresetManager(): React.ReactElement { }); } - const getTunnelName = React.useCallback( - (tunnel: ClientTunnel, index: number) => - [ - "c2s", - index, - tunnel.sourceHostId || 0, - tunnel.mode || tunnel.tunnelType || "local", - getEffectiveAddress(tunnel.localAddress), - getEffectiveAddress(tunnel.remoteAddress), - tunnel.sourcePort, - tunnel.endpointPort || 0, - ].join("::"), - [], - ); + const getTunnelName = clientTunnelName; const getEndpointName = React.useCallback( (tunnel: ClientTunnel) => { @@ -363,12 +367,11 @@ export function C2STunnelPresetManager(): React.ReactElement { const refreshLocalConfig = React.useCallback(async () => { if (!isElectron) return; - const [config, defaultName, nextHosts] = await Promise.all([ + const [config, defaultName] = await Promise.all([ window.electronAPI.getC2STunnelConfig(), window.electronAPI.getC2STunnelPresetDefaultName(), - getSSHHosts(), ]); - setHosts(nextHosts); + const nextHosts = hostsRef.current; const normalizedConfig = Array.isArray(config) ? (config as TunnelConnection[]) .filter((tunnel) => tunnel.scope === "c2s") @@ -395,11 +398,11 @@ export function C2STunnelPresetManager(): React.ReactElement { }, [isElectron]); React.useEffect(() => { - if (!isElectron) return; + if (!isElectron || !hostsLoaded) return; Promise.all([refreshLocalConfig(), refreshPresets()]).catch(() => { setPresets([]); }); - }, [isElectron, refreshLocalConfig, refreshPresets]); + }, [isElectron, hostsLoaded, refreshLocalConfig, refreshPresets]); React.useEffect(() => { if (!isElectron) return; @@ -662,7 +665,12 @@ export function C2STunnelPresetManager(): React.ReactElement { await refreshPresets(); toast.success(t("profile.c2sPresetSaved")); } catch (error) { - toast.error(getErrorMessage(error, t("tunnels.localSaveError"))); + toast.error( + apiErrorMessage( + error, + getErrorMessage(error, t("tunnels.localSaveError")), + ), + ); } }; @@ -688,8 +696,8 @@ export function C2STunnelPresetManager(): React.ReactElement { }); await refreshPresets(); toast.success(t("profile.c2sPresetRenamed")); - } catch { - // API helper already surfaces the error. + } catch (error) { + toast.error(apiErrorMessage(error, t("profile.c2sPresetRenameError"))); } }; @@ -700,8 +708,8 @@ export function C2STunnelPresetManager(): React.ReactElement { setSelectedPresetId(""); await refreshPresets(); toast.success(t("profile.c2sPresetDeleted")); - } catch { - // API helper already surfaces the error. + } catch (error) { + toast.error(apiErrorMessage(error, t("profile.c2sPresetDeleteError"))); } }; diff --git a/plugins/tunnels/src/frontend/HostTunnelsSection.tsx b/plugins/tunnels/src/frontend/HostTunnelsSection.tsx new file mode 100644 index 000000000..4d8f5c2c8 --- /dev/null +++ b/plugins/tunnels/src/frontend/HostTunnelsSection.tsx @@ -0,0 +1,372 @@ +import { useEffect, useState } from "react"; +import { Network, Plus } from "lucide-react"; +import { + useHosts, + useToast, + useTranslation, + type HostEditorSectionProps, +} from "@termix/plugin-sdk/frontend"; +import { + Button, + FakeSwitch, + Input, + SectionCard, + SettingRow, +} from "@termix/plugin-sdk/ui"; +import type { TunnelConnection } from "../shared/types"; +import { serverTunnelName } from "../shared/tunnel-naming"; +import { + connectTunnel, + disconnectTunnel, + subscribeTunnelStatuses, + type TunnelStatusMap, +} from "./api"; +import { + connectRequestFor, + parseConnections, + tunnelMode, +} from "./host-tunnels"; + +type PluginSettingsForm = Record>; + +function newTunnel(): TunnelConnection { + return { + scope: "s2s", + mode: "local", + sourcePort: 8080, + endpointHost: "", + endpointPort: 80, + bindHost: "127.0.0.1", + maxRetries: 3, + retryInterval: 10, + autoStart: false, + }; +} + +const MODE_DESCRIPTION_KEYS = { + local: "hosts.tunnelModeLocalDesc", + remote: "hosts.tunnelModeRemoteDesc", + dynamic: "hosts.tunnelModeDynamicDesc", +} as const; + +const numberInputClass = + "h-7 text-xs [appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none"; + +/** + * The host editor's Tunnels tab. Writes into the form's pluginSettings for + * this plugin, which the editor saves through the plugin's host settings + * route after the host itself. + */ +export function HostTunnelsSection({ + form, + updateForm, + host, +}: HostEditorSectionProps) { + const { t } = useTranslation(); + const toast = useToast(); + const { hosts } = useHosts(); + const [statuses, setStatuses] = useState({}); + const [busyIndex, setBusyIndex] = useState(null); + + useEffect(() => subscribeTunnelStatuses(setStatuses), []); + + const settings = ((form?.pluginSettings as PluginSettingsForm | undefined) + ?.tunnels ?? {}) as Record; + const enabled = settings.enableTunnel === true; + const tunnels = parseConnections(settings.tunnelConnections); + + const setSettings = (patch: Record) => + updateForm((current) => { + const all = (current.pluginSettings ?? {}) as PluginSettingsForm; + return { + ...current, + pluginSettings: { + ...all, + tunnels: { ...(all.tunnels ?? {}), ...patch }, + }, + }; + }); + + const setTunnels = (next: TunnelConnection[]) => + setSettings({ tunnelConnections: next }); + + const updateTunnel = (index: number, patch: Partial) => + setTunnels( + tunnels.map((tunnel, i) => + i === index ? { ...tunnel, ...patch } : tunnel, + ), + ); + + const sourceHost = host + ? { + id: host.id, + name: (form?.name as string) || host.name, + username: (form?.username as string) || host.username, + ip: (form?.ip as string) || host.ip, + } + : null; + + const toggle = async (index: number, connected: boolean) => { + if (!sourceHost) return; + const tunnel = tunnels[index]; + setBusyIndex(index); + try { + if (connected) { + await disconnectTunnel(serverTunnelName(sourceHost, index, tunnel)); + toast.success(t("hosts.tunnelDisconnected")); + } else { + await connectTunnel(connectRequestFor(sourceHost, index, tunnel)); + toast.success(t("hosts.tunnelConnecting")); + } + } catch { + toast.error( + connected + ? t("hosts.failedToDisconnectTunnel") + : t("hosts.failedToConnectTunnel"), + ); + } finally { + setBusyIndex(null); + } + }; + + return ( + <> + } + > +
+ + {t("hosts.enableTunnelingDesc")}{" "} + + {t("hosts.docsLink")} + + + } + > + setSettings({ enableTunnel: value })} + /> + +
+

{t("hosts.tunnelRequirementsText")}

+
+
+
+ } + action={ + + } + > +
+ {tunnels.length === 0 && ( +

+ {t("hosts.noTunnelsConfigured")} +

+ )} + {tunnels.map((tunnel, i) => { + const mode = tunnelMode(tunnel); + const endpointInputId = `server-tunnel-endpoint-${host?.id ?? "new"}-${i}`; + const status = sourceHost + ? statuses[serverTunnelName(sourceHost, i, tunnel)]?.status + : undefined; + const isConnected = status === "connected"; + return ( +
+
+
+ + {t("hosts.tunnelLabel", { number: i + 1 })} + +
+ {sourceHost && ( + + )} +
+ +
+
+ +
+ {(["remote", "local", "dynamic"] as const).map((m) => ( + + ))} +
+

+ {t(MODE_DESCRIPTION_KEYS[mode])} +

+
+
+ {mode !== "dynamic" && ( +
+ + + updateTunnel(i, { endpointHost: e.target.value }) + } + /> + + {hosts + .filter((h) => h.enableSsh !== false) + .map((h) => ( + + ))} + +
+ )} + {mode !== "dynamic" && ( +
+ + + updateTunnel(i, { + endpointPort: Number(e.target.value), + }) + } + /> +
+ )} +
+ + + updateTunnel(i, { bindHost: e.target.value }) + } + /> +
+
+ + + updateTunnel(i, { sourcePort: Number(e.target.value) }) + } + /> +
+
+ + + updateTunnel(i, { maxRetries: Number(e.target.value) }) + } + /> +
+
+ + + updateTunnel(i, { + retryInterval: Number(e.target.value), + }) + } + /> +
+
+ + updateTunnel(i, { autoStart: value })} + /> + +
+ ); + })} +
+ + + ); +} diff --git a/src/ui/features/tunnel/TunnelTab.tsx b/plugins/tunnels/src/frontend/TunnelTab.tsx similarity index 56% rename from src/ui/features/tunnel/TunnelTab.tsx rename to plugins/tunnels/src/frontend/TunnelTab.tsx index 0d21efbcd..e15f0e415 100644 --- a/src/ui/features/tunnel/TunnelTab.tsx +++ b/plugins/tunnels/src/frontend/TunnelTab.tsx @@ -1,7 +1,4 @@ -import React, { useCallback, useEffect, useState } from "react"; -import { Button } from "@/components/button"; -import { Card } from "@/components/card"; - +import { useEffect, useState } from "react"; import { AlertCircle, Clock, @@ -14,40 +11,48 @@ import { Wifi, WifiOff, } from "lucide-react"; -import { toast } from "sonner"; -import { useTranslation } from "react-i18next"; import { - getSSHHosts, - subscribeTunnelStatuses, + useHost, + useToast, + useTranslation, + type PluginHostRecord, +} from "@termix/plugin-sdk/frontend"; +import { Button, Card } from "@termix/plugin-sdk/ui"; +import type { TunnelConnection, TunnelStatus } from "../shared/types"; +import { serverTunnelName, tunnelHostLabel } from "../shared/tunnel-naming"; +import { + cancelTunnel, connectTunnel, disconnectTunnel, - cancelTunnel, - logActivity, -} from "@/main-axios"; -import type { Host as DemoHost } from "@/types/ui-types"; -import type { SSHHost, TunnelConnection, TunnelStatus } from "@/types"; -import { findHostByTunnelEndpoint } from "./tunnel-endpoints"; + subscribeTunnelStatuses, + type TunnelStatusMap, +} from "./api"; +import { + connectRequestFor, + hostTunnelSettings, + tunnelMode, +} from "./host-tunnels"; -function tunnelName( - host: SSHHost, - index: number, - tunnel: TunnelConnection, -): string { - const hostKey = host.name || `${host.username}@${host.ip}`; - return `${host.id}::${index}::${hostKey}::${tunnel.sourcePort}::${tunnel.endpointHost}::${tunnel.endpointPort}`; -} +type StatusLabel = + "CONNECTED" | "CONNECTING" | "ERROR" | "WAITING" | "DISCONNECTED"; -function statusLabel(status: TunnelStatus | undefined): string { - if (!status) return "DISCONNECTED"; - const s = status.status?.toUpperCase(); - if (s === "CONNECTED") return "CONNECTED"; - if (s === "CONNECTING" || s === "VERIFYING") return "CONNECTING"; - if (s === "FAILED") return "ERROR"; - if (s === "RETRYING" || s === "WAITING") return "WAITING"; - if (s === "DISCONNECTING") return "DISCONNECTED"; +function statusLabel(status: TunnelStatus | undefined): StatusLabel { + const value = status?.status?.toUpperCase(); + if (value === "CONNECTED") return "CONNECTED"; + if (value === "CONNECTING" || value === "VERIFYING") return "CONNECTING"; + if (value === "FAILED") return "ERROR"; + if (value === "RETRYING" || value === "WAITING") return "WAITING"; return "DISCONNECTED"; } +const STATUS_TEXT_KEYS: Record = { + CONNECTED: "tunnels.connected", + CONNECTING: "tunnels.connecting", + ERROR: "tunnels.error", + WAITING: "tunnels.waiting", + DISCONNECTED: "tunnels.disconnected", +}; + function TunnelCard({ host, tunnel, @@ -55,7 +60,7 @@ function TunnelCard({ isActing, onAction, }: { - host: SSHHost; + host: PluginHostRecord; tunnel: TunnelConnection; status: TunnelStatus | undefined; isActing: boolean; @@ -79,10 +84,10 @@ function TunnelCard({ if (isWaiting) statusColor = "text-yellow-500 border-yellow-500/40 bg-yellow-500/10"; - const mode = tunnel.mode ?? (tunnel.tunnelType as string) ?? "local"; + const mode = tunnelMode(tunnel); const destination = mode === "dynamic" - ? "SOCKS5 Proxy" + ? t("tunnels.socksProxy") : `${tunnel.endpointHost ?? ""}:${tunnel.endpointPort}`; return ( @@ -95,7 +100,7 @@ function TunnelCard({
{isConnecting || isActing ? ( @@ -108,7 +113,7 @@ function TunnelCard({ ) : ( )} - {isActing ? t("tunnels.working") : label} + {isActing ? t("tunnels.working") : t(STATUS_TEXT_KEYS[label])}
@@ -127,7 +132,7 @@ function TunnelCard({ {mode} - → localhost:{tunnel.sourcePort} + {t("tunnels.listensOn", { port: tunnel.sourcePort })}
@@ -145,9 +150,7 @@ function TunnelCard({ {t("tunnels.host")} - - {host.name || `${host.username}@${host.ip}`} - + {tunnelHostLabel(host)}
@@ -239,192 +242,21 @@ function TunnelCard({ ); } -export function TunnelTab({ - host, - isVisible = true, -}: { - label: string; - host?: DemoHost; - isVisible?: boolean; -}) { +/** A host's saved server tunnels, with live status and start/stop controls. */ +export function TunnelTab({ host: given }: { host?: PluginHostRecord }) { const { t } = useTranslation(); - const [sshHost, setSshHost] = useState(null); - const [tunnelStatuses, setTunnelStatuses] = useState< - Record - >({}); - const [tunnelActions, setTunnelActions] = useState>( - {}, - ); - const activityLoggedRef = React.useRef(false); + const toast = useToast(); + const live = useHost(given?.id); + const host = live ?? given ?? null; + const [statuses, setStatuses] = useState({}); + const [acting, setActing] = useState>({}); - const fetchHost = useCallback(async () => { - if (!host) return; - try { - const hosts = await getSSHHosts(); - const found = hosts.find( - (h) => String(h.id) === host.id || h.name === host.name, - ); - if (found) setSshHost(found); - } catch { - /* ignore */ - } - }, [host]); - - useEffect(() => { - if (!isVisible) return; - - fetchHost(); - window.addEventListener("ssh-hosts:changed", fetchHost); - - let intervalId: ReturnType | null = null; - const start = () => { - if (intervalId !== null) return; - // Host config rarely changes; tunnel runtime status uses subscribeTunnelStatuses. - intervalId = setInterval(fetchHost, 30_000); - }; - const stop = () => { - if (intervalId === null) return; - clearInterval(intervalId); - intervalId = null; - }; - const onVisibility = () => { - if (document.visibilityState === "hidden") { - stop(); - return; - } - void fetchHost(); - start(); - }; - - if (document.visibilityState !== "hidden") start(); - document.addEventListener("visibilitychange", onVisibility); - - return () => { - stop(); - document.removeEventListener("visibilitychange", onVisibility); - window.removeEventListener("ssh-hosts:changed", fetchHost); - }; - }, [fetchHost, isVisible]); - - useEffect(() => { - return subscribeTunnelStatuses(setTunnelStatuses, () => {}); - }, []); - - useEffect(() => { - if (!sshHost || activityLoggedRef.current) return; - activityLoggedRef.current = true; - const name = sshHost.name || `${sshHost.username}@${sshHost.ip}`; - logActivity("tunnel", sshHost.id, name).catch(() => { - activityLoggedRef.current = false; - }); - }, [sshHost]); - - const handleAction = async ( - action: "connect" | "disconnect" | "cancel", - index: number, - ) => { - if (!sshHost) return; - const tunnel = sshHost.tunnelConnections[index]; - if (!tunnel) return; - const name = tunnelName(sshHost, index, tunnel); - - setTunnelActions((prev) => ({ ...prev, [name]: true })); - try { - if (action === "connect") { - const isDirect = - !tunnel.endpointHost || - tunnel.endpointHost === "127.0.0.1" || - tunnel.endpointHost === "localhost"; - let endpointSsh: SSHHost | undefined; - if (!isDirect) { - const allHosts = await getSSHHosts(); - endpointSsh = findHostByTunnelEndpoint(allHosts, tunnel.endpointHost); - } - await connectTunnel({ - name, - scope: tunnel.scope ?? "s2s", - mode: - tunnel.mode ?? - (tunnel.tunnelType as "local" | "remote" | "dynamic") ?? - "local", - tunnelType: - tunnel.tunnelType ?? - (tunnel.mode === "local" || tunnel.mode === "remote" - ? tunnel.mode - : "local"), - bindHost: tunnel.bindHost, - targetHost: tunnel.targetHost, - sourceHostId: sshHost.id, - tunnelIndex: index, - hostName: sshHost.name || `${sshHost.username}@${sshHost.ip}`, - sourceIP: sshHost.ip, - sourceSSHPort: sshHost.port, - sourceUsername: sshHost.username, - sourcePassword: - sshHost.authType === "password" ? sshHost.password : undefined, - sourceAuthMethod: sshHost.authType, - sourceSSHKey: sshHost.authType === "key" ? sshHost.key : undefined, - sourceKeyPassword: - sshHost.authType === "key" ? sshHost.keyPassword : undefined, - sourceKeyType: - sshHost.authType === "key" ? sshHost.keyType : undefined, - sourceCredentialId: sshHost.credentialId, - endpointHost: tunnel.endpointHost ?? "", - endpointIP: isDirect - ? sshHost.ip - : (endpointSsh?.ip ?? tunnel.endpointHost ?? ""), - endpointSSHPort: isDirect ? sshHost.port : (endpointSsh?.port ?? 22), - endpointUsername: isDirect - ? sshHost.username - : (endpointSsh?.username ?? ""), - endpointPassword: - endpointSsh?.authType === "password" - ? endpointSsh.password - : undefined, - endpointAuthMethod: isDirect - ? sshHost.authType - : (endpointSsh?.authType ?? "password"), - endpointSSHKey: - endpointSsh?.authType === "key" ? endpointSsh.key : undefined, - endpointKeyPassword: - endpointSsh?.authType === "key" - ? endpointSsh.keyPassword - : undefined, - endpointKeyType: - endpointSsh?.authType === "key" ? endpointSsh.keyType : undefined, - endpointCredentialId: endpointSsh?.credentialId, - sourcePort: tunnel.sourcePort, - endpointPort: tunnel.endpointPort, - maxRetries: tunnel.maxRetries, - retryInterval: tunnel.retryInterval * 1000, - autoStart: tunnel.autoStart, - isPinned: sshHost.pin, - useSocks5: sshHost.useSocks5, - socks5Host: sshHost.socks5Host, - socks5Port: sshHost.socks5Port, - socks5Username: sshHost.socks5Username, - socks5Password: sshHost.socks5Password, - }); - toast.success(t("tunnels.clientTunnelStarted")); - } else if (action === "disconnect") { - await disconnectTunnel(name); - toast.info(t("tunnels.clientTunnelStopped")); - } else { - await cancelTunnel(name); - toast.info(t("tunnels.canceling")); - } - } catch (err) { - toast.error(t("tunnels.manualControlError")); - console.error("Tunnel action failed:", err); - } finally { - setTunnelActions((prev) => ({ ...prev, [name]: false })); - } - }; + useEffect(() => subscribeTunnelStatuses(setStatuses), []); if (!host) { return (
-
+
@@ -434,12 +266,39 @@ export function TunnelTab({ ); } - const tunnels = sshHost?.tunnelConnections ?? []; - const connectedCount = tunnels.filter((t, i) => { - if (!sshHost) return false; - const name = tunnelName(sshHost, i, t); - return tunnelStatuses[name]?.status === "connected"; - }).length; + const tunnels = hostTunnelSettings(host).connections; + const names = tunnels.map((tunnel, index) => + serverTunnelName(host, index, tunnel), + ); + const connectedCount = names.filter( + (name) => statuses[name]?.status === "connected", + ).length; + + const handleAction = async ( + action: "connect" | "disconnect" | "cancel", + index: number, + ) => { + const tunnel = tunnels[index]; + if (!tunnel) return; + const name = names[index]; + setActing((current) => ({ ...current, [name]: true })); + try { + if (action === "connect") { + await connectTunnel(connectRequestFor(host, index, tunnel)); + toast.success(t("tunnels.clientTunnelStarted")); + } else if (action === "disconnect") { + await disconnectTunnel(name); + toast.info(t("tunnels.clientTunnelStopped")); + } else { + await cancelTunnel(name); + toast.info(t("tunnels.canceling")); + } + } catch { + toast.error(t("tunnels.manualControlError")); + } finally { + setActing((current) => ({ ...current, [name]: false })); + } + }; return (
@@ -454,7 +313,10 @@ export function TunnelTab({
- {connectedCount}/{tunnels.length} {t("tunnels.active")} + {t("tunnels.activeCount", { + connected: connectedCount, + total: tunnels.length, + })}
@@ -472,20 +334,16 @@ export function TunnelTab({ {tunnels.length > 0 ? (
- {tunnels.map((tunnel, index) => { - if (!sshHost) return null; - const name = tunnelName(sshHost, index, tunnel); - return ( - handleAction(action, index)} - /> - ); - })} + {tunnels.map((tunnel, index) => ( + handleAction(action, index)} + /> + ))}
) : (
diff --git a/plugins/tunnels/src/frontend/api.ts b/plugins/tunnels/src/frontend/api.ts new file mode 100644 index 000000000..073c1c8b5 --- /dev/null +++ b/plugins/tunnels/src/frontend/api.ts @@ -0,0 +1,248 @@ +import type { PluginApiClient } from "@termix/plugin-sdk/frontend"; +import type { + C2STunnelPreset, + TunnelConnectRequest, + TunnelConnection, + TunnelStatus, +} from "../shared/types"; + +export type TunnelStatusMap = Record; + +let client: PluginApiClient | null = null; + +/** Set from activate with app.api, cleared on deactivate. */ +export function setTunnelsApi(api: PluginApiClient | null): void { + client = api; +} + +function api(): PluginApiClient { + if (!client) throw new Error("The tunnels plugin is not active"); + return client; +} + +/** + * The server's own reason for a failed call, or the fallback. The routes + * always answer { error: string }. + */ +export function apiErrorMessage(error: unknown, fallback: string): string { + const data = (error as { response?: { data?: { error?: unknown } } }) + ?.response?.data; + if (typeof data?.error === "string" && data.error) return data.error; + return fallback; +} + +// Tunnel status is a process-local, in-memory view, so reading it is always +// safe. connectTunnel/disconnectTunnel/cancelTunnel always target the local +// embedded backend: they address a host by numeric id, and a synced host has +// a different numeric id in each database (only its syncId matches), so +// routing them to a remote backend would need a local-to-remote id lookup +// that does not exist yet. + +export async function getTunnelStatuses(): Promise { + const response = await api().get("/status"); + return response.data || {}; +} + +/** + * Local statuses win a name collision with remote ones, since every control + * targets the local backend. + */ +export function mergeTunnelStatuses( + local: TunnelStatusMap, + remote: TunnelStatusMap, +): TunnelStatusMap { + return { ...remote, ...local }; +} + +export interface ServerSentEvent { + event: string; + data: string; +} + +/** Splits a text/event-stream body into events. Returns what is left over. */ +export function parseServerSentEvents( + buffer: string, + onEvent: (event: ServerSentEvent) => void, +): string { + const blocks = buffer.split(/\r?\n\r?\n/); + const rest = blocks.pop() ?? ""; + for (const block of blocks) { + let event = "message"; + const data: string[] = []; + for (const line of block.split(/\r?\n/)) { + if (line.startsWith(":")) continue; + if (line.startsWith("event:")) event = line.slice(6).trim(); + else if (line.startsWith("data:")) data.push(line.slice(5).trimStart()); + } + if (data.length > 0) onEvent({ event, data: data.join("\n") }); + } + return rest; +} + +function streamUrl(): string | null { + const base = (client as unknown as { defaults?: { baseURL?: string } }) + ?.defaults?.baseURL; + if (base === undefined) return null; + return `${base.replace(/\/$/, "")}/plugin-api/tunnels/status/stream`; +} + +export interface SubscribeOptions { + /** Replaces the default fetch, for tests. */ + fetchImpl?: typeof fetch; + /** Statuses from a connected remote server, polled and merged in. */ + fetchRemote?: () => Promise; + pollIntervalMs?: number; +} + +/** + * Live tunnel statuses over the plugin's event stream, reconnecting after a + * drop. Falls back to polling when the stream URL cannot be worked out. + */ +export function subscribeTunnelStatuses( + onStatuses: (statuses: TunnelStatusMap) => void, + onError?: () => void, + options: SubscribeOptions = {}, +): () => void { + const controller = new AbortController(); + const fetchImpl = options.fetchImpl ?? fetch; + const pollIntervalMs = options.pollIntervalMs ?? 5000; + let latestLocal: TunnelStatusMap = {}; + let latestRemote: TunnelStatusMap = {}; + const timers = new Set>(); + + const emit = () => onStatuses(mergeTunnelStatuses(latestLocal, latestRemote)); + + const wait = (ms: number) => + new Promise((resolve) => { + const timer = setTimeout(() => { + timers.delete(timer); + resolve(); + }, ms); + timers.add(timer); + }); + + const url = streamUrl(); + + void (async () => { + while (!controller.signal.aborted) { + if (!url) { + try { + latestLocal = await getTunnelStatuses(); + emit(); + } catch { + onError?.(); + } + await wait(pollIntervalMs); + continue; + } + + const headers: Record = { + Accept: "text/event-stream", + }; + if (typeof window !== "undefined" && window.electronAPI?.isElectron) { + headers["X-Electron-App"] = "true"; + const jwt = localStorage.getItem("jwt"); + if (jwt) headers.Authorization = `Bearer ${jwt}`; + } + + try { + const response = await fetchImpl(url, { + credentials: "include", + headers, + signal: controller.signal, + }); + if (!response.ok || !response.body) throw new Error("stream failed"); + const reader = response.body.getReader(); + const decoder = new TextDecoder(); + let buffer = ""; + while (!controller.signal.aborted) { + const { value, done } = await reader.read(); + if (done) break; + buffer = parseServerSentEvents( + buffer + decoder.decode(value, { stream: true }), + (event) => { + if (event.event !== "statuses") return; + try { + latestLocal = JSON.parse(event.data) as TunnelStatusMap; + emit(); + } catch { + onError?.(); + } + }, + ); + } + if (!controller.signal.aborted) onError?.(); + } catch { + if (!controller.signal.aborted) onError?.(); + } + if (!controller.signal.aborted) await wait(1000); + } + })(); + + if (options.fetchRemote) { + const fetchRemote = options.fetchRemote; + void (async () => { + while (!controller.signal.aborted) { + try { + latestRemote = await fetchRemote(); + emit(); + } catch { + // A remote that is down just contributes nothing. + } + await wait(pollIntervalMs); + } + })(); + } + + return () => { + controller.abort(); + for (const timer of timers) clearTimeout(timer); + timers.clear(); + }; +} + +export async function connectTunnel( + request: TunnelConnectRequest, +): Promise { + await api().post("/connect", request); +} + +export async function disconnectTunnel(tunnelName: string): Promise { + await api().post("/disconnect", { tunnelName }); +} + +export async function cancelTunnel(tunnelName: string): Promise { + await api().post("/cancel", { tunnelName }); +} + +export async function getC2STunnelPresets(): Promise { + const response = await api().get("/presets"); + return response.data || []; +} + +export async function createC2STunnelPreset(data: { + name: string; + config: TunnelConnection[]; + platform?: string; + computerName?: string; +}): Promise { + const response = await api().post("/presets", data); + return response.data; +} + +export async function updateC2STunnelPreset( + id: number, + data: Partial<{ + name: string; + config: TunnelConnection[]; + platform: string; + computerName: string; + }>, +): Promise { + const response = await api().put(`/presets/${id}`, data); + return response.data; +} + +export async function deleteC2STunnelPreset(id: number): Promise { + await api().delete(`/presets/${id}`); +} diff --git a/src/ui/user/c2s-tunnel-config-utils.ts b/plugins/tunnels/src/frontend/c2s-tunnel-config-utils.ts similarity index 96% rename from src/ui/user/c2s-tunnel-config-utils.ts rename to plugins/tunnels/src/frontend/c2s-tunnel-config-utils.ts index 3a483c27b..874d47838 100644 --- a/src/ui/user/c2s-tunnel-config-utils.ts +++ b/plugins/tunnels/src/frontend/c2s-tunnel-config-utils.ts @@ -1,4 +1,4 @@ -import type { TunnelConnection, TunnelMode } from "@/types/index.js"; +import type { TunnelConnection, TunnelMode } from "../shared/types"; export type ClientTunnel = TunnelConnection & { localAddress: string; diff --git a/plugins/tunnels/src/frontend/host-tunnels.ts b/plugins/tunnels/src/frontend/host-tunnels.ts new file mode 100644 index 000000000..2bad79cab --- /dev/null +++ b/plugins/tunnels/src/frontend/host-tunnels.ts @@ -0,0 +1,65 @@ +import type { PluginHostRecord } from "@termix/plugin-sdk/frontend"; +import type { TunnelConnectRequest, TunnelConnection } from "../shared/types"; +import { serverTunnelName } from "../shared/tunnel-naming"; + +/** A host's tunnel settings, as the host payload's pluginSettings carries them. */ +export function hostTunnelSettings(host: PluginHostRecord | null | undefined): { + enabled: boolean; + connections: TunnelConnection[]; +} { + const settings = ( + host?.pluginSettings as Record> | undefined + )?.tunnels; + return { + enabled: settings?.enableTunnel === true, + connections: parseConnections(settings?.tunnelConnections), + }; +} + +export function parseConnections(value: unknown): TunnelConnection[] { + let parsed = value; + if (typeof parsed === "string") { + try { + parsed = JSON.parse(parsed); + } catch { + return []; + } + } + return Array.isArray(parsed) ? (parsed as TunnelConnection[]) : []; +} + +export function tunnelMode( + tunnel: Pick, +): "local" | "remote" | "dynamic" { + return tunnel.mode ?? tunnel.tunnelType ?? "local"; +} + +/** What POST /connect takes for a host's saved tunnel. */ +export function connectRequestFor( + host: { + id: string | number; + name?: string | null; + username?: string | null; + ip: string; + }, + index: number, + tunnel: TunnelConnection, +): TunnelConnectRequest { + const mode = tunnelMode(tunnel); + return { + name: serverTunnelName(host, index, tunnel), + sourceHostId: Number(host.id), + tunnelIndex: index, + scope: tunnel.scope ?? "s2s", + mode, + tunnelType: mode === "remote" ? "remote" : "local", + bindHost: tunnel.bindHost, + targetHost: tunnel.targetHost, + endpointHost: (tunnel.endpointHost ?? "").trim(), + sourcePort: tunnel.sourcePort, + endpointPort: tunnel.endpointPort ?? 0, + maxRetries: tunnel.maxRetries, + retryInterval: tunnel.retryInterval, + autoStart: tunnel.autoStart, + }; +} diff --git a/plugins/tunnels/src/frontend/index.tsx b/plugins/tunnels/src/frontend/index.tsx new file mode 100644 index 000000000..16b94aab0 --- /dev/null +++ b/plugins/tunnels/src/frontend/index.tsx @@ -0,0 +1,104 @@ +import type { ComponentType } from "react"; +import { Network, Plug } from "lucide-react"; +import type { + HomepageWidgetContribution, + TabProps, + TermixApp, +} from "@termix/plugin-sdk/frontend"; +import { TunnelTab } from "./TunnelTab"; +import { HostTunnelsSection } from "./HostTunnelsSection"; +import { + PortForwardingPanel, + TunnelStandalone, + TunnelWidget, + TunnelWidgetEditForm, +} from "./views"; +import { getTunnelStatuses, setTunnelsApi } from "./api"; +import { hostTunnelSettings } from "./host-tunnels"; + +// Matches the homepage canvas grid. +const GRID_SIZE = 30; + +function TunnelTabView({ host }: TabProps) { + return ; +} + +export function activate(app: TermixApp): void { + setTunnelsApi(app.api); + app.onDispose(() => setTunnelsApi(null)); + + // Keeps the "tunnel" tab type and ?view=tunnel links from before the + // conversion, so saved layouts and recent activity still open here. + app.registerTab("tunnel", TunnelTabView as ComponentType, { + icon: Network, + titleKey: "nav.tunnels", + persistent: true, + hostless: true, + standalone: TunnelStandalone, + activityTypes: ["tunnel"], + }); + + app.registerHostAction({ + id: "tunnel", + titleKey: "nav.tunnels", + icon: Network, + kind: "open", + order: 40, + tabType: "tunnel", + copyUrlView: "tunnel", + when: (host) => + host.enableSsh !== false && hostTunnelSettings(host).enabled, + }); + + app.registerHostEditorSection({ + id: "tunnels", + group: "ssh", + titleKey: "hosts.tabTunnels", + icon: Network, + order: 20, + component: HostTunnelsSection, + }); + + app.registerPanel("port-forwarding", PortForwardingPanel); + app.registerRailItem({ + id: "port-forwarding", + icon: Network, + titleKey: "nav.portForwarding", + kind: "panel", + electronOnly: true, + separatorAfter: true, + after: "credentials", + permission: "use", + }); + + app.registerSlotContribution("onboarding.features", { + actionId: "tunnels.feature", + titleKey: "onboarding.feature_tunnels", + descriptionKey: "onboarding.feature_tunnels_desc", + icon: Plug as ComponentType<{ className?: string }>, + }); + + app.registerHomepageWidget({ + id: "tunnel_widget", + name: "Tunnel Manager", + description: "Embedded SSH tunnel manager for a configured host", + category: "system", + icon: , + defaultConfig: { hostId: 0 }, + defaultSize: { w: GRID_SIZE * 16, h: GRID_SIZE * 10 }, + minSize: { w: GRID_SIZE * 8, h: GRID_SIZE * 6 }, + component: TunnelWidget, + editFormComponent: TunnelWidgetEditForm, + } as HomepageWidgetContribution); + + // The dashboard's active tunnel counter reads and opens these, and gets + // undefined back while the plugin is off. + app.registerAction("tunnels.statuses", (() => getTunnelStatuses()) as never, { + permission: "use", + }); + app.registerAction( + "tunnels.open", + (() => app.tabs.openSingletonTab("tunnel")) as never, + { permission: "use" }, + ); +} diff --git a/src/ui/features/tunnel/tunnel-form-utils.ts b/plugins/tunnels/src/frontend/tunnel-form-utils.ts similarity index 96% rename from src/ui/features/tunnel/tunnel-form-utils.ts rename to plugins/tunnels/src/frontend/tunnel-form-utils.ts index a07d78f84..e74af5b58 100644 --- a/src/ui/features/tunnel/tunnel-form-utils.ts +++ b/plugins/tunnels/src/frontend/tunnel-form-utils.ts @@ -1,4 +1,4 @@ -import type { TunnelMode } from "@/types/index.js"; +import type { TunnelMode } from "../shared/types"; type Translate = ( key: string, diff --git a/plugins/tunnels/src/frontend/views.tsx b/plugins/tunnels/src/frontend/views.tsx new file mode 100644 index 000000000..6171d9fcf --- /dev/null +++ b/plugins/tunnels/src/frontend/views.tsx @@ -0,0 +1,151 @@ +import { Network } from "lucide-react"; +import { + useHosts, + useTranslation, + type PluginHostRecord, + type StandaloneViewProps, +} from "@termix/plugin-sdk/frontend"; +import { + ConnectionScreen, + FullScreenAppWrapper, + Select2, +} from "@termix/plugin-sdk/ui"; +import { TunnelTab } from "./TunnelTab"; +import { C2STunnelPresetManager } from "./C2STunnelPresetManager"; +import { hostTunnelSettings } from "./host-tunnels"; + +/** The `?view=tunnel` full-screen page for one host. */ +export function TunnelStandalone({ hostId }: StandaloneViewProps) { + const { t } = useTranslation(); + return ( + + {(hostConfig, phase) => { + if (phase === "loading") { + return ( +
+ +
+ ); + } + if (!hostConfig) { + return ( +
+ +
+ ); + } + const host = { + ...hostConfig, + id: String(hostConfig.id), + } as unknown as PluginHostRecord; + return ; + }} +
+ ); +} + +/** The rail panel for the desktop app's client tunnels. */ +export function PortForwardingPanel() { + return ( +
+ +
+ ); +} + +export interface TunnelWidgetConfig { + hostId: number; +} + +/** Homepage widget: the tunnel tab for one host. */ +export function TunnelWidget({ + widget, + config, +}: { + widget: { title?: string | null }; + config: TunnelWidgetConfig; +}) { + const { t } = useTranslation(); + const { hosts, loaded } = useHosts(); + + const placeholder = (text: string) => ( +
+ + {text} +
+ ); + + if (!config.hostId) return placeholder(t("homepage.widgetNoHostSelected")); + if (!loaded) return placeholder(t("homepage.loading")); + + const host = hosts.find( + (candidate) => + String(candidate.id) === String(config.hostId) && + hostTunnelSettings(candidate).enabled, + ); + if (!host) return placeholder(t("homepage.widgetNoHostSelected")); + + return ( +
+ {widget.title && ( +
+ + + + + {widget.title} + +
+ )} +
e.stopPropagation()} + > + +
+
+ ); +} + +/** The widget's edit form: pick a host with tunnels on. */ +export function TunnelWidgetEditForm({ + config, + onChange, +}: { + config: TunnelWidgetConfig; + onChange: (config: TunnelWidgetConfig) => void; +}) { + const { t } = useTranslation(); + const { hosts } = useHosts(); + const options = hosts.filter( + (host) => host.enableSsh !== false && hostTunnelSettings(host).enabled, + ); + + return ( +
+ + + onChange({ ...config, hostId: Number(e.target.value) }) + } + className="h-8 text-xs border border-border bg-background px-2" + > + + {options.map((host) => ( + + ))} + +
+ ); +} diff --git a/plugins/tunnels/src/shared/tunnel-naming.ts b/plugins/tunnels/src/shared/tunnel-naming.ts new file mode 100644 index 000000000..cd6ae0c01 --- /dev/null +++ b/plugins/tunnels/src/shared/tunnel-naming.ts @@ -0,0 +1,76 @@ +/** + * Tunnel names, shared by the backend and every frontend view so the two + * sides can never build the same tunnel under different names. + */ + +/** A host's saved server tunnel: `::::