mirror of
https://github.com/farion1231/cc-switch.git
synced 2026-07-29 01:25:33 +08:00
Webdav (#923)
* feat: WebDAV backup/restore - Add WebDAV test/backup/restore commands and settings\n- Fix ja i18n missing keys; decode PROPFIND href as UTF-8\n- Stabilize Windows prompt auto-import tests via CC_SWITCH_TEST_HOME * chore: format and minor cleanups * fix: update build config * feat(webdav): unify sync UX and hardening fixes * fix(webdav): harden sync flow and stabilize sync UX/tests * fix(webdav): add resource limits to skills.zip extraction Prevent zip bomb / resource exhaustion by enforcing: - MAX_EXTRACT_ENTRIES (10,000 files) - MAX_EXTRACT_BYTES (512 MB cumulative) * refactor(webdav): drop deviceId and display deviceName only --------- Co-authored-by: small-lovely-cat <77799160+small-lovely-cat@users.noreply.github.com> Co-authored-by: saladday <1203511142@qq.com>
This commit is contained in:
@@ -266,6 +266,77 @@
|
||||
"selectFileFailed": "Please choose a valid SQL backup file",
|
||||
"configCorrupted": "SQL file may be corrupted or invalid",
|
||||
"backupId": "Backup ID",
|
||||
"webdavSync": {
|
||||
"title": "WebDAV Cloud Sync",
|
||||
"description": "Sync database and skill configurations across devices via WebDAV.",
|
||||
"baseUrl": "WebDAV Server URL",
|
||||
"baseUrlPlaceholder": "https://dav.example.com/dav/",
|
||||
"username": "WebDAV Account",
|
||||
"usernamePlaceholder": "Email or username",
|
||||
"password": "WebDAV Password",
|
||||
"passwordPlaceholder": "App password",
|
||||
"remoteRoot": "Remote Root Directory",
|
||||
"profile": "Sync Profile Name",
|
||||
"test": "Test Connection",
|
||||
"testing": "Testing...",
|
||||
"testSuccess": "Connection successful",
|
||||
"testFailed": "Connection failed: {{error}}",
|
||||
"save": "Save Config",
|
||||
"saving": "Saving...",
|
||||
"saveFailed": "Failed to save config: {{error}}",
|
||||
"upload": "Upload to Cloud",
|
||||
"uploading": "Uploading...",
|
||||
"uploadSuccess": "Uploaded to WebDAV",
|
||||
"uploadFailed": "Upload failed: {{error}}",
|
||||
"download": "Download from Cloud",
|
||||
"downloading": "Downloading...",
|
||||
"downloadSuccess": "Downloaded and restored from WebDAV",
|
||||
"downloadFailed": "Download failed: {{error}}",
|
||||
"lastSync": "Last sync: {{time}}",
|
||||
"missingUrl": "Please enter the WebDAV server URL",
|
||||
"presets": {
|
||||
"label": "Provider",
|
||||
"jianguoyun": "Jianguoyun",
|
||||
"jianguoyunHint": "Generate an \"App Password\" in Jianguoyun security settings. Do not use your login password.",
|
||||
"nextcloud": "Nextcloud",
|
||||
"nextcloudHint": "Replace your-server with your Nextcloud domain and USERNAME with your username.",
|
||||
"synology": "Synology NAS",
|
||||
"synologyHint": "Install and enable the WebDAV Server package in Synology Package Center first.",
|
||||
"custom": "Custom"
|
||||
},
|
||||
"remoteRootDefault": "Default: cc-switch-sync",
|
||||
"profileDefault": "Default: default",
|
||||
"saveAndTestSuccess": "Config saved, connection OK",
|
||||
"saveAndTestFailed": "Config saved, but connection test failed: {{error}}",
|
||||
"noRemoteData": "No sync data found on the remote server",
|
||||
"incompatibleVersion": "Remote data version incompatible (v{{version}}), current supports v2",
|
||||
"unsaved": "Unsaved",
|
||||
"saved": "Saved",
|
||||
"unsavedChanges": "Please save config first",
|
||||
"saveBeforeSync": "Save configuration first to enable upload/download.",
|
||||
"fetchingRemote": "Fetching remote info...",
|
||||
"fetchRemoteFailed": "Failed to fetch remote info. Please check configuration and network.",
|
||||
"confirmDownload": {
|
||||
"title": "Restore from Cloud",
|
||||
"deviceName": "Uploaded by",
|
||||
"createdAt": "Uploaded at",
|
||||
"artifacts": "Contents",
|
||||
"warning": "This will overwrite all local data and skill configurations",
|
||||
"confirm": "Confirm Restore"
|
||||
},
|
||||
"confirmUpload": {
|
||||
"title": "Upload to Cloud",
|
||||
"content": "The following will be synced to the WebDAV server:",
|
||||
"dbItem": "Database (all provider configs and data)",
|
||||
"skillsItem": "Skills (all custom skills)",
|
||||
"targetPath": "Target path",
|
||||
"existingData": "Existing cloud data",
|
||||
"deviceName": "Uploaded by",
|
||||
"createdAt": "Uploaded at",
|
||||
"warning": "This will overwrite existing sync data on the remote server",
|
||||
"confirm": "Confirm Upload"
|
||||
}
|
||||
},
|
||||
"autoReload": "Data refreshed",
|
||||
"languageOptionChinese": "中文",
|
||||
"languageOptionEnglish": "English",
|
||||
|
||||
@@ -266,6 +266,77 @@
|
||||
"selectFileFailed": "有効な SQL バックアップファイルを選択してください",
|
||||
"configCorrupted": "SQL ファイルが壊れているか形式が無効な可能性があります",
|
||||
"backupId": "バックアップ ID",
|
||||
"webdavSync": {
|
||||
"title": "WebDAV クラウド同期",
|
||||
"description": "WebDAV を使ってデバイス間でデータベースとスキル設定を同期します。",
|
||||
"baseUrl": "WebDAV サーバー URL",
|
||||
"baseUrlPlaceholder": "https://example.com/remote.php/dav/files/user",
|
||||
"username": "ユーザー名",
|
||||
"usernamePlaceholder": "メールアドレスまたはユーザー名",
|
||||
"password": "パスワード",
|
||||
"passwordPlaceholder": "アプリパスワード",
|
||||
"remoteRoot": "リモートルートディレクトリ",
|
||||
"profile": "同期プロファイル名",
|
||||
"test": "接続テスト",
|
||||
"testing": "テスト中...",
|
||||
"testSuccess": "接続成功",
|
||||
"testFailed": "接続失敗:{{error}}",
|
||||
"save": "設定を保存",
|
||||
"saving": "保存中...",
|
||||
"saveFailed": "設定の保存に失敗しました:{{error}}",
|
||||
"upload": "クラウドにアップロード",
|
||||
"uploading": "アップロード中...",
|
||||
"uploadSuccess": "WebDAV にアップロードしました",
|
||||
"uploadFailed": "アップロードに失敗しました:{{error}}",
|
||||
"download": "クラウドからダウンロード",
|
||||
"downloading": "ダウンロード中...",
|
||||
"downloadSuccess": "WebDAV からダウンロード・復元しました",
|
||||
"downloadFailed": "ダウンロードに失敗しました:{{error}}",
|
||||
"lastSync": "前回の同期:{{time}}",
|
||||
"missingUrl": "WebDAV サーバー URL を入力してください",
|
||||
"presets": {
|
||||
"label": "サービス",
|
||||
"jianguoyun": "坚果云",
|
||||
"jianguoyunHint": "坚果云の「セキュリティ設定」で「サードパーティアプリパスワード」を生成してください。ログインパスワードは使用しないでください。",
|
||||
"nextcloud": "Nextcloud",
|
||||
"nextcloudHint": "your-server を Nextcloud サーバーのアドレスに、USERNAME をユーザー名に置き換えてください。",
|
||||
"synology": "Synology NAS",
|
||||
"synologyHint": "Synology の「パッケージセンター」で WebDAV Server パッケージをインストール・有効化してください。",
|
||||
"custom": "カスタム"
|
||||
},
|
||||
"remoteRootDefault": "デフォルト: cc-switch-sync",
|
||||
"profileDefault": "デフォルト: default",
|
||||
"saveAndTestSuccess": "設定を保存しました。接続正常です",
|
||||
"saveAndTestFailed": "設定を保存しましたが、接続テストに失敗しました:{{error}}",
|
||||
"noRemoteData": "クラウドに同期データが見つかりません",
|
||||
"incompatibleVersion": "リモートデータのバージョンに互換性がありません(v{{version}})。現在 v2 をサポートしています",
|
||||
"unsaved": "未保存",
|
||||
"saved": "保存済み",
|
||||
"unsavedChanges": "先に設定を保存してください",
|
||||
"saveBeforeSync": "アップロード/ダウンロードを有効にするには、先に設定を保存してください。",
|
||||
"fetchingRemote": "リモート情報を取得中...",
|
||||
"fetchRemoteFailed": "リモート情報の取得に失敗しました。設定とネットワークを確認してください。",
|
||||
"confirmDownload": {
|
||||
"title": "クラウドから復元",
|
||||
"deviceName": "アップロード元",
|
||||
"createdAt": "アップロード日時",
|
||||
"artifacts": "内容",
|
||||
"warning": "ローカルのすべてのデータとスキル設定が上書きされます",
|
||||
"confirm": "復元を実行"
|
||||
},
|
||||
"confirmUpload": {
|
||||
"title": "クラウドにアップロード",
|
||||
"content": "以下の内容を WebDAV サーバーに同期します:",
|
||||
"dbItem": "データベース(すべてのプロバイダー設定とデータ)",
|
||||
"skillsItem": "スキル(すべてのカスタムスキル)",
|
||||
"targetPath": "保存先パス",
|
||||
"existingData": "クラウドの既存データ",
|
||||
"deviceName": "アップロード元",
|
||||
"createdAt": "アップロード日時",
|
||||
"warning": "リモートの既存同期データが上書きされます",
|
||||
"confirm": "アップロードを実行"
|
||||
}
|
||||
},
|
||||
"autoReload": "データを更新しました",
|
||||
"languageOptionChinese": "中文",
|
||||
"languageOptionEnglish": "English",
|
||||
|
||||
@@ -266,6 +266,77 @@
|
||||
"selectFileFailed": "请选择有效的 SQL 备份文件",
|
||||
"configCorrupted": "SQL 文件可能已损坏或格式不正确",
|
||||
"backupId": "备份ID",
|
||||
"webdavSync": {
|
||||
"title": "WebDAV 云同步",
|
||||
"description": "通过 WebDAV 在多设备间同步数据库和技能配置。",
|
||||
"baseUrl": "WebDAV 服务器地址",
|
||||
"baseUrlPlaceholder": "https://dav.jianguoyun.com/dav/",
|
||||
"username": "WebDAV 账户",
|
||||
"usernamePlaceholder": "邮箱账号",
|
||||
"password": "WebDAV 密码",
|
||||
"passwordPlaceholder": "应用密码(坚果云请使用「第三方应用密码」)",
|
||||
"remoteRoot": "远程根目录",
|
||||
"profile": "同步配置名",
|
||||
"test": "测试连接",
|
||||
"testing": "测试中...",
|
||||
"testSuccess": "连接成功",
|
||||
"testFailed": "连接失败:{{error}}",
|
||||
"save": "保存配置",
|
||||
"saving": "保存中...",
|
||||
"saveFailed": "保存配置失败:{{error}}",
|
||||
"upload": "上传到云端",
|
||||
"uploading": "上传中...",
|
||||
"uploadSuccess": "已上传到 WebDAV",
|
||||
"uploadFailed": "上传失败:{{error}}",
|
||||
"download": "从云端下载",
|
||||
"downloading": "下载中...",
|
||||
"downloadSuccess": "已从 WebDAV 下载并恢复",
|
||||
"downloadFailed": "下载失败:{{error}}",
|
||||
"lastSync": "上次同步:{{time}}",
|
||||
"missingUrl": "请填写 WebDAV 服务器地址",
|
||||
"presets": {
|
||||
"label": "服务商",
|
||||
"jianguoyun": "坚果云",
|
||||
"jianguoyunHint": "请在坚果云「安全选项」中生成「第三方应用密码」,不要使用登录密码。",
|
||||
"nextcloud": "Nextcloud",
|
||||
"nextcloudHint": "请将 your-server 替换为你的 Nextcloud 服务器地址,USERNAME 替换为你的用户名。",
|
||||
"synology": "群晖 NAS",
|
||||
"synologyHint": "请先在群晖「套件中心」安装并启用 WebDAV Server 套件。",
|
||||
"custom": "自定义"
|
||||
},
|
||||
"remoteRootDefault": "默认: cc-switch-sync",
|
||||
"profileDefault": "默认: default",
|
||||
"saveAndTestSuccess": "配置已保存,连接正常",
|
||||
"saveAndTestFailed": "配置已保存,但连接测试失败:{{error}}",
|
||||
"noRemoteData": "云端没有找到同步数据",
|
||||
"incompatibleVersion": "远端数据版本不兼容(v{{version}}),当前支持 v2",
|
||||
"unsaved": "未保存",
|
||||
"saved": "已保存",
|
||||
"unsavedChanges": "请先保存配置",
|
||||
"saveBeforeSync": "请先保存配置,再使用上传/下载。",
|
||||
"fetchingRemote": "获取远端信息...",
|
||||
"fetchRemoteFailed": "获取远端信息失败,请检查配置和网络后重试。",
|
||||
"confirmDownload": {
|
||||
"title": "从云端恢复",
|
||||
"deviceName": "上传设备",
|
||||
"createdAt": "上传时间",
|
||||
"artifacts": "包含内容",
|
||||
"warning": "恢复将覆盖本地所有数据和技能配置",
|
||||
"confirm": "确认恢复"
|
||||
},
|
||||
"confirmUpload": {
|
||||
"title": "上传到云端",
|
||||
"content": "将同步以下内容到 WebDAV 服务器:",
|
||||
"dbItem": "数据库(所有 Provider 配置和数据)",
|
||||
"skillsItem": "技能包(所有自定义技能)",
|
||||
"targetPath": "目标路径",
|
||||
"existingData": "云端已有数据",
|
||||
"deviceName": "上传设备",
|
||||
"createdAt": "上传时间",
|
||||
"warning": "将覆盖云端已有的同步数据",
|
||||
"confirm": "确认上传"
|
||||
}
|
||||
},
|
||||
"autoReload": "数据已刷新",
|
||||
"languageOptionChinese": "中文",
|
||||
"languageOptionEnglish": "English",
|
||||
|
||||
Reference in New Issue
Block a user