import { NetworkInterfaceInfo , networkInterfaces } from 'os' ; /**
 * 获取网络信息，不包括回环地址信息
 */ export function retrieveExternalNetWorkInfo ( ) { const ret = Object . entries ( networkInterfaces ( ) ) . reduce ( ( acc , curr ) => { const [ , nets ] = curr ; if ( ! nets ) { return acc ; } nets . forEach ( net => { if ( ! net . internal ) { acc . push ( net ) ; } } ) ; return acc ; } , [ ] ) ; return ret ; }