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

wsl2-dns

v1.0.0

Published

WSL2 DNS synchronizer.

Downloads

23

Readme

WSL2 DNS synchronizer.

Install:

  • Run: npm i -g wsl2-dns
  • From your Windows installation go to C:\Windows\System32\drivers\etc and take ownership of this file and/or make it writable from non-elevated Notepad instance. You can do that manually, but I recommend to use WinAero Tweaker to add Take ownership entry into file context menu.

How it works:

This app will update IPs of your existing domains defined in Windows' hosts file to match wsl2 distro IP address (which changes when wsl2 shuts down).

It will not add new entries.

Note that Windows does not support wildcard subdomains, so you still have to list your domains manually there even if you run wsl2-dns with wildcard subdomains specified.

Usage:

  • wsl2-dns domain1 [domain2 domain3 ...domainN]
    ^ where domain is either a full domain name to update or "wildcard" name starting with . dot to update all subdomains of that domain (excluding root domain itself!)

Example:

  • wsl2-dns bigproject.local .localhost
    ^ to update bigproject.local, small.localhost, other.localhost, but not localhost

Warning: It is not recommended to replace localhost root level domain. Some Windows apps may rely on that pointing to 127.0.0.1.

Recommended usage

  • put wsl2-dns command in your ~/.profile file, this way each time you start a new terminal window you will have your dns domains updated
  • choose single or multiple top-level domain (.localhost or any custom, I use .dzek) to avoid updating the .profile file each time you add new subdomain (remember you need to update Windows' hosts file)

FAQ / Errors:

Error: hosts file is not writable.

See Install part of this file. Running as root will not help - it's the Windows host that prevents editing the file, not Linux permissions.

Error: Specify domains to update

See Usage.

Error: ip addr command failed to start

Your distro is missing ip application.

  • Debian/Ubuntu: install it with sudo apt-get install iproute2
  • Centos: install it with yum install iproute
  • Other distros: You have to Google that yourself.

Could not find IP address

ip addr returns unexpected results. This apps looks for eth0 network IP address. Please try running ip addr manually and report an issue.

License

MIT