mirror of
https://github.com/clash-verge-rev/clash-verge-rev.git
synced 2026-11-08 02:52:07 +08:00
Revert "feat(cvd): add device-bound subscription protocol"
This reverts commit 2cb9c13ab6.
This commit is contained in:
@@ -133,8 +133,7 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
|
||||
await patchProfile(form.uid, item)
|
||||
}
|
||||
} else {
|
||||
// 远程配置:编辑用代理回退重试;新建的代理回退已下沉到后端,
|
||||
// 后端用同一个 uid(同一 CVD 设备密钥/槽位)跨代理重试,前端不再重试。
|
||||
// 远程配置使用回退机制
|
||||
try {
|
||||
// 尝试正常操作
|
||||
if (openType === 'new') {
|
||||
@@ -143,16 +142,13 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
|
||||
if (!form.uid) throw new Error('UID not found')
|
||||
await patchProfile(form.uid, item)
|
||||
}
|
||||
} catch (err) {
|
||||
// 新建:后端已跨代理重试并复用同一密钥,前端再次 createProfile 会注册新公钥、
|
||||
// 可能额外占用一个设备槽位,因此直接上抛由外层提示错误。
|
||||
if (openType === 'new') throw err
|
||||
|
||||
// 编辑:用自身代理重试 patch,再恢复原始代理设置
|
||||
if (!form.uid) throw new Error('UID not found', { cause: err })
|
||||
} catch {
|
||||
// 首次创建/更新失败,尝试使用自身代理
|
||||
showNotice.info(
|
||||
'profiles.modals.profileForm.feedback.notifications.creationRetry',
|
||||
)
|
||||
|
||||
// 使用自身代理的配置
|
||||
const retryItem = {
|
||||
...item,
|
||||
option: {
|
||||
@@ -161,9 +157,17 @@ export function ProfileViewer({ onChange, ref }: ProfileViewerProps) {
|
||||
self_proxy: true,
|
||||
},
|
||||
}
|
||||
await patchProfile(form.uid, retryItem)
|
||||
// 编辑模式下恢复原始代理设置
|
||||
await patchProfile(form.uid, { option: originalOptions })
|
||||
|
||||
// 使用自身代理再次尝试
|
||||
if (openType === 'new') {
|
||||
await createProfile(retryItem, fileDataRef.current)
|
||||
} else {
|
||||
if (!form.uid) throw new Error('UID not found')
|
||||
await patchProfile(form.uid, retryItem)
|
||||
|
||||
// 编辑模式下恢复原始代理设置
|
||||
await patchProfile(form.uid, { option: originalOptions })
|
||||
}
|
||||
|
||||
showNotice.success(
|
||||
'profiles.modals.profileForm.feedback.notifications.creationSuccess',
|
||||
|
||||
@@ -472,15 +472,6 @@ export const BackupHistoryViewer = ({
|
||||
{pendingConfirmation.filename}
|
||||
</Typography>
|
||||
)}
|
||||
{pendingConfirmation?.action === 'restore' && (
|
||||
<Typography
|
||||
variant="caption"
|
||||
color="warning.main"
|
||||
sx={{ display: 'block', mt: 1.5 }}
|
||||
>
|
||||
{t('settings.modals.backup.messages.restoreCvdWarning')}
|
||||
</Typography>
|
||||
)}
|
||||
</BaseDialog>
|
||||
</BaseDialog>
|
||||
)
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "هل تريد بالتأكيد حذف ملف النسخة الاحتياطية هذا؟",
|
||||
"confirmRestore": "هل تريد بالتأكيد استعادة ملف النسخة الاحتياطية هذا؟",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "هل تريد بالتأكيد استعادة ملف النسخة الاحتياطية هذا؟"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Confirm to delete this backup file?",
|
||||
"confirmRestore": "Confirm to restore this backup file?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Confirm to restore this backup file?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Confirm to delete this backup file?",
|
||||
"confirmRestore": "Confirm to restore this backup file?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Confirm to restore this backup file?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Confirm to delete this backup file?",
|
||||
"confirmRestore": "Confirm to restore this backup file?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Confirm to restore this backup file?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "آیا از حذف این فایل پشتیبان اطمینان دارید؟",
|
||||
"confirmRestore": "آیا از بازیابی این فایل پشتیبان اطمینان دارید؟",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "آیا از بازیابی این فایل پشتیبان اطمینان دارید؟"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Konfirmasi untuk menghapus file cadangan ini?",
|
||||
"confirmRestore": "Konfirmasi untuk memulihkan file cadangan ini?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Konfirmasi untuk memulihkan file cadangan ini?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Confirm to delete this backup file?",
|
||||
"confirmRestore": "Confirm to restore this backup file?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Confirm to restore this backup file?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "이 백업 파일을 삭제하시겠습니까?",
|
||||
"confirmRestore": "이 백업 파일을 복원하시겠습니까?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "이 백업 파일을 복원하시겠습니까?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "Список WebDAV успешно обновлён",
|
||||
"webdavRefreshFailed": "Не удалось обновить список WebDAV: {{error}}",
|
||||
"confirmDelete": "Вы уверены, что хотите удалить этот файл резервной копии?",
|
||||
"confirmRestore": "Вы уверены, что хотите восстановить этот файл резервной копии?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Вы уверены, что хотите восстановить этот файл резервной копии?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Автоматическое резервное копирование",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Bu yedek dosyasını silmeyi onaylıyor musunuz?",
|
||||
"confirmRestore": "Bu yedek dosyasını geri yüklemeyi onaylıyor musunuz?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Bu yedek dosyasını geri yüklemeyi onaylıyor musunuz?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV refresh succeeded",
|
||||
"webdavRefreshFailed": "WebDAV refresh failed: {{error}}",
|
||||
"confirmDelete": "Бу резерв копия файлын бетерергә телисезме?",
|
||||
"confirmRestore": "Бу резерв копия файлын кире кайтарырга телисезме?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "Бу резерв копия файлын кире кайтарырга телисезме?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "Automatic backup",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV 刷新成功",
|
||||
"webdavRefreshFailed": "WebDAV 刷新失败: {{error}}",
|
||||
"confirmDelete": "确认删除此备份文件吗?",
|
||||
"confirmRestore": "确认恢复此份文件吗?",
|
||||
"restoreCvdWarning": "订阅的设备密钥仅存于本机钥匙串,不随备份导出。在同一设备恢复会复用已有密钥;仅当在新设备或重装系统后(钥匙串已清空)恢复时,每个远程订阅才会在下次更新时注册新的设备密钥,此时若机场限制设备数,可能需要先解绑旧设备。"
|
||||
"confirmRestore": "确认恢复此份文件吗?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "自动备份",
|
||||
|
||||
@@ -352,8 +352,7 @@
|
||||
"webdavRefreshSuccess": "WebDAV 更新成功",
|
||||
"webdavRefreshFailed": "WebDAV 更新失敗: {{error}}",
|
||||
"confirmDelete": "確認是否刪除此備份檔案嗎?",
|
||||
"confirmRestore": "確認還原此份檔案嗎?",
|
||||
"restoreCvdWarning": "Subscription device keys live in this device's keychain, not in the backup. Restoring on the same device reuses the existing keys. On a new device or after reinstalling (keychain cleared), each remote subscription registers a new device key on its next update — if your provider limits devices, you may need to unbind old ones."
|
||||
"confirmRestore": "確認還原此份檔案嗎?"
|
||||
},
|
||||
"auto": {
|
||||
"title": "自動備份",
|
||||
|
||||
@@ -526,7 +526,6 @@ export const translationKeys = [
|
||||
'settings.modals.backup.messages.webdavRefreshFailed',
|
||||
'settings.modals.backup.messages.confirmDelete',
|
||||
'settings.modals.backup.messages.confirmRestore',
|
||||
'settings.modals.backup.messages.restoreCvdWarning',
|
||||
'settings.modals.backup.auto.title',
|
||||
'settings.modals.backup.auto.scheduleLabel',
|
||||
'settings.modals.backup.auto.scheduleHelper',
|
||||
|
||||
@@ -764,7 +764,6 @@ export interface TranslationResources {
|
||||
localBackupImported: string
|
||||
localBackupImportFailed: string
|
||||
passwordRequired: string
|
||||
restoreCvdWarning: string
|
||||
restoreSuccess: string
|
||||
usernameRequired: string
|
||||
webdavConfigSaved: string
|
||||
|
||||
Reference in New Issue
Block a user