Skip to content

Viaalink CLI v4.2.1

Latest

Choose a tag to compare

@kwuite kwuite released this 01 Dec 05:17
· 1 commit to main since this release

4.2.1 lifts the 4.1.1 pause on via vault, introduces Viaalink Apps in alpha (with the first ten public apps and optional vault-backed app secrets), adds WireGuard device traffic inspection (via inspect start --device) plus MySQL, MariaDB and Redis decoders to the network inspector, ships via's own Caddy 2.11.7 build (with caddy-security, caddy-l4 and DNS-01 providers) in every release archive, fixes Caddy restart recovery and package routing, and patches a critical cross-spawn advisory.

Install or update

curl -fsSL https://raw.githubusercontent.com/viaalink/cli/main/install.sh | bash

Windows (PowerShell): irm https://raw.githubusercontent.com/viaalink/cli/main/install.ps1 | iex · Already on 4.x: via update · Coming from 3.x: run the installer again.

Security

  • cross-spawn 7.1.2 (was 7.0.6). Resolves GHSA-ghv9-86vm-4v8m (critical, command injection on Windows when spawning batch files) in the shipped dependency tree.

Added

  • via inspect start --device inspects a phone's or computer's own traffic.
    It prints a WireGuard config and QR code to import on the device; all of its
    TCP and UDP traffic then goes through this machine. Only that config's key
    connects, and the listener binds to one address of this machine. TLS is not
    opened, so no certificate goes on the device; each flow is logged with its
    host, TLS version and whether its payload is readable. Each start is a run
    with its own flow log and a control canary (--canary). via inspect stop --device --forget also removes the keys.
  • An app package can declare its network services in its own via.yaml, with
    the fields of a project's via.yaml (network.services.<id>: dial,
    host, public, subdomain, env, priority, rawRoutes, ...), in
    place of a net.manifest.yaml. via net apply, via env init and
    via config validate read it for every folder under the packages
    directory that has an app.yaml. A published HTTP service is reached
    through the proxy without naming the proxy's port, and the project's
    ENV_PREFIX goes in front of the service id. A net.manifest.yaml keeps
    working; a package with both files is refused with a message that names
    them, and a field an app may not set (login, modes) is an error that says
    to set it in the project's via.yaml.
  • Three more fields on a via.yaml service, which until now only a
    net.manifest.yaml could set: responseHeaders (response headers the
    proxy sets on that service's answers, for example
    responseHeaders: { "Cache-Control": ["no-store"] }), authPolicy (the
    login policy the proxy asks for in front of the service) and
    authBypassPaths (paths that skip that policy, such as the service's own
    sign-in callbacks).
  • via config validate warns when a service has securitySensitive: true and
    basic_auth: { enabled: false }. A securitySensitive service always keeps a
    login, so that enabled: false did nothing, and the file passed validation.
    To publish such a service without a login (an app with its own sign-in),
    remove securitySensitive: true.
  • Viaalink Apps, alpha: the first ten apps are public. The registry
    viaalink/apps holds Authentik, Gitea, Mattermost, n8n,
    Open WebUI, Redmine, Apache Superset, Vaultwarden, Wiki.js and Zammad. Add it once with
    via app registry add viaalink https://github.com/viaalink/apps; then, in a project folder
    (via init), via app install <id>, via app start <id> and via app setup <id> give a
    running app with its first administrator made. With Authentik in the same project the other
    apps connect their sign-in to it themselves. No registry is built in; via app list and
    via app registry list now name this command while none is added.
  • The vault is back, and apps can use it (optional). The via vault commands load again
    without VIA_ENABLE_VAULT=1; the pause of 4.1.1 is lifted. via app vault <id> stores an
    installed app's generated secrets in the vault and leaves their addresses in .env
    (KEY=via://<project>/<app>/KEY); via app start and via app setup hand the app the
    values. project.apps.vault: true in via.yaml does this for every app at install. An
    app file can name more secret keys with secrets:. When an app's secrets are in .env as
    plain text, via app install and via app start say so in one line; nothing is moved
    unless you ask.
  • prepare: steps in an app file. They run on every via app start <id>, before the
    app's containers exist, for settings an app only reads when it starts (a sign-in client,
    a repaired .env value). What a step writes to .env reaches the containers of that same
    start, and the app's data folders and files are in place before a step runs. A failing
    step stops the start. via app install and via app info show them as
    "Steps before every start"; --only starts part of an app without them.
  • via app setup hands each step the app's own folder as VIA_APP_DIR and its
    data directory as VIA_APP_DATA_DIR, so an app can ship a setup script and
    call it wherever the app is installed.
  • project.apps.compose_project and project.apps.network in via.yaml:
    a project can name the one Docker Compose project and the network its apps
    run in, so a plain via app status sees the same containers as a script
    that sets VIA_APPS_COMPOSE_PROJECT / VIA_APPS_NETWORK (which still win).
  • via app start <id> --only <service>[,<service>] starts only the named
    services of an app (and what they depend on), for example its database
    before a restore. It reports those containers only, and refuses a name that
    is not one of the app's services.
  • inspect: true on a TCP service now shows MySQL, MariaDB and Redis traffic
    decoded in the network inspector, next to Postgres: the inspector loads the
    mysqlwire and rediswire decoders as well as pgwire. Each one recognises its
    own protocol from the bytes, so one inspector serves every database. Logins
    (a MySQL password, a Redis AUTH) are kept out of the stored flows, and
    decoded queries and rows stay out of the inspector's log file. An inspector
    that was started with the Postgres decoder alone is restarted on the next
    via net apply.
  • via app: install and run apps from an app registry. A registry is a git
    repository or a directory with one folder per app (apps/<id>/app.yaml
    plus its Docker Compose file); add one with
    via app registry add <name> <git-url|directory>. No registry is built in.
    via app list, via app search <text> and via app info <id> show what
    there is; via app install <id> shows the images, ports, volumes and setup
    commands of the app and asks before it copies anything. The app lands in the
    project's packages/<id>/ folder, its settings are added to .env, and
    apps.lock.yaml records the registry, the commit and a hash of the package.
    via app start|stop|status|setup|uninstall <id> run it; uninstalling keeps
    the app's data volumes. An app with a net.manifest.yaml gets its address
    from via net apply, like any other package of the project. A package the
    project already has in packages/<id>/ is an app as soon as it has an
    app.yaml: it starts and stops with the same commands and is never
    uninstalled. An app's Compose file gets VIA_APP_DATA_DIR (its own data
    folder in the project's workspace) and VIA_APPS_NETWORK (the Docker network
    apps share, via-apps unless the project's .env names another). Each app
    runs in its own Docker Compose project named <project>-<app>, so two
    projects on one machine can run the same app without sharing containers or
    volumes. A one-off
    container that ends without an error (migrations, first-time init) counts as
    done, not as a failed start; a container that ends with an error and is
    restarted by Docker fails the start, and via app status shows how often
    each container was restarted. via app info <id> also describes an app the
    project already has, with no registry added. An app can
    name files it needs in its data folder before the first start (files: in
    app.yaml, a copy of a package file or an empty file); a file that exists is
    never replaced. A project
    that already runs its packages in one Docker Compose project keeps doing so
    by setting VIA_APPS_COMPOSE_PROJECT in .env; via app start and
    via app status then count and show only the app's own containers, not
    those of the other apps in that Compose project. This first
    version does not check signatures and has no update yet.

Fixed

  • Releases and nightlies ship via's own Caddy build again (Caddy 2.11.7 with
    caddy-security, caddy-l4 and the DNS-01 providers, from
    viaalink/caddy-dns-builds), as via itself downloads it. They carried
    upstream's plain Caddy 2.11.2, so caddy-security routes, Layer 4
    (TCP inspect) routes and DNS-01 certificates failed on a fresh install.
    Every archive is checked against the checksum pinned in the CLI, and a
    build without these modules is refused, never replaced by plain Caddy.
  • The network inspector's page on the published hub address
    (https://hub-…/asde/inspect/) shows traffic live again: its WebSocket was
    refused (403, "connection lost") because the relay route sent mitmweb the
    service's own address as Host, so every browser Origin looked foreign. The
    inspector's route now keeps the browser's Host (new manifest field
    caddy.keepHost); mitmweb's check still refuses other origins.
  • via inspect stop no longer takes inspected databases down: a TCP
    service's local address (Local TCP in via net urls) now goes straight to
    the database while the inspector is stopped, and says so per service.
    Before, its connections went to the stopped inspector and failed or hung.
    via net apply puts the inspector back in front.
  • project.tunnel.domain also holds for a project's packages. A packages/<name>/net.manifest.yaml
    without a tunnel.domain of its own was published on the relay's main domain, while the services
    in via.yaml went to the project's domain. A package now follows project.tunnel.server /
    .domain (then the machine's preference) like every other service, and its address in .env
    is predicted the same way.
  • A package's address in .env is the one it is published at. ${{ macro.exposedOrigin() }}
    in a net.manifest.yaml env: block wrote the manifest id on the relay's main domain
    (https://qemu-redmine.relay.example), while via net apply published the manifest's own
    tunnel.subdomain on its tunnel.domain, with the ending the relay gives this device's names
    (https://redmine-nico.office.example). The app was told an address nothing answers on. The
    macro now uses the manifest's name and domain and the relay's naming, as publishing does.
  • via net start starts a service declared in via.yaml. A service with process.cmd
    failed with "No lifecycle" until a via net apply had registered it; it now starts from
    via.yaml right away. And it no longer says "already running" when the service is shown
    online only because its public address answers: it now checks whether something answers on
    the service's own dial address, and says what it found.
  • A free port is free for UDP too. getRandomPort() and every other port the CLI picks
    checked TCP only, so a port another program held for UDP could be handed to an app that
    publishes the same number for both; its start then failed with "address already in use".
  • After a reboot, publishing no longer fails on a Caddy that is only recorded as running.
    via caddy start and via net apply --caddy trusted the recorded process: when that
    process id belonged to something else after a restart of the machine, or the recorded
    Caddy did not respond, they said "Caddy already running" and then stopped with
    ERR_CADDY_RELOAD, so nothing was published until someone ran the command again. A
    recorded Caddy now counts as running only when its admin API answers; otherwise a new one
    is started. A process that is not proven to be Caddy is never stopped.
  • A shared project keeps its published state when another user runs the CLI in it. On a
    machine where several users work in one project folder, a via command run by another
    user rewrote the project's network registry from that user's own relays and proxy: every
    service then showed as "not published" although it still was. A registry kept by another
    user is now read and never rewritten; one warning says so and how to take it over. The
    administrator is not held back.
  • The installer keeps the old relay client (asd-tunnel) while a systemd unit
    still starts it by its path, and names those units. It used to remove the file
    as soon as viaalink-relay ran, so such a unit failed at the next boot.
  • via relay add for a relay that is already registered (for example to add
    a host-key fingerprint) no longer drops what the relay reported about
    itself: its hostname shape, ports and version stay, only the domains the
    new probe learned change.
  • features.hub_visibility: false now switches the hub off for
    via net apply as documented: no dashboard files are written and the web
    terminal is not started. Before, only the hub's tunnel was left out.
  • via config validate checks a package net.manifest.yaml after its ${{ ... }} templates are filled in, the way via net loads it. Before, every manifest with a templated id was reported as an error. A real error now names the field (caddy.publishPreferred: ...) instead of showing cut-off JSON.
  • project.package_manifests_dir in via.yaml now works. It was documented
    as the way to keep a project's packages in another folder than packages/,
    but the setting was dropped when the file was read, so only the
    ASD_PACKAGE_MANIFESTS_DIR environment variable had an effect.