Track: enable `sfw` on macOS/Windows once vp + sfw upstream TLS issues are resolved
@fengmk2 已经在做这个了。
开始于 2026年5月26日。
评估
这个 Issue 还没有评估数据。
描述
Background
PR #72 added an sfw input that wraps vp install with Socket Firewall Free. On macOS / Windows runners the wrapped install failed with tlsv1 alert unknown ca, so the action currently falls back to plain vp install with a warning on non-Linux.
This issue tracks the work needed (on both sides) to re-enable sfw everywhere.
Root cause
The failing call is vp's preflight to https://registry.npmjs.org/pnpm/latest, which sfw MITM-proxies. The handshake fails before sfw can inspect the install because two independent problems stack:
-
sfw issues a CA certificate with a present-but-empty Extended Key Usage extension. OpenSSL is lenient and accepts it; rustls (which vp uses) and Go
crypto/x509reject it asUnknownIssuer. Tracked upstream: -
vp's HTTP client doesn't speak the sfw integration surface. Survey of
voidzero-dev/vp(commit at time of PR #72):reqwest0.13 withdefault-features = false, no auto-proxy, no auto-CA- macOS/Linux uses rustls with the baked Mozilla bundle —
rustls-native-certsis not in use, so installing sfw's CA into the OS keychain does nothing - No
SSL_CERT_FILE/NODE_EXTRA_CA_CERTS/add_root_certificatehandling - No
HTTPS_PROXY/HTTP_PROXY/NO_PROXYhonoring (barereqwest::get(url)calls; noClient::builder().proxy(…)) - Bootstrap site:
crates/vite_install/src/package_manager.rs:471-481(HttpClient::new().get_json(…))
Ubuntu happens to pass today because GitHub's ubuntu-latest runner has pnpm preinstalled, so vp skips the bootstrap fetch entirely and never touches sfw's proxy.
For reference, npm / pnpm work with sfw because sfw injects a richer env into the child process — confirmed via strings on the sfw v1.10.0 binary:
// from inside sfw's getSubProcessEnv()
HTTP_PROXY, HTTPS_PROXY, http_proxy, https_proxy,
SSL_CERT_FILE, SSL_CERT_DIR, NODE_EXTRA_CA_CERTS,
YARN_HTTP_PROXY, YARN_HTTPS_PROXY, YARN_HTTPS_CA_FILE_PATH,
PIP_CERT, CARGO_HTTP_CAINFO, CARGO_HTTP_PROXY,
GIT_SSL_CAINFO, GIT_PROXY_SSL_CAINFO
Node-based clients pick up NODE_EXTRA_CA_CERTS + HTTPS_PROXY automatically. vp does not.
Work to unblock macOS / Windows
Track A — upstream sfw
Wait for SocketDev to ship a release with the EKU fix from #30 / #43. Pin sfw to a known-good version once available.
Track B — vp (separate PR against voidzero-dev/vp)
Minimum-viable change for sfw-compatibility (~80 LOC):
- Centralize HTTP into a single configurable
reqwest::Client(replace per-callreqwest::get(url)with a shared client). Touchescrates/vite_install/src/request.rs. - Honor
HTTPS_PROXY/HTTP_PROXY/NO_PROXYviaClient::builder().proxy(reqwest::Proxy::https_from_env()). Enable reqwest'shttp-proxyfeature (currently disabled because ofdefault-features = false). - Inject extra CAs from
SSL_CERT_FILE(industry-standard env var also set by sfw) viaClientBuilder::add_root_certificate(reqwest::Certificate::from_pem(…)). - Add
VP_INSECURE_TLS=1opt-in as a diagnostic escape hatch (loud warning at startup; never recommended for production).
Phase-2 (separate PR, behind a flag, then default-on):
5. Switch macOS/Linux from baked Mozilla bundle to rustls-native-certs so OS-installed CAs (sfw, corporate MDM, etc.) work without env vars.
When both tracks land
In setup-vp:
- Remove
isSfwSupported()Linux gate insrc/index.ts - Drop the non-Linux fallback warning + revert
effectiveSfwplumbing - Restore the assertions in
test-sfw(sfw --versionshould resolve on all three OSes) - Remove the
[!IMPORTANT]Linux-only callout from the README
Related
- PR: voidzero-dev/setup-vp#72
- Upstream sfw: SocketDev/sfw-free#30, SocketDev/sfw-free#43
- 主要语言
- TypeScript
- 星标
- 110
- 派生
- 22
- 平均合并
- 1 天 5 小时
- 30 天内合并 PR
- 31
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
voidzero-dev/setup-vp 的其他 Issue
-
难度 4/5 3-5 天 新手友好度 48/100
voidzero-dev/setup-vp#164 · 1 条评论 ·
-
voidzero-dev/setup-vp#161 · 已指派 1 人 ·
-
enhancement
voidzero-dev/setup-vp#155 · 5 条评论 · 已指派 1 人 ·
-
voidzero-dev/setup-vp#81 · 5 条评论 · 3 个 reaction · 已指派 1 人 ·
-
voidzero-dev/setup-vp#32 · 已指派 1 人 ·
查看 voidzero-dev/setup-vp 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 65/100
-
难度 2/5 1-3 小时 新手友好度 75/100
-
bug v2
难度 2/5 1-3 小时 新手友好度 75/100
modelcontextprotocol/inspector#2458 · 1 条评论 ·
-
难度 1/5 1 小时以内 新手友好度 75/100
railmapgen/rmp-gallery#4068 ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
难度 2/5 1-3 小时 新手友好度 70/100
carbon-design-system/ibm-products#9907 ·