1.0.0 • Published 5 months ago

guardianjs-core v1.0.0

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

GuardianJS

Advanced bot detection and security middleware for Node.js applications.

Installation

npm install @guardianjs/core

Quick Start

import { GuardianJS } from '@guardianjs/core';

// Initialize GuardianJS
const guardian = new GuardianJS();

// Use with Express
app.use(guardian.middleware());

// Or use standalone
const result = await guardian.detect(request);

Features

  • Advanced bot detection
  • Behavior analysis
  • TLS fingerprinting
  • User agent analysis
  • Express middleware support
  • TypeScript support
  • Customizable configuration

Configuration

import { GuardianJS, GuardianConfig } from '@guardianjs/core';

const config: GuardianConfig = {
  threshold: 0.8,
  enableBehaviorAnalysis: true,
  enableTLSFingerprinting: true,
  // ... other options
};

const guardian = new GuardianJS(config);

API Reference

GuardianJS Class

Constructor

new GuardianJS(config?: GuardianConfig)

Methods

  • middleware(): Express middleware function
  • detect(request): Standalone detection function
  • analyze(data): Analyze behavior data

Configuration Options

OptionTypeDefaultDescription
thresholdnumber0.8Detection threshold
enableBehaviorAnalysisbooleantrueEnable behavior analysis
enableTLSFingerprintingbooleantrueEnable TLS fingerprinting
............

Contributing

Contributions are welcome! Please read our contributing guidelines.

License

MIT License - see LICENSE for details.

Support

For support, please:

  • Open an issue
  • Check existing documentation
  • Review closed issues before opening new ones

Security

Please report security vulnerabilities to security@guardianjs.com

Acknowledgments

  • Thanks to all contributors
  • Built with TypeScript
  • Tested with Jest

Made with ❤️ by the GuardianJS Team