Skip to content

Apargon 0.5.0

Choose a tag to compare

@HaMMeRSI HaMMeRSI released this 12 Nov 09:02
· 39 commits to main since this release

Security

  • Apargon now keeps one promise: a .papp file can't send anything off your computer unless you said yes. Each tag is that yes, one line in the popup.
  • A .papp file with no tags now reads every local disk. Before, it saw only its own folder. It writes only its own folder, ~/.apargon/<id>, has no network, and opens with no popup, downloaded or not.
  • All network goes through Apargon's proxy, localhost too. The proxy checks that a site is allowed before it looks up its name.
  • papp-net takes exact sites only, no *. Links open only to a site in papp-net. Any other link is dropped, with no dialog.
  • A yes belongs to the file's exact bytes. Any change, even a comment, asks again. So does a tag that now leads to another folder or program.
  • The popup no longer asks you to tick "I trust this page".
  • Programs from papp-run get the same limits as the .papp file: they read everything, write only its folders, reach only its sites, through the proxy, and get only its papp-env variables.
  • macOS: files a .papp file or its programs write are marked as downloaded, so the Mac asks before one runs.
  • Windows: files Apargon writes for a pick or papp.save are marked as downloaded.
  • Approvals, picks, window places and secrets are kept in Apargon's own data, where no .papp file writes.
  • A .papp file quits if Apargon's own process dies.
  • A .papp file whose name or folder has a line break is refused.
  • macOS: network drives and cloud folders (iCloud Drive, Dropbox and the like) can't be read without papp-use cloud.
  • macOS: no mounting, no opening other apps, no Apple Events, and only the basic devices. Programs get no system services.
  • Linux: Apargon runs on GNOME with Wayland. On X11 it asks first, as there any app can type into and read other windows. Other desktops are refused until tested.
  • Linux: a .papp file and its programs can't reach D-Bus or any socket file. Network drives, and drives plugged in after it opens, stay hidden.
  • Linux: sound passes through a filter that allows only playing and recording on the default device.
  • Windows: a .papp file reads the folders at the root of each local drive and your user folder. Network drives are skipped, and OneDrive unless papp-use cloud.
  • Windows: papp-run no longer needs "I trust this page". A program can still make Windows look up a name, as in \\<data>.example.com\x. That's Microsoft's to fix, and it has been reported.
  • Apargon tells you, but doesn't block: an allowed site can receive any file you have. Code written with papp-write can run later, outside Apargon. Dropbox and iCloud upload what's written in their folders.
  • A hard link already inside a papp-write folder reaches the file it links to.
  • Linux: papp-socket turns the socket block off. The popup says "Control any program on this computer".
  • Linux: with papp-use sound, a .papp file plays to your default speakers, even when they are on the network.
  • ~ in a path can no longer lead elsewhere when the home folder's name has a $.
  • Linux and Windows: Apargon no longer decodes an image a .papp file sends with a notification. The icon arrives as plain pixels.
  • minimatch updated to 11.0.3 (GHSA-g3hv-75wg-m249).

New

  • papp.folder: its own folder, the one place it writes without a tag.
  • papp.pick needs no tag and restarts nothing. Picks are kept after a restart. With write: true, Apargon writes the picked file, or plain file names in the picked folder. papp.picks() lists them.
  • papp.save saves one file where you pick. It can replace a file, after the OS asks.
  • papp.getSecret, papp.setSecret and papp.deleteSecret keep keys sealed with your computer's own store.
  • papp-write all: change any file but Apargon's own.
  • papp-run unfenced: one program with no limits. papp-run ./bin/tool runs a program the .papp file ships.
  • papp-listen, or papp-listen network: Apargon answers requests for the .papp file, from this computer or your network. papp.listen gets each one.
  • papp.connect: a TCP connection, with or without TLS, to a site in papp-net. For database, mail or chat clients.
  • papp-window: size, minimum size, resizable, title bar, frame, see-through, on top, every Space, click-through, hidden from screen sharing, no dock icon, blur and no Apargon mark.
  • papp.window moves, resizes, minimizes, maximizes, fades and shows the window. papp.displays lists the screens.
  • window.open on its own file takes papp-window settings for that window.
  • Windows reopen where you left them.
  • New papp-use features: background, login, usb, serial, hid, midi, cursor, cloud, and on macOS broadcasts, share and bluetooth.
  • papp.print() and window.print() open the system print panel, with no tag. papp.pdf() makes a PDF of the window.
  • papp.menu, papp.contextMenu and papp.onMenu: menus of its own.
  • papp.tray takes items, a checkbox or radio button, an icon, and clicks for a tray popover.
  • papp.progress, papp.badge and papp.attention on the dock or taskbar icon.
  • papp.onSystem, papp.power and papp.keepAwake: sleep, wake, lock, battery, idle time, and keeping the computer awake.
  • papp.trash moves a file to the Trash. papp.quit and papp.closeWindow end it or close its window.
  • papp-global-shortcut any lets papp.shortcuts pick keys while it runs. Media keys work alone, like MediaPlayPause.
  • Notifications show the .papp file's icon and up to three buttons.
  • The favicon can come from a site in papp-net.
  • Linux and Windows: each .papp file has its own taskbar icon and title.
  • Windows: camera, microphone and location work. papp-net to localhost works, through the proxy.

Changed

Every .papp file needs an edit:

  • Add <meta name="papp-id" content="<uuid>">. A file without one doesn't open. Its folder and secrets follow the id through renames and new versions.
  • Each .papp file asks again once, and starts with empty localStorage and IndexedDB, kept now in its own folder.
  • papp-read is gone: every .papp file reads the local disks. Remove the tag.
  • papp-open is gone: put its sites in papp-net.
  • papp-node is now papp-system, with no content. It can't be combined with papp-write, papp-run, papp-net, papp-socket, papp-listen or papp-env. @electron/remote is gone.
  • papp-shortcut is now papp-global-shortcut.
  • papp-write takes one folder, no *. Not your home folder, or one that holds it.
  • papp-net takes a host and an optional port, 443 if none. No scheme, no *.
  • papp-use takes one feature per tag.
  • papp.saveAs is now papp.saveAll.
  • papp.readFile takes its options in one object: { encoding: null } for bytes, { offset, length } for part of a file.
  • papp.rm removes a folder only with { recursive: true }.
  • papp.watch gives a handle: close() stops it, closed resolves once it has stopped.
  • papp.spawn: kill() is now close(), and done is now closed.
  • papp.run keeps up to 64 MB of a program's output. Past that, it stops the program and fails. Use papp.spawn for more.
  • papp-listen: with 32 requests waiting for an answer, the next one gets 503.
  • papp.open takes only an http(s) link to a site in papp-net. It no longer opens files or folders.
  • Permissions → This Page's Permissions… is now What This File Can Do…, and Approved Pages is now Files You Said Yes To.
  • Linux: KDE, sway and other desktops on Wayland are refused for now. Ubuntu 24.04 or newer is needed.
  • Windows: papp-socket and papp-use bluetooth refuse the file, for now.

Fixed

  • A local video can seek.
  • Live reload follows only the .papp, .css and .js files it loaded. A file it saves itself no longer reloads it.
  • papp.copyFile no longer loads the whole file into memory.
  • Saving, and writing to a file or folder you picked, streams the file. It no longer freezes the .papp file or fails past about 380 MB.
  • papp.readFile with { encoding: null }, papp.writeFile and papp.appendFile stream their bytes too.
  • A program or connection that sends faster than the .papp file takes it now waits, instead of filling memory. write() on papp.spawn and papp.connect resolves once the data is taken.
  • papp.spawn: a character split between two chunks of output no longer arrives broken.
  • Linux: one slow connection through Apargon no longer holds up the others.
  • A bad request from a .papp file is logged, not shown as an error box.
  • Windows: a papp-system output line that starts with { is shown as output, not taken for a request.
  • Windows: a .papp file draws with the GPU.

Apargon checks for a new version once a day when a page opens, unless you turned that off under Permissions. If you did, watch this repository to hear about security fixes: Watch → Custom → Releases.