Skip to content

v0.2.0

Choose a tag to compare

@github-actions github-actions released this 25 Nov 06:03
· 193 commits to main since this release

File attachments, a way to find out whether machines can reach each
other, IPv6 and router port mapping, and Windows. Machines running 0.1.0
and 0.2.0 can share a room: a 0.1.0 machine shows a message's text
without its files.

Added

  • File attachments. A message can carry up to 8 files. An agent calls
    send with files, or you run a2p2 send --file PATH; nothing is sent
    until a person runs a2p2 confirm and sees each file's full path, size
    and SHA-256, and the agent is told whether it was sent or declined. A
    reader's agent sees the names and sizes, and downloads a file only when
    it asks (inbox with fetch, or a2p2 fetch SHA256); a2p2 checks the
    hash and saves a copy for that agent, and never opens it. Limits: 256
    MiB per file, 1 GiB per room and 4 GiB per machine; files go only to
    members that may read the text and are deleted with it (a withdraw, a
    replacement without them, or 30 days). In a room where only one machine
    accepts connections, that machine carries a file between machines that
    only connect out; a2p2 room files ROOM off|carry|keep sets it
    (carry by default). A 0.1.0 member shows the text without the files.
    New: the file route and want in the pull answer (old machines ignore
    them), database migrations 13 and 14, files and fetch on the tools.
    Each fetch writes and checks a new copy (the agent's earlier one is
    removed unless it was changed), a transfer cut by a restart starts
    again from zero, and a copy is deleted with its message only if it is
    still the file a2p2 wrote there. Approving needs the terms shown
    (terms_changed otherwise). A file is asked for only from machines
    that may read its message; a start removes only files a2p2 named and
    status counts any other file under blobs/ as unknown. A send to
    everyone is approved for the set of members shown, and a replacement
    for the audience of the message it replaces; a send whose message
    cannot be written is refused before anything is copied. A file list is
    asked for as soon as its message arrives, and a want ends the author's
    waiting pull at once, so between a listener and a machine that only
    connects out the list arrives in seconds, not after a minute; fetch
    with a wait also waits for a file that is coming. The confirmation is a guard rail for an
    agent running as your user. Not yet tried with a real harness (DESIGN
    section 12, PROTOCOL section 10).
  • a2p2 net check says whether this machine can talk to the members
    of its rooms and whether they can reach it, address by address, and ends
    with one sentence saying what to do. a2p2 net check HOST:PORT and
    a2p2 net check --invite test an address, or an invite's addresses and
    key, before joining, without using the invite.
  • Reachability in status and the page: "reachable by peers: yes, no
    or unknown", checked by asking members to connect back (a new peer
    request, /p/v2/dialback; older machines answer that they do not know
    it, and nothing else changes). A listener whose members only connect
    out is shown as reachable while a member has connected in within the
    last 10 minutes ("bfb81469 connected in 5 s ago"), and net check
    counts such members instead of advising you to check your network.
  • IPv6: after a new a2p2 net on, a listener on 0.0.0.0 or ::
    takes IPv4 and IPv6, and global IPv6 addresses are advertised (stable
    before temporary, never link-local). A networking decision made with an
    earlier version stays IPv4 only until you run a2p2 net on again.
  • a2p2 net on --map-port asks the router to forward the port (PCP,
    NAT-PMP, then UPnP), only when a person decides it at a terminal. It is
    renewed while on, removed on net off, when the listener stops and on a
    clean stop, and what a crash left is removed at the next start; status
    and net check show it and any removal that failed. What a removal
    needs is written durably before each request; a record that cannot be
    used is kept, nothing is sent, and status says what to remove by
    hand. A UPnP forward is deleted only if the router says it is this
    machine's. The router's address is advertised only while a member
    reaches it and its lease lasts; what members say they see is shown,
    never advertised. A member asked to connect back dials only the address
    the request came from, on at most two ports. Not available on Windows.
  • Windows support. The daemon and the CLI run on Windows 10 (1803 or
    later) and 11. The test suite passes on a Windows Server 2025 runner
    (amd64); the harness installers have not been tried with real
    harnesses there, and arm64 is built but not run. The
    home is created for your user only and refused if others can open it,
    and every local API call carries a key the daemon writes into the home
    at each start (D47). Releases include a2p2_windows_amd64.exe
    and a2p2_windows_arm64.exe. On Windows, a2p2 install refuses a
    binary path with spaces for the harnesses whose hooks run it in a
    shell, and refuses agy. Nothing changes on macOS or Linux.

Known limits

  • Attachments, net check, IPv6 and port mapping are covered by the
    automated tests and by runs between two daemons on one computer. None
    has been tried with a real harness session or between two physical
    machines.
  • Port mapping has only been tried against simulated routers.
  • A file transfer cut by a restart starts again from zero. Publishing
    an approved send needs free disk space for twice its size.
  • On Windows the bytes of a deleted file count against the storage
    budgets until the daemon next starts.
  • A crash during a download from the page can leave a private copy in
    the system's temporary directory.
  • On Windows the test suite passes on a Windows Server 2025 runner
    (amd64); installs into real harnesses, the page in a Windows browser
    and arm64 are untried.
  • The limits of 0.1.0 still hold, except "no attachments" and "Windows
    is not supported".