Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/extensionsapp/check-rkn
Check IP or domain in RKN blocking.
https://github.com/extensionsapp/check-rkn
Last synced: 7 days ago
JSON representation
Check IP or domain in RKN blocking.
- Host: GitHub
- URL: https://github.com/extensionsapp/check-rkn
- Owner: extensionsapp
- License: isc
- Created: 2018-05-10T23:35:21.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-05-11T19:35:38.000Z (over 6 years ago)
- Last Synced: 2024-10-30T02:56:03.655Z (14 days ago)
- Language: JavaScript
- Homepage:
- Size: 66.4 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Check IP or domain in RKN blocking.
### Installation
```
npm i check-rkn
```### Usage
```javascript
const rkn = require('check-rkn');// Check list IPs
rkn(['216.58.214.110', '108.174.10.10'], (err, res) => {
console.log(res)
});
// [ { ip: '216.58.214.110', block: false },
// { ip: '108.174.10.10', block: true } ]// Check one IP
rkn('108.174.10.10', (err, res) => {
console.log(res)
});
// true// Check list domains
rkn(['google.com', 'linkedin.com'], (err, res) => {
console.log(res)
});
// [ { ip: 'google.com', block: false, ips: [ { ip: '216.58.214.110', block: false } ] },
// { ip: 'linkedin.com', block: true, ips: [ { ip: '108.174.10.10', block: true } ] } ]// Check one domain (and IP)
rkn('linkedin.com', (err, res) => {
console.log(res)
});
// true// Check error data
rkn(['hello.trololo', '127.0.0.hello'], (err, res) => {
console.log(res)
});
// [ { domain: 'hello.trololo', error: 'ENOTFOUND', ips: [] },
// { domain: '127.0.0.hello', error: 'ENOTFOUND', ips: [] } ]
```###### The first launch of each hour will last longer, since the new database is being downloaded.
© 2018 ExtensionsApp