poka.sh

Docs

HOSTS

Generated by scripts/gen-format-pages.py from docs/data/format-metadata/, FILE_FORMATS.csv and docs/formats-master.csv. Do not edit by hand: change the source, then run the script.

Hosts File Preview.

At a glance

Purpose A hosts file (/etc/hosts or Windows hosts): IP addresses mapped to host names.
Extensions .hosts
Poka parser poka-hosts
Viewer poka-table-viewer
Depth tier Parser with a shared viewer (see Depth tiers)
Breadth tier B2 Broad (see Breadth tiers)

How much Poka reads

B2 Broad. The common content of the current and the common older versions is decoded. Some named features or versions are not, and are listed.

Confidence: medium (the reviewer read the code). Basis: Reviewed 2026-10-26: read parsers/poka-hosts/src/main.rs (146 lines) and plugin.json. No unit tests or tests/samples.rs; the corpus has no .hosts and .hostsfile sample. Covers .hosts and .hostsfile. The table has one row per IP and host-name pair with the address family and the line's comment. Judgement: B2: every entry is shown; the gaps are limits, redaction by design and fields left raw.

What Poka does not read

  • Comment-only lines are not shown
  • Only the first 5,000 pairs are listed; files over 1 MiB are cut without a flag

Libraries

Libraries Poka uses or has assessed for this format, with the status, licence and language the registry records.

  • hostfile (candidate; MIT; Rust; https://github.com/aneeshdurg/hostfile) — Crate for parsing /etc/hosts; version 1.1.1 released April 2025.
  • hostsmod (candidate; BSD-3-Clause; Rust; https://docs.rs/hostsmod) — Parser library plus CLI; keeps original text parts so a hosts file can be edited and reconstructed.

Sources

  • parsers/poka-hosts/src/main.rs
  • parsers/poka-hosts/plugin.json