Skip to content
/ stunip Public

A very (very) simple program to connect to a STUN server and get your host's public IP

Notifications You must be signed in to change notification settings

jnury/stunip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

StunIP

A very (very) simple program to connect to a STUN server and get your host's public IP. In fact, it's almost the example provided for stun Go library

Useful to check if you can reach a STUN server and what is the public IP presented to this server.

Usage

With the default STUN server (stun.l.google.com:19302):

> ./stunip
123.45.67.89

Or, in a Windows environment:

> .\stunip.exe
123.45.67.89

Output is the XOR Mapped Address returned by the STUN server when binding to it. This IP is the public IP address of your host (or your Internet router).

With a custom STUN server:

> ./stunip -server worldaz.turn.teams.microsoft.com:3478
123.45.67.89

About

A very (very) simple program to connect to a STUN server and get your host's public IP

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages