Git Product home page Git Product logo

my-public-ip-api's Introduction

My Public IP API

Use gh-pages as an API for the public IP (typically for dynamic IPs) of your home network, this repo is deployed without any real IP so what you'll see in gh-pages is {}

Instructions

  1. Fork this repo/ use it as a template
  2. git clone <YOUR-NEW-REPO> to a machine in the network whose IP you want to have always accessible
  3. Ensure you have python and git
  4. Deploy the script with one of the following (or other parallel alternatives you like):
    1. python update-ip.py to update once
    2. nohup python update-ip.py & this will send the output to nohup.out
    3. nohup python update-ip.py > logs.txt & this will send the output to logs.txt
    4. you can also use bg or tmux see this SO question for more ways
  5. Enable GH-pages
    1. Go to your repository settings
    2. Scroll to "GitHub Pages"
    3. Select source: "master branch /docs folder"
  6. (you can have your own custom domain) if not check https://YOUR-USER-NAME.github.io/my-public-ip-api/ to see something like {"ipv4": "<YOUR-IPv4>", "ipv6": "<YOUR-IPv6>"}
  7. That is now an endpoint with your public IPs

Applications

Access servers and services in your home (or wherever) network even though they have dynamic IPs simply by querying your gh-pages endpoint and then use the IP to access them as if you had a static one.

Customize

By default, the script will check if your IP has changed every 10 seconds and update your gh-pages endpoint only if it has, if you want to increase this value, simply update the UPDATE_INTERVAL in the update-ip.py in your own copy.

Privacy

If you have privacy concerns, you can always make your copy private and change its name to a long and random sequence of chars like my-public-ip-api-nanananananananananananbatman

my-public-ip-api's People

Contributors

haellingsen avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.