import { NetworkInterface } from '@awesome-cordova-plugins/network-interface/ngx';
constructor( private networkInterface: NetworkInterface ) {
this.networkInterface.getWiFiIPAddress()
.then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
.catch(error => console.error(`Unable to get IP: ${error}`));
this.networkInterface.getCarrierIPAddress()
.then(address => console.info(`IP: ${address.ip}, Subnet: ${address.subnet}`))
.catch(error => console.error(`Unable to get IP: ${error}`));
const url = 'www.github.com';
this.networkInterface.getHttpProxyInformation(url)
.then(proxy => console.info(`Type: ${proxy.type}, Host: ${proxy.host}, Port: ${proxy.port}`))
.catch(error => console.error(`Unable to get proxy info: ${error}`));
}