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 0 | 0 | 0 | 0 |
| 2.3.0 | 0 | 0 | 0 | 0 | 0 |
| 2.2.2 | 0 | 0 | 0 | 0 | 0 |
| 2.2.1 | 0 | 0 | 0 | 0 | 0 |
| 2.2.0 | 0 | 0 | 0 | 0 | 0 |
| 2.1.0 | 0 | 0 | 0 | 0 | 0 |
| 2.0.3 | 0 | 0 | 0 | 0 | 0 |
| 2.0.2 | 0 | 0 | 0 | 0 | 0 |
| 2.0.1 | 0 | 0 | 0 | 0 | 0 |
| 2.0.0 | 0 | 0 | 0 | 0 | 0 |
| 1.0.4 | 0 | 0 | 0 | 0 | 0 |
| 1.0.3 | 0 | 0 | 0 | 0 | 0 |
| 1.0.2 | 0 | 0 | 0 | 0 | 0 |
| 1.0.1 | 0 | 0 | 0 | 0 | 0 |
| 1.0.0 | 0 | 0 | 0 | 0 | 0 |
| 0.8.6 | 0 | 0 | 0 | 0 | 0 |
| 0.8.5 | 0 | 0 | 0 | 0 | 0 |
| 0.8.4 | 0 | 0 | 0 | 0 | 0 |
| 0.8.3 | 0 | 0 | 0 | 0 | 0 |
| 0.8.2 | 0 | 0 | 0 | 0 | 0 |
| 0.8.1 | 0 | 0 | 0 | 0 | 0 |
| 0.8.0 | 0 | 0 | 0 | 0 | 0 |
7.2.2 - This version may not be safe as it has not been updated for a long time. Find out if your coding project uses this component and get notified of any reported security vulnerabilities with Meterian-X Open Source Security Platform
Maintain your licence declarations and avoid unwanted licences to protect your IP the way you intended.
BSD-2-Clause - BSD 2-Clause "Simplified" LicenseObtains the machine's default gateway through exec calls to OS routing ints.
ip command must be available (usually provided by the iproute2 package).netstat command must be available.wmic must be available.db2util command must be available (provided by the db2util package).import {gateway4async, gateway4sync, gateway6async, gateway6sync} from "default-gateway";
const {gateway, version, int} = await gateway4async();
// gateway = '1.2.3.4', version = 4, int = 'en1'
const {gateway, version, int} = await gateway6async();
// gateway = '2001:db8::1', version = 6,int = 'en2'
const {gateway, version, int} = gateway4sync();
// gateway = '1.2.3.4', version = 4, int = 'en1'
const {gateway, version, int} = gateway6sync();
// gateway = '2001:db8::1', version = 6, int = 'en2'Returns: result Object
gateway String: The IP address of the default gateway.version Number: The IP address version of gateway.int String: The name of the interface. On Windows, this is the network adapter name.The gateway property will always be defined on success, while int can be null if it cannot be determined. All methods reject/throw on unexpected conditions.
© silverwind, distributed under BSD licence