\begin{quote}
Get your internal IP address \end{quote}
\hypertarget{md_sfcode_node_modules_internal_ip_readme_autotoc_md12882}{}\doxysection{Install}\label{md_sfcode_node_modules_internal_ip_readme_autotoc_md12882}

\begin{DoxyCode}{0}
\DoxyCodeLine{\$ npm install internal-\/ip }

\end{DoxyCode}
\hypertarget{md_sfcode_node_modules_internal_ip_readme_autotoc_md12883}{}\doxysection{Usage}\label{md_sfcode_node_modules_internal_ip_readme_autotoc_md12883}

\begin{DoxyCode}{0}
\DoxyCodeLine{const internalIp = require('internal-\/ip');}
\DoxyCodeLine{}
\DoxyCodeLine{(async () => \{}
\DoxyCodeLine{    console.log(await internalIp.v6());}
\DoxyCodeLine{    //=> 'fe80::1'}
\DoxyCodeLine{}
\DoxyCodeLine{    console.log(await internalIp.v4());}
\DoxyCodeLine{    //=> '10.0.0.79'}
\DoxyCodeLine{\})();}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(internalIp.v6.sync())}
\DoxyCodeLine{//=> 'fe80::1'}
\DoxyCodeLine{}
\DoxyCodeLine{console.log(internalIp.v4.sync())}
\DoxyCodeLine{//=> '10.0.0.79' }

\end{DoxyCode}


The module returns the address of the internet-\/facing interface, as determined from the default gateway. When the address cannot be determined for any reason, {\ttfamily null} will be returned.

The module relies on operating systems tools. On Linux and Android, the {\ttfamily ip} command must be available, which depending on distribution might not be installed by default. It is usually provided by the {\ttfamily iproute2} package.\hypertarget{md_sfcode_node_modules_internal_ip_readme_autotoc_md12884}{}\doxysection{Related}\label{md_sfcode_node_modules_internal_ip_readme_autotoc_md12884}

\begin{DoxyItemize}
\item \href{https://github.com/sindresorhus/internal-ip-cli}{\texttt{ internal-\/ip-\/cli}} -\/ CLI for this module
\item \href{https://github.com/sindresorhus/public-ip}{\texttt{ public-\/ip}} -\/ Get your public IP address
\item \href{https://github.com/silverwind/default-gateway}{\texttt{ default-\/gateway}} -\/ Get your default gateway address
\end{DoxyItemize}\hypertarget{md_sfcode_node_modules_internal_ip_readme_autotoc_md12885}{}\doxysection{License}\label{md_sfcode_node_modules_internal_ip_readme_autotoc_md12885}
MIT © \href{https://sindresorhus.com}{\texttt{ Sindre Sorhus}} 