feat(security): harden gateway boundaries and usage policies

Consolidate subscription usage policy enforcement, privacy-safe persistence, and gateway security hardening into one reviewable change.

Includes bounded HTTP and execution envelopes, header and protocol guards, DNS and relay validation, authentication and secret projection hardening, secure backup/install paths, and regression coverage.
This commit is contained in:
elky
2026-09-04 03:45:52 +08:00
parent ddcbeb3ae9
commit 579f2c7cc1
1019 changed files with 190437 additions and 26080 deletions
@@ -322,6 +322,7 @@ import ProxyNodeSelect from '@/features/providers/components/ProxyNodeSelect.vue
import { useToast } from '@/composables/useToast'
import { useConfirm } from '@/composables/useConfirm'
import { parseApiError } from '@/utils/errorParser'
import { log } from '@/utils/logger'
import {
batchActionPoolKeys,
getPoolBatchDeleteTask,
@@ -669,8 +670,7 @@ async function executeAction(actionOverride?: PoolBatchActionValue): Promise<voi
successCount += 1
} catch (err) {
failedCount += 1
// eslint-disable-next-line no-console
console.error(`[PoolAccountBatchDialog] export failed (${key.key_id}):`, err)
log.error('Pool account credential export failed', err)
} finally {
progressDone.value += 1
}
@@ -716,8 +716,7 @@ async function executeAction(actionOverride?: PoolBatchActionValue): Promise<voi
successCount += result.affected
}
} catch (err) {
// eslint-disable-next-line no-console
console.error(`batch delete failed (batch ${batchIndex}/${totalBatches}):`, err)
log.error('Pool account batch delete failed', err)
failedCount += batch.length
}
@@ -749,8 +748,7 @@ async function executeAction(actionOverride?: PoolBatchActionValue): Promise<voi
})
successCount += result.affected
} catch (err) {
// eslint-disable-next-line no-console
console.error(`batch ${selectedAction.value} failed (batch ${batchIndex}/${totalBatches}):`, err)
log.error('Pool account batch action failed', err)
failedCount += batch.length
}
@@ -797,8 +795,7 @@ async function executeAction(actionOverride?: PoolBatchActionValue): Promise<voi
} catch (err) {
showError(parseApiError(err, '批量操作失败'))
} finally {
// eslint-disable-next-line no-console
console.info('[PoolAccountBatchDialog] executeAction timing', {
log.info('Pool account batch action timing', {
providerId: props.providerId,
action: selectedAction.value,
requestedCount,