update README.md

This commit is contained in:
2025-03-29 18:04:42 +01:00
parent 12ad5a86be
commit 3c1b5156a9

View File

@@ -3,9 +3,7 @@
[![Build Status](https://github.com/mrunknownde/utools/actions/workflows/docker-build-push.yml/badge.svg)](https://github.com/mrunknownde/utools/actions/workflows/docker-build-push.yml)
[![Update MaxMind GeoLite2 DBs](https://github.com/MrUnknownDE/utools/actions/workflows/maxmind-update.yml/badge.svg)](https://github.com/MrUnknownDE/utools/actions/workflows/maxmind-update.yml)
A modern web application that displays detailed information about a client's IP address, including geolocation, ASN, rDNS, and provides network diagnostic tools like Ping and Traceroute. It also allows looking up information for any public IP address.
A modern web application that displays detailed information about a client's IP address, including geolocation, ASN, rDNS, and provides network diagnostic tools like Ping, Traceroute, DNS Lookup, Subnet Calculation, and WHOIS Lookup. It also allows looking up information for any public IP address.
<!-- Optional: Füge hier einen Screenshot hinzu -->
<!-- ![Screenshot](link/to/your/screenshot.png) -->
@@ -19,9 +17,12 @@ A modern web application that displays detailed information about a client's IP
* **ASN Information:** Displays the Autonomous System Number (ASN) and organization name.
* **Reverse DNS (rDNS):** Performs a reverse DNS lookup for the IP address.
* **Interactive Map:** Visualizes the geolocation on an OpenStreetMap.
* **IP Lookup:** Allows users to enter any public IP address to retrieve its Geo, ASN, and rDNS information.
* **Traceroute:** Initiates a server-side traceroute (via SSE stream) to the client's IP (on click) or a looked-up IP.
* **Ping:** Performs a server-side ping test to a looked-up IP.
* **IP Lookup:** Allows users to enter any public IP address to retrieve its Geo, ASN, and rDNS information.
* **DNS Lookup:** Performs various DNS record lookups (A, AAAA, MX, NS, TXT, SOA) for a given domain.
* **Subnet Calculator:** Calculates network details (Network Address, Broadcast Address, Usable Hosts, etc.) for a given IP and CIDR or Subnet Mask.
* **WHOIS Lookup:** Retrieves WHOIS information for a given domain or IP address.
* **Dockerized:** Both frontend and backend are containerized for easy deployment.
* **Modern UI:** Built with Tailwind CSS for a clean and responsive interface.
@@ -32,7 +33,9 @@ A modern web application that displays detailed information about a client's IP
* Express.js
* MaxMind GeoLite2 Databases (for GeoIP and ASN)
* Pino (for logging)
* `net`, `dns`, `child_process` (Node.js built-ins)
* `whois-json` (for WHOIS lookups)
* `net`, `dns`, `child_process` (Node.js built-ins for Ping, Traceroute, rDNS, DNS Lookup)
* `@sentry/node` (optional error tracking)
* **Frontend:**
* Vanilla JavaScript (ES6+)
* Tailwind CSS (via Play CDN for simplicity, can be built)
@@ -73,6 +76,8 @@ This method uses the Docker images automatically built and pushed to GitHub Cont
PORT: 3000
LOG_LEVEL: info # Adjust log level if needed (e.g., 'debug', 'warn')
PING_COUNT: 4
# Optional: Set Sentry DSN for error tracking if you use Sentry
# SENTRY_DSN: "YOUR_SENTRY_DSN"
dns:
# Explicitly set reliable public DNS servers for rDNS lookups inside the container
- 1.1.1.1 # Cloudflare DNS
@@ -105,8 +110,9 @@ This method uses the Docker images automatically built and pushed to GitHub Cont
2. **Start the Application:**
Open a terminal in the directory where you saved the `docker-compose.yml` file and run:
```bash
docker-compose up -d
docker compose up -d
```
*(Note: Use `docker-compose` (with hyphen) if you have an older version)*
This will download the images (if not already present) and start the containers in the background.
3. **Access the Webapp:**
@@ -124,9 +130,11 @@ If you want to modify the code or build the images yourself:
2. **Build and Start:**
Use Docker Compose to build the images based on the `Dockerfile`s in the `backend` and `frontend` directories and then start the containers:
```bash
docker-compose -f compose.yml up -d --build
# Optional: Set GIT_COMMIT_SHA for build args if needed
# export GIT_COMMIT_SHA=$(git rev-parse --short HEAD)
docker compose -f compose.yml up -d --build
```
*(Note: Ensure your `compose.yml` points to `build: ./backend` and `build: ./frontend` instead of `image: ...` if you modify the provided compose file)*
*(Note: Use `docker-compose` (with hyphen) if you have an older version. The `compose.yml` in the repository correctly uses `build:` directives)*
3. **Access the Webapp:**
Open your web browser and navigate to `http://localhost:8080`.
@@ -139,6 +147,7 @@ The application is configured mainly through environment variables set in the `d
* `PORT`: The internal port the Node.js application listens on (default: `3000`).
* `LOG_LEVEL`: Controls the logging verbosity (e.g., `debug`, `info`, `warn`, `error`).
* `PING_COUNT`: Number of ping packets to send (default: `4`).
* `SENTRY_DSN` (Optional): Your Sentry Data Source Name for error tracking. Can be set during build via args or at runtime via environment variable.
* `dns` (in compose): Specifies DNS servers for the backend container, crucial for reliable rDNS lookups.
The MaxMind database paths (`GEOIP_CITY_DB`, `GEOIP_ASN_DB`) are set within the backend's Dockerfile but could potentially be overridden if needed (e.g., using volumes).
@@ -146,9 +155,11 @@ The MaxMind database paths (`GEOIP_CITY_DB`, `GEOIP_ASN_DB`) are set within the
## 🌐 Data Sources
* **Geolocation & ASN:** This tool uses GeoLite2 data created by MaxMind, available from [https://www.maxmind.com](https://www.maxmind.com).
* **Important:** The GeoLite2 databases require periodic updates. You need a MaxMind account (free) to download them. The Docker images contain the databases at build time. For long-term use, you should implement a process to update the `.mmdb` files within the `backend/data` directory (if using volumes) or rebuild the backend image regularly.
* **Important:** The GeoLite2 databases require periodic updates. You need a MaxMind account (free) to download them. The Docker images contain the databases at build time. For long-term use, you should implement a process to update the `.mmdb` files within the `backend/data` directory (if using volumes) or rebuild the backend image regularly using the provided GitHub Action workflow (`maxmind-update.yml`).
* **Map Tiles:** Provided by OpenStreetMap contributors.
* **WHOIS Data:** Retrieved in real-time using the `whois-json` library, which queries standard WHOIS servers.
* **DNS Data:** Retrieved in real-time using Node.js' built-in `dns` module.
## 📜 License
This project is licensed under the MIT License. See the `LICENSE` file for details (assuming you add one).
This project is licensed under the MIT License. See the `LICENSE` file for details.