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

@667/ngrok-dns

v1.5.3

Published

DNS plugin for ngrok

Downloads

38

Readme

ngrok-dns

ngrok-dns ngrok-dns

UPDATE: This service/utility also works with localtunnel

Ngrok-dns is a plugin of sorts to the ngrok npm package that enables domain features of ngrok which are not available on the free plan. Ngrok-dns will create a TXT record pointing to the new tunnel each time it changes.

Further you can generate a fixed URL using the service at https://ngrok-dns.june07.com.

https://june07.github.io/image/InShot_20201209_081348040.gif

|ngrok-dns| |:---:| | ngrok tunnel url is dynamic and will change during your development cycle |

|ngrok-dns| |:---:| | cloudflare TXT records can then be easily accessed from webhooks and other disconnected parts of dev project |

  • Custom domains, https://ngrok.com/docs#http-custom-domains
  • Reserved domains
  • Wildcard domains https://ngrok.com/docs#wildcard

Install

npm install @667/ngrok-dns

Usage

|ngrok-dns| [localtunnel | |:---:|:---:| | highlighed locations show requirement for ngrok-dns usage | similar setup for localtunnel usage |

ngrok usage

const ngrok = require('./index'),
    ngrokDNS = require('@667/ngrok-dns');

(async function () {
    const url = await ngrok.connect({
        addr: 'https://localhost:3000',
        onLogEvent: ngrokDNS
    });
})();

localtunnel usage

const localtunnel = require('localtunnel'),
    dnsTunnel = require('@667/ngrok-dns');

(async () => {
    const tunnel = await localtunnel({
        port: 3000,
        allow_invalid_cert: true,
        local_https: true,
        debug: true,
    });
    dnsTunnel(tunnel.url);
    console.log(`dnsTunnel: ${tunnel.url}`);
})();

Make sure your env vars are set and run your app or app dev command (i.e. nodemon, etc) as normal: ngrok-dns

  • TXT - A DNS TXT record is created which can easily be looked up in your dev environment using Node's included dns module: require('dns')
  • CLOUDFLARE_TOKEN
  • CLOUDFLARE_ZONE_ID

Log output should look like: ngrok-dns added Cloudflare TXT your-custom-domain.com -> 0d8b12e869d7.ngrok.io

This is a seperate example of ngrok-dns output: ngrok-dns

Currently Cloudflare (token based) is supported although other DNS providers should be easy to add.

  • ngrokDNS is middleware in that it passes the onLogEvent 'data' through, and failures just disable the middleware