A box called `bazzite-htpc` had no way to present itself as "Living Room" short of renaming the machine. The new knob overrides the name everywhere a human sees it: the GameStream serverinfo <hostname> element and the mDNS service instance name both adverts carry. Unset (the default) is the machine's own hostname, exactly as before. Free text is the point, so the DNS-level name is now a separate concern from the display name. The instance label may contain spaces and accents; an A-record target may not, and mdns-sd rejects the whole ServiceInfo if the target is not a legal name — which would take discovery down rather than merely look wrong. dns_label() sanitizes the target and passes an already-legal name through byte-for-byte, so hosts without the override advertise precisely what they always did. The display name loses `.` (it would split the label, and clients derive the name as the first label of the fullname, so "Ben's PC v1.2" would arrive as "Ben's PC v1") and is capped at the 63-byte DNS-SD ceiling on a char boundary. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> (cherry picked from commit bbf72261a12e0e67601f549d40db65ae61979268)
58 lines
3.2 KiB
Bash
58 lines
3.2 KiB
Bash
# punktfunk host configuration (Windows) — read by the `PunktfunkHost` service.
|
|
#
|
|
# `punktfunk-host service install` writes a default copy of this to
|
|
# %ProgramData%\punktfunk\host.env
|
|
# Edit that file (not this one) and restart the service to apply:
|
|
# punktfunk-host service stop
|
|
# punktfunk-host service start
|
|
#
|
|
# Format: KEY=VALUE per line; '#' starts a comment. The service loads these into its environment
|
|
# and passes PUNKTFUNK_* and RUST_LOG through to the host it launches into the active session.
|
|
|
|
# Hardware encode backend. `auto` (default) detects the GPU vendor: NVIDIA->nvenc (direct SDK),
|
|
# AMD->amf, Intel->qsv (both libavcodec). Force one with: nvenc | amf | qsv | sw (software H.264).
|
|
# nvenc needs the `--features nvenc` build; amf/qsv need the `--features amf-qsv` build (FFmpeg DLLs
|
|
# ship in the installer). The published installer is built with all three.
|
|
PUNKTFUNK_ENCODER=auto
|
|
|
|
# Video source: `virtual` creates a per-client virtual display at the client's exact resolution +
|
|
# refresh — the flagship mode. Requires the bundled pf-vdisplay indirect display driver installed.
|
|
PUNKTFUNK_VIDEO_SOURCE=virtual
|
|
|
|
# Virtual-display backend: the all-Rust pf-vdisplay IddCx driver the installer bundles is the only
|
|
# backend now (the legacy SudoVDA backend was removed). This is informational; leave it as `pf`.
|
|
PUNKTFUNK_VDISPLAY=pf
|
|
|
|
# Capture is IDD-push: straight from the pf-vdisplay driver's shared ring — zero-copy, includes the
|
|
# secure desktop. It is the SOLE capture path (DDA/WGC were removed; the former PUNKTFUNK_IDD_PUSH
|
|
# knob is gone — a stale setting is ignored).
|
|
|
|
# Capture the secure desktop (UAC / lock / login) so the stream survives those transitions.
|
|
PUNKTFUNK_SECURE_DDA=1
|
|
|
|
# The name this host shows up under in Moonlight and the Punktfunk clients. Defaults to the
|
|
# machine's computer name; set it to give the box a friendly name without renaming Windows.
|
|
#PUNKTFUNK_HOST_NAME=Living Room
|
|
|
|
# Log level (info | debug | trace). Logs land in %ProgramData%\punktfunk\logs\.
|
|
RUST_LOG=info
|
|
|
|
# The host subcommand the service launches. The native punktfunk/1 host is ALWAYS on; `--gamestream`
|
|
# adds the GameStream/Moonlight-compat planes, which pair over plain HTTP and reuse legacy GCM
|
|
# nonces (security-review #5/#9) — so `serve` alone is the SECURE native-only host.
|
|
#
|
|
# A Windows install writes this line explicitly from the installer's "Enable GameStream (Moonlight)
|
|
# compatibility" task, which is OPT-IN (unchecked) — so a default install lands `serve`. Only if
|
|
# this line is absent altogether does the service fall back to its built-in `serve --gamestream`.
|
|
# Change it later with `punktfunk-host service install --gamestream=on|off` + a service restart; a
|
|
# custom value you write here by hand is never overwritten by a reinstall/upgrade.
|
|
#PUNKTFUNK_HOST_CMD=serve --gamestream
|
|
|
|
# Multi-GPU boxes only: force the NVENC/Desktop-Duplication GPU by Description substring. Leave
|
|
# unset on single-GPU machines (the default auto-picks the discrete adapter).
|
|
#PUNKTFUNK_RENDER_ADAPTER=4090
|
|
|
|
# Keep a per-client virtual display alive briefly after disconnect so a quick reconnect reuses it
|
|
# (no display connect/disconnect chime). Default 10000 ms.
|
|
#PUNKTFUNK_MONITOR_LINGER_MS=10000
|