RecordMyGlobalIp
is a Java program that periodically records your global IP address to a file. This file can be saved to a Google Drive directory, allowing you to access your home network from anywhere with an internet connection, even if you have a dynamic IP address.
- Periodically retrieves and records the global IP address.
- Saves the IP address to a specified file.
- Configurable time interval for checking the IP address.
- Command-line parameters for customization.
- Java Development Kit (JDK)
- Google Guava library
- Clone the repository or download the source code.
- Ensure you have the JDK installed on your machine.
- Add Google Guava to your project dependencies. You can download it here or add it via your build tool (e.g., Maven, Gradle).
The program accepts the following command-line arguments in the format of key=value
pairs, separated by commas:
timeinterval
: The interval (in milliseconds) at which the program checks and records the global IP address. Default is60000
(1 minute).absolutepath
: The absolute path to the file where the IP address will be recorded. Default isglobals.txt
.key
: The key under which the IP address will be saved in the file. Default isGlobalIp
.
Run the program with the desired parameters:
```sh
java -cp .:path/to/guava.jar com.ip.global.ipRecorder "timeinterval=30000,absolutepath=/path/to/globals.txt,key=GlobalIp"
```
To run the program with a 30-second interval and save the IP address to /path/to/globals.txt
under the key GlobalIp
, use the following command:
java -cp .:path/to/guava.jar com.ip.global.ipRecorder "timeinterval=30000,absolutepath=/path/to/globals.txt,key=GlobalIp"
If you have suggestions for improving this project, please submit a pull request or open an issue.
This project is licensed under the BSD 3-Clause License - see the LICENSE file for details.
This README.md
provides an overview of the project, how to install and run it. Adjust any paths or details as necessary for your specific setup.
- Burak KOCAMAN
- GitHub: burakkcmn
- Email: [email protected]