饮料:在岩石上的 Tailscale

  • Introduction: The author is a cocktail connoisseur who wanted a place to store cocktail recipes on their iPhone. They learned about tsnet and created Libations to combine their love for Tailscale and cocktails.
  • tswhat?: Tailscale released the tsnet Go library, which uses a userspace TCP/IP networking stack instead of the Linux kernel's TUN/TAP driver. This allows processes to make direct connections to other devices on the tailnet. Getting started with tsnet is easy, and it presents applications as devices on the tailnet, enabling ACL control.
  • Libations: The cocktail app uses similar techniques to build a blog. Recipes are represented in JSON format with specific fields. The server parses the recipe file, has an embedded filesystem, and can listen on a tailnet or locally. It uses Go standard library and minimal dependencies. The web interface is designed for mobile devices and uses Vanilla Framework with HTML templates. It also has dynamic drink icons.
  • Packaging for NixOS: The project uses a Flake to provide the package, overlay, and module. The Nix derivation is short, and the module starts the application with systemd and provides options for recipes file and Tailscale key file. Secrets are managed with agenix.
  • Summary: It was a fun project to explore tsnet. The author has stopped drinking alcohol and is looking for non-alcoholic recipes. Readers are encouraged to contribute their favourite recipes to the sample recipes file.
阅读 8
0 条评论