1.0.1 โ€ข Published 12 months ago

@pratik242/cloak-js v1.0.1

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

๐Ÿ›ก๏ธ cloak-js

A powerful JavaScript code protection tool for frontend apps. Obfuscate, lock to domains, inject anti-debug code, and secure logic with WebAssembly. Works with Vite, Next.js, and Parcel.

๐Ÿš€ Features

  • ๐Ÿ”’ Obfuscate JavaScript (using javascript-obfuscator)
  • ๐ŸŒ Domain lock protection
  • ๐Ÿ•ต๏ธโ€โ™‚๏ธ DevTools detection & self-defending runtime
  • ๐Ÿงช Tamper detection using SHA-256
  • ๐Ÿงฉ Optional WebAssembly support for core logic
  • ๐Ÿงฐ Plugin support for Vite, Parcel, and Next.js

๐Ÿ“ฆ Installation

npm install -g cloak-js

๐Ÿ’ป CLI Usage

cloak ./your-app.js --domain yourdomain.com --inject-runtime --tamper-check
OptionDescription
--domainLock script to a specific domain
--inject-runtimeAdds DevTools and debugger detection
--tamper-checkInjects SHA-256 hash validation

๐Ÿ”ง Framework Plugins

๐Ÿ”Œ Vite

import cloakPlugin from 'cloak-js/vite';

export default {
  plugins: [cloakPlugin()]
};

๐Ÿ”Œ Next.js

const cloakPlugin = require('cloak-js/next');

module.exports = cloakPlugin({ /* options */ })(nextConfig);

๐Ÿงช WebAssembly Secure Loader

import { loadSecureWasm } from 'cloak-js/wasm';

const secure = await loadSecureWasm('/secure.wasm');
secure.run();

๐Ÿ›ฃ๏ธ Roadmap

  • โœ… Obfuscation CLI
  • โœ… Domain locking
  • โœ… DevTools runtime injection
  • โœ… Tamper check (SHA-256)
  • โœ… WebAssembly loader
  • โœ… Vite, Next.js, Parcel plugins
  • โณ Svelte and Astro plugin
  • โณ CI/CD integration

๐Ÿ“ License

MIT โ€” by @pratikacharya1234