feat(host): PUNKTFUNK_HOST_NAME names the host in Moonlight and the clients
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)
This commit is contained in:
@@ -21,6 +21,10 @@ PUNKTFUNK_VIDEO_SOURCE=virtual
|
||||
# CPU automatically. No need to set it. Set to 0 only to force the CPU path.
|
||||
# PUNKTFUNK_ZEROCOPY=0
|
||||
|
||||
# The name this host shows up under in Moonlight and the Punktfunk clients. Defaults to the
|
||||
# machine's hostname; set it to give the box a friendly name without renaming the machine.
|
||||
#PUNKTFUNK_HOST_NAME=Living Room
|
||||
|
||||
# --- Session anchors (rarely needed) -------------------------------------------------------
|
||||
# As a `systemctl --user` service the host inherits the correct XDG_RUNTIME_DIR from systemd and
|
||||
# derives the bus (`unix:path=$XDG_RUNTIME_DIR/bus`) itself. Set these ONLY when running the host
|
||||
|
||||
@@ -30,6 +30,10 @@ PUNKTFUNK_VDISPLAY=pf
|
||||
# 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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user