@shaharmor/webrtc-private-ip

Get your private-ip using WebRTC

Usage no npm install needed!

<script type="module">
  import shaharmorWebrtcPrivateIp from 'https://cdn.skypack.dev/@shaharmor/webrtc-private-ip';
</script>

README

webrtc-private-ip

Get your private-ip using WebRTC

Install

$ npm install webrtc-private-ip

Or using a CDN:

<script src="https://unpkg.com/@shaharmor/webrtc-private-ip"></script>

Usage

(async () => {
  const ip = await webrtcPrivateIp();
  if (ip) {
    //ip => '192.168.1.1'
  }
})()

Limitations

  • Will only works when WebRTC mDNS is not enabled.