Skip to content

WhatIsMyIP is a lightweight Flask-based web application that allows users to retrieve their public IP address along with key location and security details.

License

Notifications You must be signed in to change notification settings

w3nabil/whatismyip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WhatIsMyIP

Python Version 3.12.x Codacy Grade License

Overview

WhatIsMyIP is a lightweight Flask-based web application that allows users to retrieve their public IP address along with key location and security details. This tool is useful for network diagnostics, security analysis, and general IP-related inquiries.

Features

  • Retrieve public IP details, including:
    • IP Address
    • IP Version
    • Geolocation Data (Latitude, Country, City, Region)
    • Proxy Detection
  • Lightweight, fast, and easy to use
  • Simple web interface

Prerequisites

  • Python 3.12 or later
  • Ngrok (for external access)

Installation

Follow these steps to install and run the application:

  1. Clone the repository:
    git clone https://github.com/w3nabil/WhatIsMyIP.git
  2. Navigate to the project directory:
    cd WhatIsMyIP
  3. Install the required dependencies:
    pip install -r requirements.txt

Configuration

  1. Rename .env.example to .env and update it with your desired configuration values.

    • If using the project for testing purposes, you may set:
      DB_URI=./test.db
      APP_SECRET_KEY=test
      
    • Database configuration is optional unless you plan to store data.
  2. Obtain an API token from ipinfo.io and set it in the .env file:

    TOKEN=your_api_token_here
    

Usage

Start the application by running:

py app.py

Once running, open a browser and navigate to http://localhost:5000/ to verify that the service is working correctly.

To make the application accessible from the internet:

  1. Start Ngrok:
    ngrok http 5000
  2. Copy the generated *.ngrok.io URL and access it from any browser.

Troubleshooting

Rate Limit Reached

If you encounter a "Rate Limit Reached" message, it may be due to:

  • Exceeding API request limits
  • A blacklisted or flagged IP address

Refer to the ipinfo.io documentation for more details on API limits and restrictions.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Contact

For questions, feedback, or collaboration opportunities, feel free to reach out at [email protected].

About

WhatIsMyIP is a lightweight Flask-based web application that allows users to retrieve their public IP address along with key location and security details.

Topics

Resources

License

Stars

Watchers

Forks