A very simple cross-platform package to get your public IP address.
nimble install https://github.com/no-waves/nip
import nip
var ip = nip()
clone the repo:
git clone https://github.com/no-waves/nip
compile with nim:
nim c -d:ssl -d:release nip.nim
cd nip && ./nip
or move/add to your path and run nip
I'll add some release binaries shortly