@@ -205,6 +205,10 @@ function operator(proxies = [], targetPlatform, context) {
205205 // Gist, // Gist 类
206206 // download, // 内部的下载方法, 见 backend/src/utils/download.js
207207 // downloadFile, // 下载二进制文件, 见 backend/src/utils/download.js
208+ // age: {
209+ // encrypt, // age 加密, 返回 armored 文本
210+ // decrypt, // age 解密, 非 armored 文本会原样返回
211+ // },
208212 // MMDB, // Node.js 环境 可用于模拟 Surge/Loon 的 $utils.ipasn, $utils.ipaso, $utils.geoip. 具体见 https://t.me/zhetengsha/1269
209213 // isValidUUID, // 辅助判断是否为有效的 UUID
210214 // doh, // DNS over HTTPS 解析, 源码见 backend/src/utils/dns.js, 使用参考本项目里调用方式 backend/src/core/proxy-utils/processors/index.js
@@ -241,6 +245,20 @@ function operator(proxies = [], targetPlatform, context) {
241245 // }))
242246 // $server.reuse = config.reuse
243247
248+ // 示例: 使用 ProxyUtils.age.encrypt 加密文本
249+ // const armored = await ProxyUtils.age.encrypt(
250+ // 'hello age',
251+ // 'age1...'
252+ // )
253+ // console.log(armored)
254+
255+ // 示例: 使用 ProxyUtils.age.decrypt 解密 armored 文本
256+ // const plaintext = await ProxyUtils.age.decrypt(
257+ // armored,
258+ // 'AGE-SECRET-KEY-1...'
259+ // )
260+ // console.log(plaintext)
261+
244262 // 1. Surge 输出 WireGuard 完整配置
245263
246264 // let proxies = await produceArtifact({
0 commit comments