Skip to main content

HTTPS And Mesh

The PC printer driver can expose HTTPS through Caddy and PeerJS signaling through /mesh.

HTTPS Conditions

HTTPS starts only when all of these are true:
  • features.httpsEnabled is true.
  • caddy.enabled is true.
  • The runtime platform is Windows.
  • Certificates exist in assets/certs.
  • Caddy can be installed or reused.
If HTTPS setup fails, the driver logs the error and continues with HTTP.

Certificate Files

Required files:
The driver copies them into the Caddy working folder:
The CA certificate can be downloaded from:

Caddy Install

Caddy setup uses this order:
  1. Reuse assets/caddy/bin/caddy.exe if already installed with .installed.
  2. Copy bundled caddy.exe from known local paths.
  3. Download Caddy from GitHub release URL.
The configured Caddy version defaults to 2.6.4.

Generated Caddyfile

The driver writes a Caddyfile like:
If caddy.httpsPort is not 443, the site address includes the port.

Caddy Runtime

Caddy runs as a child process with:
  • XDG_DATA_HOME set to assets/caddy/data
  • XDG_CONFIG_HOME set to assets/caddy/config
  • working directory set to assets/caddy
If Caddy exits unexpectedly, the driver retries up to 5 times with a 2000ms delay.

Mesh Signaling

When features.meshEnabled is true, the driver mounts PeerJS at:
GET /mesh-status returns:
  • whether mesh is enabled
  • mesh path
  • port
  • connected peer IDs
  • peer count
Mesh is signaling only. Print jobs still use the HTTP endpoints.

Common HTTPS Problems