Closed cptaffe closed 1 year ago
The listen hostname stuff will be resolved with the next release - required some changes in PAPPL which have now been released.
I'll look at supporting snap configuration here and in LPrint.
Oh, I should note that PAPPL-based printer applications will try to defend against DNS rebinding attacks, so all client requests need to target the mDNS hostname ("hostname.local"), the system hostname (whatever "hostname" reports), an IP address, or (for loopback/domain socket access) "localhost". Right now there is no provision for a system that has multiple FQDNs beyond "hostname.local" and "hostname.domain"...
OK, so I have this implemented for LPrint and will carry that over to hp-printer-app as well...
I set the system hostname to be the domain I use on my local network, e.g. printserver.home.arpa
, but I would like to be able to use a non-hostname domain and proxy to different printer app UIs + CUPS via nginx. The connection from nginx would be via localhost
, but the Host
header would report the original domain, e.g. printer-apps.home.arpa
-- would that fail for PAPPL-based applications?
Right now PAPPL isn't setup to support multiple domain names. It is intended only to support local direct printing with future support for the IPP "Shared Infrastructure" (cloud) extensions to allow remote network access vs. trying to use brittle (and insecure) HTTP/SSH proxy solutions and exposing a local server to a WAN/the Internet.
[master 7f8980f] Update snap to support configuration and PAPPL 1.3.1 (Issue #21)
@michaelrsweet when will these changes be available? The version available to me (1.2.0) doesn't have the ability to snap set hp-printer-app server-hostname=hp-printer-app.home.arpa
.
; snap info hp-printer-app
name: hp-printer-app
summary: HP Printer Application
publisher: Michael Sweet (michaelrsweet)
store-url: https://snapcraft.io/hp-printer-app
license: unset
description: |
HP Printer Application is sample printer application for Hewlett Packard PCL
(and compatible) printers. It is based on PAPPL (Printer Application
Framework), a simple C-based framework/library for developing CUPS Printer
Applications, which are the recommended replacement for printer drivers.
commands:
- hp-printer-app
services:
hp-printer-app.hp-printer-app-server: simple, enabled, active
snap-id: TsR8cclxOUKWUcf96gkX5B0XjlB2kr5J
tracking: latest/stable
refresh-date: today at 13:54 EDT
channels:
latest/stable: 1.2.0 2022-11-03 (386) 2MB -
latest/candidate: 1.2.0 2022-11-03 (386) 2MB -
latest/beta: 1.2.0 2022-11-03 (386) 2MB -
latest/edge: 1.2.0 2022-11-03 (386) 2MB -
installed: 1.2.0 (386) 2MB -
Is your feature request related to a problem? Please describe.
The article A New Way to Print in Linux mentions Snaps several times, so I assume it's the preferred installation method.
When installing
hp-printer-app
via snap, the service runs this file which contains hardcoded options. This results in being unable to solve simple issues such as:http://printserver.home.arpa:8000
. I need to pass-o listen-hostname=printserver.home.arpa
Describe the solution you'd like
I believe at least the first issue is fixable via configuration options, passed via
-o
(as documented here), but since snaps are immutable I'm unable to edit thehp-printer-app-server
file. I believe snap configuration could provide a way to expose each-o
as a config option, settable viasnap set hp-printer-app-server ...
.