Coder Social home page Coder Social logo

ipgrabber's Introduction

ipGrabber

A very simple poor-man's ddns server, using Node.JS and Redis.

Installation

Simply download a copy of the repository and install dependencies with npm install. You can then run the server using node index.js.

The script should run with a default Redis installation out of the box. If you need to modify any settings, you can find the relevant constants at the top of the file.

Retrieving Latest IP

To grab the last seen IP, you can invoke the script with the -get option.

node index.js -get

Updating IP

The history of IPs is updated for every HTTP GET request for the root of the server. The server listens on port 2626 by default. You can perform this GET request using any HTTP client. For example, using cURL from the command line:

curl -so /dev/null "http://example.com:2626/"

You should use your operating system's task scheduler to run this at regular intervals.

Simple Password Support

You may enable simple passport support in order to prevent unwanted IPs being added to the log. Please be aware that the password will be sent in plaintext, unless you modify the server to use HTTPS. This is mainly intended to prevent accidental access by webcrawlers.

Simply invoke the server with a password parameter:

node index.js -p <password>

The password will be expected as part of a urlencoded POST body. This can be sent using cURL:

curl -d 'pass=<password>' -so /dev/null "http://example.com:2626/"

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.