@traffic-arts/npm-static-demo
v1.0.1
Published
Single-file static HTML page built with Vite
Readme
@traffic-arts/npm-static-demo
Single-file static HTML page hosted on npm — proof-of-concept for using the npm registry and its mirrors as free, trusted hosting for arbitrary HTML pages.
What Is This
A Vite-built HTML page (all CSS, JS, and images inlined into one file) published to npm. Once live, mirrors like unpkg and npmmirror serve it as a fully rendered page on a trusted domain with valid TLS and CDN caching.
This technique was documented by OX Security in their ClickFix phishing research — 24 npm packages contained fake Cloudflare Captcha pages, served via unpkg on trusted domains.
Access the Page
# unpkg
https://unpkg.com/@traffic-arts/[email protected]/index.html
# npmmirror
https://registry.npmmirror.com/@traffic-arts/npm-static-demo/1.0.0/files/index.htmlShort URL (requires unpkg field in package.json):
https://unpkg.com/@traffic-arts/[email protected]How to Reproduce
- Create a single
index.htmlfile - Create a minimal
package.json:
{
"name": "@yourname/your-page",
"version": "1.0.0",
"files": ["index.html"],
"unpkg": "./index.html",
"publishConfig": {
"access": "public",
"registry": "https://registry.npmjs.org/"
}
}- Publish:
npm publish --access public- Access via mirror URLs above (sync takes a few minutes).
Repository
Source: github.com/trafficarts/npm_static_demo
More on Traffic Arts channel
License
MIT
