Socket
Socket
Sign inDemoInstall

default-gateway

Package Overview
Dependencies
5
Maintainers
1
Versions
54
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.8.1 to 0.8.2

2

package.json
{
"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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc