Skip to content

Latest commit

 

History

History
104 lines (85 loc) · 3.32 KB

File metadata and controls

104 lines (85 loc) · 3.32 KB

1.1.0

Refactor

🎯 Key Changes Summary

Architecture Refactoring

  • Before: Flat utils/ directory with mixed concerns
  • After: Modular modules/ structure with domain-specific organization
  • Impact: Better maintainability, tree-shaking support, and extensibility

New Features Added

  • IP Detection & VPN Bypass: Advanced IP detection with WebRTC leaks
  • Enhanced Location Module: Timezone, language, and geolocation support
  • Improved Browser Detection: Incognito mode detection
  • Better Network Information: Enhanced connection details

Package Configuration Improvements

  • Enhanced metadata and documentation
  • Comprehensive development scripts
  • Optimized keywords for better discoverability
  • Better exports configuration for tree-shaking

📁 File Structure Changes

New Modular Structure

src/
├── modules/                    # 🆕 Organized by domain
│   ├── os/                    # Operating System detection
│   │   ├── detector.ts
│   │   ├── types.ts
│   │   └── index.ts
│   ├── browser/               # Browser detection & capabilities
│   │   ├── detector.ts
│   │   ├── types.ts
│   │   └── index.ts
│   ├── device/                # Device hardware & battery
│   │   ├── detector.ts
│   │   ├── battery.ts
│   │   ├── getDeviceId.ts
│   │   ├── types.ts
│   │   └── index.ts
│   ├── network/               # Network information
│   │   ├── detector.ts
│   │   ├── types.ts
│   │   └── index.ts
│   ├── fingerprint/           # Device fingerprinting
│   │   ├── generator.ts
│   │   ├── types.ts
│   │   └── index.ts
│   ├── user-agent/            # User agent parsing
│   │   ├── detector.ts
│   │   ├── types.ts
│   │   └── index.ts
│   └── location/              # 🆕 Location & IP detection
│       ├── detector.ts
│       ├── types.ts
│       ├── index.ts
│       └── README.md
├── core/                      # Main device info aggregator
├── types/                     # Centralized type exports
└── index.ts                   # Clean public API

Removed Files

  • src/utils/ directory (all files moved to modules)
  • src/types/device-info.ts (consolidated into src/types/index.ts)

🆕 New Features

1. IP Detection & VPN Bypass Module

import { getIPInfo } from "@marufme/device-key";

const ipInfo = await getIPInfo();
console.log(ipInfo);
/*
{
  publicIP: "203.0.113.1",      // VPN IP
  realIP: "192.168.1.100",      // Real IP (if detected)
  isVPN: true,                  // VPN detected
  isProxy: false,               // Proxy detected
  isTor: false,                 // Tor detected
  country: "United States",     // Location
  city: "New York",
  isp: "NordVPN",              // VPN provider
  confidence: 0.7              // Detection confidence
}
*/

Detection Methods:

  • WebRTC IP Detection: ~70-80% VPN bypass rate
  • VPN/Proxy Detection: ~85-90% accuracy for major services
  • DNS Leak Detection: ~60-70% detection rate
  • Geolocation Analysis: Country, city, ISP information