ip-set

WebJar for ip-set

Лицензия

Лицензия

MIT
Группа

Группа

org.webjars.npm
Идентификатор

Идентификатор

ip-set
Последняя версия

Последняя версия

1.0.1
Дата

Дата

Тип

Тип

jar
Описание

Описание

ip-set
WebJar for ip-set
Ссылка на сайт

Ссылка на сайт

http://webjars.org
Система контроля версий

Система контроля версий

https://github.com/transitive-bullshit/ip-set

Скачать ip-set

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/org.webjars.npm/ip-set/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>ip-set</artifactId>
    <version>1.0.1</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/ip-set/
implementation 'org.webjars.npm:ip-set:1.0.1'
// https://jarcasting.com/artifacts/org.webjars.npm/ip-set/
implementation ("org.webjars.npm:ip-set:1.0.1")
'org.webjars.npm:ip-set:jar:1.0.1'
<dependency org="org.webjars.npm" name="ip-set" rev="1.0.1">
  <artifact name="ip-set" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='ip-set', version='1.0.1')
)
libraryDependencies += "org.webjars.npm" % "ip-set" % "1.0.1"
[org.webjars.npm/ip-set "1.0.1"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
org.webjars.npm : ip jar [1.1.3,2)

Модули Проекта

Данный проект не имеет модулей.

ip-set travis npm

IP Address Set

Efficient mutable set data structure optimized for use with IPv4 and IPv6 addresses. The primary use case is for working with potentially large IP blacklists.

Works in the browser with browserify! This module is used by WebTorrent.

install

npm install ip-set

usage

const IPSet = require('ip-set')

const ipSet = new IPSet(/* optionally pass an array of IP addresses to seed the set with */)
ipSet.add(exampleBlockedIP1)
ipSet.add(exampleBlockedIP2)
let isBlocked = ipSet.contains(exampleBlockedIP2) // isBlocked will be true

CIDR ip's are also supported

ipSet.add(`192.168.1.0/24`);
let isBlockedInList = ipSet.contains('192.168.1.0');// isBlockedInList will be true
isBlockedInList = ipSet.contains('192.168.1.255');// isBlockedInList will be true

todo

(prioritized highest to lowest)

  • Port IPv4 implementation from torrent-stream
  • Add basic tests
  • Support CIDR notation
  • Support IPv6
  • Investigate potential use of node-iptrie

credits

Original interval-tree written by galedric for torrent-stream. Ported to an isolated npm module by transitive-bullshit for webtorrent.

license

MIT. Copyright (c) Travis Fischer

Support my OSS work by following me on twitter twitter

Версии библиотеки

Версия
1.0.1