Files
infix/src/netbrowse
Joachim Wiberg 92d3db46a7 netbrowse: convert to gunicorn and factor out mdns-alias app
Converting to gunicorn, which is the recommended production server for
Flask apps, means app main() function is no longer called at startup, so
we have to factor out the mDNS CNAME functionality for infix.local and
network.local to a separate app.

We take this opportunity to collapse the structure, move non-class
methods to __init.py__, and rename the AvahiAlias class.  A prototype
for replacing the overhead of mdns-alias with a C daemon is in its
early stages.

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
2024-04-15 15:36:41 +02:00
..
2024-04-15 15:36:41 +02:00
2024-04-15 15:36:41 +02:00

mDNS Network Browser

This program is a Python Flask app that provides an mDNS browser for, e.g., Nginx. It is intended to answer calls to https://network.local

A UNIX socket, for fastcgi, is created in /tmp/netbrowse.sock with permissions 0660 as the user and group the program is started as.

When using Finit this can be achieved with

service @www-data:www-data netbrowse network.local

In your Nginx server configuration, add:

location /browse {
		include fastcgi_params;
		fastcgi_pass unix:/tmp/netbrowse.sock;
}

For more a elaborate setup, you can have another server block:

server {
    listen 80;
    listen [::]:80;
    server_name network.local;

    location / {
        include fastcgi_params;
        fastcgi_pass unix:/tmp/netbrowse.sock;
    }
}