Skip to content

About

Scripts for checking external IPv4 address. Same idea written in different languages.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

50 Commits

Folders and files

Repository files navigation

🐷 GIP Scripts

Some time ago, I created NPM package named GIP, which is a simple JavaScript module and CLI tool that checks external IPv4 address of the machine it runs on. Now I want to create a few scripts in different programming languages that will do the same thing.

These scripts will do the following:

  • Do a parallel HTTP request to the multiple services that return the IP address.
  • Ensure that the IP address is real by waiting for specific number of the same responses.

Usage

You can grab the scripts from the dist directory.

You can pass --ensure N argument to specify the number of the same responses (default is 3) that you want to wait for. In this way, you will have verification that the IP address is real. Keep in mind that currently there are 44 services, so do not pass a number greater than 44. Also, keep in mind that some services may be down or not available in your region. Try to stick with low numbers.

./gip.sh
./gip.sh --ensure 7
python gip.py
python gip.py --ensure 7
bun gip.ts
bun gip.ts --ensure 7
deno --allow-net gip.ts
deno --allow-net gip.ts --ensure 7
go run gip.go
go run gip.go --ensure 7
java gip.java
java gip.java --ensure 7
dotnet script gip.cs
dotnet script gip.cs -- --ensure 7

Requires PowerShell 7+. Install it from microsoft.com/powershell.

pwsh gip.ps1
pwsh gip.ps1 -Ensure 7

About

Scripts for checking external IPv4 address. Same idea written in different languages.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Sponsor this project

Used by

Contributors

Languages