Sneakerweb Protocol Specification
The sneakerweb is a peer-to-peer network for sharing static websites. It is built on top of Willow, specifically the Willow’25 parameterisation of Willow.
Each sneakerwebsite is stored as a set of Willow Entries all with the namespace_id 159, 196, 204, 134, 202, 217, 77, 17, 2, 90, 252, 247, 94, 13, 171, 36, 188, 60, 108, 145, 240, 205, 146, 251, 224, 202, 87, 77, 70, 156, 104, 30, (this is a communal namespace). The assets of a website must all use the same subspace_id; there is a one-to-one correspondence between subspaces and websites (i.e., sneakerweb “domains”).
The Willow path of each entry determines the URL of the resource it represents: a sneakerweb webserver resolves a URL of the form http://<pubkey>.localhost/<component>/<another_component> to the payload of the entry whose subspace_id is the base16-decoded <pubkey> (lowercase and uppercase letters are both allowed and may be mixed freely), and whose path has the first component <component>, and the second component <another_component> (the Willow path component must be the utf-8 encoding of the component, after decoding percent encodings). When a URL ends with a /, the URL is treated as if that / was followed by index.html. For example, http://<pubkey>.localhost/ is equivalent to http://<pubkey>.localhost/index.html, and http://<pubkey>.localhost/blog/recipes/ is equivalent to http://<pubkey>.localhost/blog/recipes/index.html.
Sneakerweb backends are encouraged to present preview information about a subspace to its users, in the form of an iframe pointing to the payload of the entry whose path consists of a single component, the utf-8 encoding of sneakerweb.html (if such an entry exists). Specific sneakerweb backends might specify additional information (such as the viewport sizes at which the sneakerweb.html file should work well), but such conventions are beyond the scope of this specification.
The sneakerweb is agnostic to how its constituent Willow entries are transferred. But the suggested way for exchanging sites is to use the Willow Drop Format. The recommended file extension for drops of sneakernet data is .snk. While we cannot (nor want to) enforce this in any way, we highly recommend to use .snk files as the only way you share and sneakerweb data, and we further recommend to only exchange such files through physical media or local area networks. These restrictions might seem cumbersome, but they will shape your interactions with this technology into a form that the internet cannot replicate.
