SickHub / docker-cups-airprint

A standalone CUPS and Avahi (mDNS/Bonjour) server, exposing local printers on AirPrint for iOS devices
GNU General Public License v3.0
152 stars 38 forks source link

allow administration from all ip address #32

Open FrancYescO opened 3 years ago

FrancYescO commented 3 years ago

https://github.com/RagingTiger/docker-cups-airprint/blob/master/Dockerfile#L38-L44

DrPsychick commented 3 years ago

I'll take a closer look next week. Maybe you want to check the available environment variables meanwhile. It should allow you to configure remote management from anywhere.

FrancYescO commented 3 years ago

Probably is just a little more of what is done here https://github.com/DrPsychick/docker-cups-airprint#manually-through-web-interface

i launched the server (on a raspberry on my lan) with CUPS_WEBINTERFACE="yes" and CUPS_REMOTE_ADMIN="yes" and i was not able to control it from the PC, than issued the sed reported above and it allowed me to remote control.

DrPsychick commented 3 years ago

So I checked on my running container with cupsctl --no-remote-admin vs. cupsctl --remote-admin --remote-any. It does actually set exactly what your proposed changes do - it adds an Allow all to the "Location" entries in cupsd.conf.

@FrancYescO can you check and verify that the command actually do what you need? If so, I'd rather stick to the official cupsctl than modifying the config by hand.

If, on the other hand, your goal cannot be achieved with cupsctl, let's figure out how we can add this as feature.

DrPsychick commented 3 years ago

Just thinking out loud: it could be the ServerAlias * and DefaultEncryption Never you're adding. I found that cups is quite picky when it comes to SSL.

@FrancYescO You could add variables that allow adding those settings in start-cups.sh and open a pull request

FrancYescO commented 3 years ago

i can confirm that DefaultEncryption Never is what fixes the issue, without this line you want get the basic auth popup but:

immagine

And idk if the issue is related to this, but doing this edit allow me also to use the admin webinterface from MacOS, so you could cleanup the readme