default-gateway
Advanced tools
Comparing version 0.8.1 to 0.8.2
{ | ||
"name": "default-gateway", | ||
"version": "0.8.1", | ||
"version": "0.8.2", | ||
"description": "A Node.js module to get default gateway and default interface.", | ||
@@ -5,0 +5,0 @@ "author": "silverwind <me@silverwind.io>", |
# default-gateway | ||
[![](https://img.shields.io/npm/v/default-gateway.svg?style=flat)](https://www.npmjs.org/package/default-gateway) [![](https://img.shields.io/npm/dm/default-gateway.svg)](https://www.npmjs.org/package/default-gateway) [![](https://api.travis-ci.org/silverwind/default-gateway.svg?style=flat)](https://travis-ci.org/silverwind/default-gateway) | ||
> Get the default network gateway and the default interface. | ||
A Node.js module to get **default gateway** and **default interface**. | ||
This module depends on following commands by using [chid_process](https://nodejs.org/api/child_process.html): | ||
100% Pure Java**Script**😽 | ||
This module depends on following commands by using [chid_process](https://nodejs.org/api/child_process.html) provided by Node.js. | ||
- win32 | ||
@@ -13,8 +11,10 @@ - `wmic path Win32_NetworkAdapterConfiguration get *` | ||
- darwin | ||
- `netstat -rn -f inet` | ||
- `netstat -rn -f inet6` | ||
- `netstat -rn -f inet` | ||
- `netstat -rn -f inet6` | ||
- linux | ||
- `netstat -rn -A inet` | ||
- `netstat -rn -A inet6` | ||
- `netstat -rn -A inet` | ||
- `netstat -rn -A inet6` | ||
This module is based on [previous work from mh61503891](https://github.com/mh61503891/node-default-network). | ||
## Installation | ||
@@ -28,3 +28,3 @@ | ||
### collect(callback) | ||
### defaultGateway(callback) | ||
@@ -104,24 +104,4 @@ Asynchronously collects a object which contains interface names, families (IPv4 or IPv6), and addresses. The `callback` gets two arguments `(error, data)`. | ||
## Development | ||
### Test | ||
```bash | ||
npm test | ||
``` | ||
or | ||
```bash | ||
./node_modules/.bin/gulp test | ||
``` | ||
or | ||
```bash | ||
./node_modules/.bin/mocha | ||
``` | ||
## License | ||
The MIT License |
Sorry, the diff of this file is not supported yet
13002
105