1.0.6 • Published 2 years ago

get-real-ip v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

get real ip

get a real public ip on broswer.

Getting started

npm install get-real-ip
yarn add get-real-ip
pnpm add get-real-ip

Usage

import getRealIp from "get-real-ip";
getRealIp().then((ip) => {
  console.log("ip: ", ip);
})(
  // or with async/await
  async () => {
    const ip = await getRealIp();
    console.log("ip: ", ip);
  }
)();

Use custom iceServers

import getRealIp from "get-real-ip";
const iceServers = [
  {
    urls: ["stun:stun.l.google.com:19302"],
  },
];
getRealIp(iceServers).then((ip) => {
  console.log("ip: ", ip);
})(
  // or with async/await

  async () => {
    const ip = await getRealIp(iceServers);
    console.log("ip: ", ip);
  }
)();
1.0.2

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.1

3 years ago

1.0.0

3 years ago