Free launches are open: 12 a day, and open-source projects get a dofollow link with no badge.

Submit

nss-userhosts

Custom hosts file management for unprivileged Linux users

Developer ToolsFree#linux#dns#networking

Listed by the ProductPerch team from codeberg.org · not launched here yet

What is nss-userhosts?

nss-userhosts is a Name Service Switch extension library for glibc. It lets regular users define their own DNS hostname mappings without needing administrator privileges or modifying system-wide files.

The tool reads configuration files stored in the user home directory at $HOME/.config/userhosts/. It supports standard hosts format entries for both IPv4 and IPv6 addresses. Users must configure their system to prioritize the module by adding it to the hosts line in /etc/nsswitch.conf.

Written primarily in Rust, the project is currently in an early but functional stage. It includes build scripts, containerized testing environments, and debug logging capabilities through an environment variable. The source code is publicly available under an open license.

nss-userhosts features

  • Reads custom host mapping files from user home directory
  • Supports both IPv4 and IPv6 address resolution
  • Integrates with glibc Name Service Switch
  • Includes debug logging via environment variable
  • Provides containerized testing setup with Podman
  • Builds from source using Cargo

Who uses nss-userhosts and for what

  • Developers testing local services without sudo access
  • System administrators managing per-user DNS overrides
  • Researchers isolating network requests in containers
  • Users routing specific domains to internal IP addresses

nss-userhosts FAQ

Is nss-userhosts free?

Yes, the repository is publicly available on Codeberg and includes a license file.

Is nss-userhosts open source?

Yes, the source code is publicly available on Codeberg and includes a license file.

What is nss-userhosts used for?

It allows unprivileged users to create and manage their own custom host mappings without modifying system-wide configuration files.

Does nss-userhosts work on Mac?

The website does not say. The documentation specifies compatibility with glibc, which is standard on Linux.

How do I install nss-userhosts?

You clone the repository, build it with cargo, rename the resulting library, place it in your system loader path, and update /etc/nsswitch.conf.

Comments (0)

Comments and upvotes open when this product launches on ProductPerch.

More Developer Tools launches

All Developer Tools tools

Launch packs

Buy paid launches