A network monitoring tool written in Go that detects IP address changes on local network interfaces and sends notifications via email.
- Automatically detects IP address changes on local network interfaces
- Supports both IPv4 and IPv6 addresses
- Sends beautifully formatted HTML email notifications via SMTP
- Built-in web configuration interface (port 8087)
- Automatically creates default configuration file
- Checks for IP changes every 10 minutes
- Go 1.20 or higher
- Valid SMTP email configuration
-
Clone or download the project code
-
Ensure Go environment is properly configured
-
Run the following commands to install dependencies and build the program:
go mod init ip-radar go build
- On first run, the program will automatically create a
config.jsonconfiguration file - Access the SMTP email settings via browser at http://localhost:8087
- The program will automatically run and monitor IP address changes
The configuration file config.json contains the following fields:
{
"email": {
"from": "Sender email",
"password": "Email password/authorization code",
"to": "Recipient email",
"smtpHost": "SMTP server address",
"smtpPort": "SMTP port"
}
}
main.go - Main program file
config.json - Configuration file (auto-generated)
The program skips the following types of IP addresses:
- Loopback addresses (127.0.0.1, etc.)
- Link-local addresses
- Private addresses (10.0.0.0/8, etc.)
- Virtual interfaces (VMware, VirtualBox, etc.)
Modify the time.Sleep(10 * time.Minute) parameter in the main() function
Please check:
- Whether SMTP configuration is correct
- Whether SMTP service is enabled for your email account
- Whether notifications are being classified as spam
MIT

