A TCP server written in Go that returns the client's IP address and country. It supports various response modes, including TCP plain text, HTTP plain text, HTTP JSON and animation!.
MIT License
YourIP Server is a TCP server written in Go that returns the client's IP address. It supports various response modes, including tcp plain text, HTTP plain text, and HTTP JSON. Additionally, it features a fun IP streaming animation.
You can access the YourIP Server at yourip.top.
make
yourip -b 80 -g
--bind -b
The address to bind the TCP server to. (default ":8080")
--geolocation -g
Optional IP geolocation service. (its downlaod Country IP blocks database (70MB) )
The server uses the net
package in Go to resolve the TCP address, start a listener, and accept incoming connections. It sets a deadline of one minute for each connection and responds with an HTTP 200 OK message containing the client's IP address.
echo -e "" | nc yourip.top 80
curl
requests.
curl http://yourip.top
http://yourip.top
echo -e "GET /" | nc yourip.top 80
curl
requests.
curl http://yourip.top/json
http://yourip.top
echo -e "GET /json" | nc yourip.top 80
echo -e "1" | nc yourip.top 80
(Banner)echo -e "2" | nc yourip.top 80
(Flight)The server can stream the client's IP address in an animated format.
for example connect to the server with netcat (nc
) and send 1
or 2
or use these commands:
echo -e "1" | nc yourip.top 80
echo -e "2" | nc yourip.top 80
This project is licensed under the MIT License.