Thanks to visit codestin.com
Credit goes to GitHub.com

Skip to content

ni5arga/quark

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Quark

A production-grade, zero-dependency browser fingerprinting library. Quark generates stable, deterministic identifiers while prioritizing user privacy and avoiding invasive tracking techniques.


Core Philosophy

Quark is built for security and fraud prevention, not for invasive advertising tracking. It avoids deprecated APIs and heavy footprinting methods that trigger browser warnings.

  • Zero Deps: ~4KB gzipped. No external bloat.
  • Privacy First: Built-in "Privacy Mode" to skip high-entropy sources like Canvas and Audio.
  • GDPR-Aware: Designed for legitimate interest use-cases and easy consent integration.
  • Async Execution: Parallel collection ensures execution finishes in < 50ms on modern hardware.

Installation

npm install quark-fingerprint

Quick Start

import { getFingerprint } from 'quark-fingerprint';

// Simple collection
const fp = await getFingerprint();

console.log(fp.id);         // Stable SHA-256 hash
console.log(fp.confidence); // 0.0 to 1.0 uniqueness score

Advanced Config

import { createAgent } from 'quark-fingerprint';

const agent = createAgent({
    privacyMode: true,     // Skip high-entropy collectors (Canvas, Audio, etc.)
    componentTimeout: 100, // Timeout per collector
    debug: false
});

const result = await agent.collect();

Collectors

Quark gathers signals through modular collectors. Each signal is hashed or normalized before the final fingerprint generation.

Collector Signals Collected Privacy
Browser UA, Client Hints, Timezone, Language, Locale Standard
Screen Dimensions, Color depth, Device pixel ratio, Orientation Low Entropy
Hardware Logical cores (Concurrency), Device memory, Touch support Standard
Graphics WebGL Vendor/Renderer, GPU precision parameters Standard
Canvas Text & Geometry rendering behavior (Hash only) High Entropy
Audio AudioContext oscillator and compressor dynamics (Hash only) High Entropy
Fonts OS font detection via layout narrow/wide width checks Standard
Permissions Feature states (Notifications, Midi, Geolocation, etc.) Behavioral
Media Input/Output device counts (Camera, Mic, Speakers) High Entropy
Preferences Color scheme, Reduced motion, Inverted colors, Webdriver Standard
Capabilities PDF support, Storage quota, Modern CSS feature support Low Entropy

Privacy & Security

Entropy vs. Privacy

Quark computes a confidence score based on the total entropy gathered. High entropy (e.g., Canvas rendering) provides high stability but can be used for cross-site tracking. In privacyMode, these sources are omitted, yielding a lower confidence score but higher user anonymity.

Legitimate Interest

Under GDPR, fingerprinting for security and fraud prevention (e.g., preventing bot attacks or account takeovers) often falls under "Legitimate Interest." However, we recommend disclosing use in your privacy policy.

Running Locally

Since the library uses ES Modules, you must serve the test files via a local server to avoid CORS issues with file:// URLs.

# Using Node
npx serve .

# Using Python
python3 -m http.server

Open test.html in your browser to see a live breakdown of your device's fingerprint.


License: MIT

About

Zero-dependency, production-ready browser fingerprinting library

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published