npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@hackthedev/dsync-ipsec

v1.0.2

Published

IP Based Security Library against Abuse

Readme

dSyncIPSec

This library comes with features meant to prevent abuse in form of spam and other malicious activities and comes with the following detections and features:

  • Block known abusers, bogon IPs, datacenters, crawlers, proxies, satelites, Tor IPs and VPNs.
  • Possibility to block traffic from entire Countries
  • Whitelist and Blacklist feature based on IP address and Company Domains

The library was designed for usage with express and filtering abusive and (potentially) malicious traffic based on the IP address.

[!IMPORTANT]

It is highly recommended that you cache or store the API response!!!!


Setup

import dSyncIPSec from "@hackthedev/dsync-ipsec"

// will use default settings
export let ipsec = new dSyncIPSec();

// alternatively, with settings already specified.
// settings shown here are the default settings.
export let ipsec = new dSyncIPSec({
    blockBogon: true,
    blockDatacenter: true,
    blockSatelite: true,
    blockCrawler: true,
    blockProxy: true,
    blockVPN: true,
    blockTor: true,
    blockAbuser: true,
    // some arrays
    whitelistedUrls: [],
    whitelistedIps: [],
    blockedCountryCodes: [],
    whitelistedCompanyDomains: [],
    blacklistedIps = [
        "::1",
        "127.0.0.1",
        "localhost"
    ]
}); 

Updating settings

// you can only specify the keys that you actually want to update
ipsec.updateRule({
    blockBogon: true,
    blockSatelite: true,
    blockCrawler: true,
    blockProxy: true,
    blockVPN: true,
    blockTor: true,
    blockAbuser: true,

    whitelistedUrls: [],
    whitelistedIps: [],
    blacklistedIps: [],
    companyDomainWhitelist: [],
});

Filtering express traffic

await ipsec.filterExpressTraffic(app)

Manually getting IP Info

await lookupIP("1.1.1.1")

Example response object:

{
  "ip": "1.1.1.1",
  "rir": "APNIC",
  "is_bogon": false,
  "is_mobile": false,
  "is_satellite": false,
  "is_crawler": false,
  "is_datacenter": true,
  "is_tor": false,
  "is_proxy": false,
  "is_vpn": false,
  "is_abuser": true,
  "datacenter": {
    "datacenter": "kamatera.com",
    "network": "1.1.1.1/24",
    "country": "HK",
    "city": "Hong Kong",
    "postal": "0"
  },
  "company": {
    "name": "APNIC Research and Development",
    "abuser_score": "0.0156 (Elevated)",
    "domain": "apnic.net",
    "type": "business",
    "network": "1.1.1.0 - 1.1.1.255",
    "whois": "https://api.ipapi.is/?whois=1.1.1.0"
  },
  "abuse": {
    "name": "APNIC Research and Development",
    "address": "6 Cordelia St",
    "email": "[email protected]",
    "phone": "+61-7-38583100"
  },
  "asn": {
    "asn": 13335,
    "abuser_score": "0.0267 (Elevated)",
    "route": "1.1.1.0/24",
    "descr": "CLOUDFLARENET, US",
    "country": "us",
    "active": true,
    "org": "Cloudflare, Inc.",
    "domain": "cloudflare.com",
    "abuse": "[email protected]",
    "type": "hosting",
    "created": "2010-07-14",
    "updated": "2017-02-17",
    "rir": "ARIN",
    "whois": "https://api.ipapi.is/?whois=AS13335"
  },
  "location": {
    "is_eu_member": false,
    "calling_code": "61",
    "currency_code": "AUD",
    "continent": "OC",
    "country": "Australia",
    "country_code": "AU",
    "state": "New South Wales",
    "city": "Sydney",
    "latitude": -33.86785,
    "longitude": 151.20732,
    "zip": "1001",
    "timezone": "Australia/Sydney",
    "local_time": "2026-01-16T15:26:18+11:00",
    "local_time_unix": 1768537578,
    "is_dst": true
  },
  "elapsed_ms": 0.16
}