npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

noddns

v1.2.1

Published

NoDDNS No-IP Secure (SSL) Dynamic DNS IP updater

Downloads

14

Readme

noddns

NoDDNS No-IP Secure (SSL) Dynamic DNS IP updater for Node.js

Easy Installation:

Assuming both Node.js and NPM are already installed and the correct environment variables are already set, in a command-line interface (with your app directory as the working directory to install the module into), type the following:

npm install noddns
Initialization:

NoDDNS will be used for the rest of the documentation

var NoDDNS = require('noddns');
Usage:
  NoDDNS.updateIP(credentials, hostname, newip, callback, timeout)

    Updates IP address with no-ip.com's servers

  • credentials (string) - Format username:password
  • hostname (string) - Example host123.ddns.net
  • newip (string) - [IPAddress]|ONLINE|OFFLINE|[0=Auto/Default]
  • callback (function) - Returns DDNSResponse (object) asynchronously
    • DDNSResponse.ResponseCode - HTTP Response Code
    • DDNSResponse.Code - API Response Code
    • DDNSResponse.IPAddress - IP Address (if in response)
  • timeout (integer) - Max timeout in milliseconds (1/1000th of a second)
  NoDDNS.setUserAgent(appName, appVersion, appEmail)

    Used to change the user agent for API communications (important)

  • appName (string) - Name of your app (no spaces)
  • appVersion (string/numeric) - Your app version
  • appEmail (string) - Email address of app or app maintainer
  NoDDNS.setServer(newDDNSServer)

    Used to change the server which the IP update request is sent to*

  • newDDNSServer (string) - Server address
  NoDDNS.setSSLRootCACertificate(newCACertificate)

    Used to change the root CA used for verification of server with SSL*

  • newCACertificate (string) - PEM/Base64-encoded X.509 certificate
  NoDDNS.setDefaultTimeout(newTimeout)

    Used to change the default connection timeout*

  • newTimeout (integer) - New timeout in milliseconds

Example usage as a command-line interface:

var NoDDNS = require('noddns');
if(!process.argv[3]) console.log('Command Line Interface (CLI) Usage:\n'
    + '  node dyndns.js username:password host [ipaddress|0] [timeout]\n'
    + '    node dyndns.js johnsmith:secret123 myhost.ddns.net\n'
    + '    node dyndns.js johnsmith:secret123 myhost.ddns.net 127.0.0.1\n'
    + '    node dyndns.js johnsmith:secret123 myhost.ddns.net 127.0.0.1 40000\n'
    + '    node dyndns.js johnsmith:secret123 myhost.ddns.net 0 40000\n'
    + '  * The IP address being ommitted is the same as specifying it as 0.\n'
    + '    This will default to the (public) IP used to make the connection.\n'
	+ '  * IP Address can also be specified as ONLINE or OFFLINE');
else { // Implementation:
    NoDDNS.setUserAgent('ConsoleDDNS', '1.2.1', '[email protected]');
    NoDDNS.updateIP(process.argv[2], process.argv[3], process.argv[4], function(DDNSResponse) {
        if(DDNSResponse) {
            switch(DDNSResponse.Code) {
                case 'good':
                    console.log('IP Address Changed ['+DDNSResponse.IPAddress+']');
                    break;
                case 'nochg': // Important: IP Address *may* be undefined if there is no change!
                    console.log(DDNSResponse.IPAddress?'IP Address Unchanged ['+DDNSResponse.IPAddress+']':'IP Address Unchanged');
                    break;
                case 'nohost':
                    console.log('Invalid host');
                    break;
                case 'badauth':
                    console.log('Invalid credentials');
                    break;
                case 'badagent':
                    console.log('Bad agent used');
                    break;
                case '!donator':
                    console.log('Access denied to requested feature');
                    break;
                case 'abuse':
                    console.log('System abuse detected');
                    break;
                case '911':
                    console.log('Fatal server-side error');
                    break;
                default:
                    console.log('Unknown response: '+DDNSResponse.Code);
                }
            }
        else console.log("Connection error");
        }, process.argv[5]);
    }