Files
dat-thang/extra/dat-dpi
divorce b735900f2e 0.0.002
ddat interop with dat js
cable interop with cabal js
ddat's frontend = dat-thang
cable fe = cable-thang
dillo support based on cel's dillo-dat
bootstrap node
xplatform support

Signed-off-by: divo <418@cryspace.space>
2026-10-19 00:17:02 -04:00
..
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00
2026-10-19 00:17:02 -04:00

DAT protocol plugin for Dillo

This repository builds the standalone Dillo Protocol Interface (DPI) plugin for dat:// archives. It is kept separate from the dat-thang application repository so it can be built, packaged, and proposed to Dillo as an independent plugin.

The plugin implements the Dillo DPI server protocol and serves archive pages from the C implementation. Archive contents and metadata are read through SLEEP; dat.scm is parsed as S-expressions with the embedded S7 reader and is never evaluated as executable archive code. The networking identity is the Cesspool protocol token in NETWORK_PROTOCOL. Dat-DNS is the project's archive-name mapping and is not public DNS.

Build requirements

  • A C99 compiler, GNU Make, and binutils (objcopy)
  • pkg-config
  • libsodium and libcurl development headers and libraries
  • Dillo 3.0.5 or newer with its DPI daemon (dpid)

On Debian-like systems, the build libraries are commonly provided by libsodium-dev and libcurl4-openssl-dev; package names vary by distribution.

Build the plugin:

make

The result is build/dat.dpi. The build output is ignored by Git.

Install for one user

make install-user DPIDIR=/path/to/dillo/dpi

This installs ~/.dillo/dpi/dat/dat.dpi. If ~/.dillo/dpidrc does not exist, it creates one with dpi_dir set to the supplied DPIDIR; choose the system DPI directory used by your Dillo installation. It then adds this association to ~/.dillo/dpidrc if it is not already present:

proto.dat=dat/dat.dpi

Restart Dillo's plugin daemon (dpidc stop, then open Dillo again), and navigate to a dat:// archive address. User plugins are searched before the configured system DPI directory.

System install

sudo make install

By default, this installs to /usr/local/lib/dillo/dpi/dat/dat.dpi. Add the following line to ~/.dillo/dpidrc (or the system dpidrc used by your Dillo installation), then restart dpid:

proto.dat=dat/dat.dpi

Override paths as needed, for example:

make install PREFIX=/usr DPIDIR=/usr/lib/dillo/dpi DESTDIR=/tmp/package-root

Protocol/version behavior

The plugin accepts legacy hexadecimal and compact Base32768 Dat keys. A +N version suffix selects the requested archive version, matching the versioned navigation supported by the C archive implementation. The plugin accesses archives through the configured Cesspool networking layer when content is not available locally.

Dillo plugin integration

Dillo plugins are independent programs using the DPI protocol. Dillo searches for .dpi executables in user and system DPI directories and associates a URL scheme through proto.<scheme>=<relative-plugin-path> in dpidrc. See the Dillo User Manual's Plugins and Dpidrc sections for the browser-side configuration.

The Dillo project requests plugin proposals as a repository link and short description. This repository is prepared for that review; it has no configured remote and has not been submitted upstream.

Source and license

The C implementation and required headers are copied from the dat-thang source project. This repository carries the project's GNU AGPL v3 license. The bundled S7 source retains its upstream notices in src/s7.c.