https://github.com/snawoot/myip
Get your external IP address using multiple STUN servers
https://github.com/snawoot/myip
ip ip-address ip-address-lookup ip-lookup stun stun-client
Last synced: about 1 month ago
JSON representation
Get your external IP address using multiple STUN servers
- Host: GitHub
- URL: https://github.com/snawoot/myip
- Owner: Snawoot
- License: mit
- Created: 2020-06-02T11:21:03.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-08-11T10:59:30.000Z (over 1 year ago)
- Last Synced: 2025-01-26T06:11:15.300Z (3 months ago)
- Topics: ip, ip-address, ip-address-lookup, ip-lookup, stun, stun-client
- Language: Makefile
- Homepage:
- Size: 18.6 KB
- Stars: 41
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# myip
Reliably and quickly get your external IP address from public STUN servers. Program issues parallel queries to public STUN servers to determine public IP address and returns result as soon as quorum of matching responses reached. By default quorum is 2. Useful for scripting.
---
:heart: :heart: :heart:
You can say thanks to the author by donations to these wallets:
- ETH: `0xB71250010e8beC90C5f9ddF408251eBA9dD7320e`
- BTC:
- Legacy: `1N89PRvG1CSsUk9sxKwBwudN6TjTPQ1N8a`
- Segwit: `bc1qc0hcyxc000qf0ketv4r44ld7dlgmmu73rtlntw`---
## Installation
#### Binary download
Pre-built binaries available on [releases](https://github.com/Snawoot/myip/releases/latest) page.
#### From source
Alternatively, you may install myip from source. Run within source directory
```
go install
```#### Docker
Docker image is available as well:
```sh
docker run --rm yarmak/myip
```#### Snap Store
[](https://snapcraft.io/go-myip)
```bash
sudo snap install go-myip
```## Usage
```
$ myip
1.2.3.4
```## Synopsis
```
-6 use IPv6
-q uint
required number of matches for success (default 2)
-s string
STUN server list (default "stun.l.google.com:19302;stun.ekiga.net:3478;stun.ideasip.com:3478;stun.schlund.de:3478;stun.voiparound.com:3478;stun.voipbuster.com:3478;stun.voipstunt.com:3478")
-t duration
hard timeout. Examples values: 1m, 3s, 1s500ms
```