Add image download proxy support to OneBot

Introduces an 'imageDownloadProxy' config option to OneBot, allowing image downloads via a specified HTTP proxy. Updates the file download logic in napcat-common to use the undici library for proxy support, and propagates the new config through backend, frontend, and type definitions. Also adds undici as a dependency.
This commit is contained in:
手瓜一十雪 committed 2026-01-29 20:32:01 +08:00
1 parent 34ca919c4d
commit 0779628be5
9 files changed
+119 -64

No files matched your search

+9
View File
@@ -51,6 +51,9 @@ importers:
file-type:
specifier: ^21.0.0
version: 21.1.0
undici:
specifier: ^6.19.0
version: 6.23.0
devDependencies:
'@types/node':
specifier: ^22.0.1
@@ -6605,6 +6608,10 @@ packages:
undici-types@6.21.0:
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
undici@6.23.0:
resolution: {integrity: sha512-VfQPToRA5FZs/qJxLIinmU59u0r7LXqoJkCzinq3ckNJp3vKEh7jTWN589YQ5+aoAC/TGRLyJLCPKcLQbM8r9g==}
engines: {node: '>=18.17'}
unified@11.0.5:
resolution: {integrity: sha512-xKvGhPWw3k84Qjh8bI3ZeJjqnyadK+GEFtazSfZv/rKeTkTjOJho6mFqh2SM96iIcZokxiOpg78GazTSg8+KHA==}
@@ -14154,6 +14161,8 @@ snapshots:
undici-types@6.21.0: {}
undici@6.23.0: {}
unified@11.0.5:
dependencies:
'@types/unist': 3.0.3