feat: add secure remote channel media

This commit is contained in:
lofyer
2026-08-09 20:33:35 +08:00
parent 6c891f3522
commit 66b098ae36
46 changed files with 4403 additions and 1594 deletions
@@ -0,0 +1,23 @@
import { describe, expect, it } from 'vitest'
import { buildWechatSidecarEnvironment } from './wechat-sidecar-environment'
describe('buildWechatSidecarEnvironment', () => {
it('enforces TLS verification without inheriting secrets or proxy hooks', () => {
expect(
buildWechatSidecarEnvironment({
SystemRoot: 'C:\\Windows',
TEMP: 'C:\\Temp',
LANG: 'zh_CN.UTF-8',
NODE_TLS_REJECT_UNAUTHORIZED: '0',
NODE_OPTIONS: '--require C:\\inject.js',
HTTPS_PROXY: 'http://proxy.invalid',
API_KEY: 'secret'
})
).toEqual({
SystemRoot: 'C:\\Windows',
TEMP: 'C:\\Temp',
LANG: 'zh_CN.UTF-8',
NODE_TLS_REJECT_UNAUTHORIZED: '1'
})
})
})