New:Microsoft Teams Notifications Are Now Available in Socket.Learn more →
Get Started

ip-ban-list

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ip-ban-list

Shared IP ban list backed by Hyperbee2, seedable over Hyperswarm

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
1.3K
0.62%
Maintainers
1
Weekly downloads
 
Created
Source

ip-ban-list

Shared IP ban list backed by Hyperbee2, seedable over Hyperswarm.

Install

npm install ip-ban-list

Usage

CLI

# Ban an IP
ip-ban-list ban 1.2.3.4

# Unban an IP
ip-ban-list unban 1.2.3.4

# Print the Hypercore public key (z-base-32)
ip-ban-list id

# Seed the ban list over Hyperswarm
ip-ban-list seed
  • --storage|-s [path]: storage directory (default: ./ip-ban-list)

API

const banList = new IpBanList(store, [opts])

Create a new IP ban list.

  • store: Corestore instance
  • opts.key: Hypercore public key to open an existing ban list read-only (default: null)

await banList.ready()

Initialize the ban list.

await banList.close()

Close the ban list.

await banList.ban(ip)

Ban an IPv4 address.

  • ip: IPv4 address string (e.g. '1.2.3.4')

await banList.unban(ip)

Remove an IPv4 address from the ban list.

  • ip: IPv4 address string

const banned = await banList.isBanned(ip)

Check if an IPv4 address is banned. Returns true or false.

banList.key

The Hypercore public key for the ban list (32 bytes).

banList.discoveryKey

The discovery key for swarming (32 bytes).

License

Apache-2.0

Keywords

blind-peer

FAQs

Package last updated on 17 Apr 2026

Related posts