A Node.js terminal application that displays a real-world map with live network connection monitoring. Shows active foreign connections as red dots on an ASCII world map using precise geographic data and Braille Unicode characters.
- 🌍 Real-time World Map: ASCII world map with accurate continent borders using Braille Unicode patterns
- 🔴 Live Network Monitoring: Real-time display of foreign network connections via
netstat -ntu - 🌐 GeoIP Integration: Automatic country identification for foreign IP addresses
- 📍 Visual Connection Display: Red dots placed on countries with active connections
- 🏷️ Connection Labels: Country codes and IP addresses displayed next to connection points
- 📏 Mercator Projection: Accurate geographic coordinate conversion
- 📱 Responsive Design: Automatically adapts to terminal dimensions
- ⚡ Auto-refresh: Updates every second to show live connection changes
- 🎯 Clean Exit: Graceful shutdown with Ctrl+C
- Clone or download this repository
- Install dependencies:
npm install
Run the application:
npm startThe application will:
- Load world geographic data and GeoIP database
- Display the world map with continent borders
- Monitor network connections in real-time
- Show red dots for countries with active foreign connections
- Update every second automatically
To exit: Press Ctrl+C
- World Geography: GeoJSON continent data from public sources
- GeoIP Database: IP2Location Lite database for country identification
- Network Data: Live system network connections via
netstat -ntu
- Blue dots (⠀): Ocean/water areas
- White Braille patterns: Continent borders and coastlines
- Red dots (●): Countries with active network connections
- Yellow text: Country codes and IP addresses (e.g., "US 8.8.8.8")
- Data Loading: Loads GeoJSON continent boundary data
- Mercator Projection: Converts latitude/longitude to terminal coordinates
- Border Drawing: Uses Bresenham's line algorithm with directional Braille characters
- Optimized Display: Excludes Antarctica (below 66.5°S) to maximize usable space
- Connection Scanning: Executes
netstat -ntuto get active TCP/UDP connections - IP Filtering: Filters out private/local addresses (192.168.x.x, 10.x.x.x, etc.)
- GeoIP Lookup: Identifies country for each foreign IP using binary search
- Visual Mapping: Places red dots at approximate country centers
- Label Display: Shows country code and IP address next to each connection
- 1-second refresh cycle: Continuously monitors network changes
- Dynamic sizing: Adjusts to terminal window resizing
- Memory efficient: Reuses loaded geographic and GeoIP data
- Node.js: 16+ (for ES modules support)
- Operating System: Linux/Unix (for
netstatcommand) - Terminal: Color support recommended
- Minimum Size: 40x15 characters
- Network: Active internet connections to see foreign IPs
index.js- Main application with map rendering and network monitoringgeoip.js- GeoIP lookup module for country identification
continents-geojson.json- World continent boundary data in GeoJSON formatIP2LOCATION-LITE-DB1.CSV- IP-to-country database (253K+ ranges)continent-borders.json- Additional geographic boundary data
package.json- Project dependencies and scriptspackage-lock.json- Dependency lock file
- chalk: Terminal color styling and formatting
- fs: File system operations for data loading
- child_process: System command execution for
netstat - util: Promise utilities for async operations
- Local Processing: All GeoIP lookups performed locally using downloaded database
- No External Calls: No data sent to external services during operation
- System Monitoring: Only monitors outbound connections visible to
netstat - Public IPs Only: Private/internal IP addresses are filtered out
- Ensure you have active internet connections
- Try browsing the web or using network applications
- Check that
netstat -ntuworks in your terminal
- Increase terminal window size (minimum 40x15)
- Ensure terminal supports Unicode Braille characters
- Try a different terminal emulator if characters don't display properly
- Verify Node.js 16+ is installed
- Run
npm installto ensure dependencies are installed - Check that data files (GeoJSON, CSV) are present in the directory