#cli #ip #server #http

app ip-server

simple server that returns client ip address

13 releases

0.1.13 Nov 26, 2021
0.1.12 Nov 25, 2021

#459 in Command line utilities

34 downloads per month


176 lines


similar to icanhazip.com


$ ip-server
listening on

Now that the server is running on port 8000, we can connect via ip-server or an HTTP client with a GET request

$ ip-server --client localhost:8000
$ curl localhost:8000
$ firefox localhost:8000



-h, --help

print help

-v, --version

print version

-c, --client <address>

run as client, connect to address client will print remote address to stdout with a newline

make sure to use fully qualified hostname and port (e.g. localhost:8000 instead of localhost)

-s, --server <address>

run as server, bind to address (default

server will handle both ip-server -c and HTTP GET requests (like from curl)

server will also print client addresses to stdout with a newline


via cargo

$ cargo install ip-server

make sure the cargo install directory is in your $PATH

$ ip-server
listening on
$ ip-server --client localhost:8000

via docker

$ docker run -p 8000:8000 stzups/ip-server:latest
listening on
$ docker run --network=host stzups/ip-server:latest --client localhost:8000

in a Dockerfile

FROM whatever can rust a simple rust binary
COPY --from=stzups/ip-server:latest /ip-server /usr/local/bin/ip-server
ENTRYPOINT ["ip-server"]

via your favorite package manager

coming soon :)