OpenGithubs / OpenGithubs/weekly
【开源自荐】StaticShield - 军工级的网页加密工具
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 1.7k
- Forks
- 71
- PR merge metrics
- No merged PRs in 30d
Description
开源地址:https://github.com/wangshengithub/staticshield
https://github.com/user-attachments/assets/fab6794c-2f36-4494-bcc0-d00058ef1b33
项目简介:
StaticShield 是一个零依赖的静态网页加密工具。采用与 NSA 绝密级文件保护同源的 AES-256 + PBKDF2 百万次迭代 + HMAC-SHA256 加密体系,一键将 HTML(含 CSS / JS / 图片)加密为单个「自解密页面」,部署到任意静态托管,访客输入密码后在浏览器本地解密还原,全程无需服务器参与。
在线演示:
我用它给自己的纯前端小游戏「奉国牧马」(1 个 HTML + 1 个 CSS + 16 个 JS)一键加密,可以直接体验效果:
- 加密站:https://horseempire-staticshield.pages.dev/ (密码:
horseempire-staticshield) - 原站:https://horseempire.pages.dev/
打开加密站看到门禁页面,输入密码,整个游戏瞬间还原,体验与原站一致。
https://github.com/user-attachments/assets/5ff99b44-96f2-4cf9-ad4c-4aeb3ebb7162
核心特性:
🔐 军工级安全:AES-256-CBC + PBKDF2(1,000,000 次迭代,超 OWASP 建议值 67%)+ HMAC-SHA256 验签(Encrypt-then-MAC),与 NIST / NSA 认证的绝密级加密标准同源
⚡ 一键加密:一条命令完成打包 + 加密 + 输出,18 个文件 → 1 个加密文件,全程不到 1 秒
🖥️ 双模式操作:CLI 命令行批量处理,或 node encrypt.js --gui 启动 Web 图形界面,拖文件、设密码、点加密、下载,零门槛上手
📦 整站打包:--bundle 自动将外部 CSS / JS / 图片内联为单文件后整体加密
🚫 零依赖:无需 npm install,Node.js ≥ 18 开箱即用
技术亮点:
- 加密核心基于 WebCrypto API,Node 与浏览器同构,一份代码两端复用
- 浏览器端解密由操作系统底层加密库执行(非 JS 手写算法),密钥不可被 JS 读取
- 分享链接密码写入 URL Hash,不经过服务器,日志中无痕迹
- 支持重叠加密(多层密码)、CSPRNG 随机强密码生成、记住我等实用功能
适用场景:
- 内部文档 / 付费内容的轻量级访问保护
- 小圈子分享游戏、工具,防搜索引擎收录
- 临时私密页面,不想搭后端、不想用第三方 SaaS
# 一键加密整个多文件项目
node encrypt.js index.html --bundle -p MyPwd123 -d ./dist
# 或者打开图形界面,拖文件操作
node encrypt.js --gui
开源协议:MIT
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
This issue presents the StaticShield project and links its repository, demo pages, and usage commands. No file, test, or requested change is identified, so first confirm whether the weekly project listing needs an editorial update; done would require a defined content change and acceptance criteria.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, node.js
- Domain
- content
- Issue type
- Documentation
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100