mdns-proxy

command module
v0.0.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 24, 2024 License: GPL-3.0 Imports: 2 Imported by: 0

README

Latest Release Push Go Report Card Go Reference

mDNS Proxy

This is a HTTP proxy that forwards requests to mDNS hosts:

  • Requests to base domain (eg: example.com) shows a list of links to discovered mDNS hosts.
  • Each mDNS host (eg: foo.local) is accessible via a subdomain (eg: foo.example.com).

This is useful is situations where you have a secure network with mDNS hosts (eg: ESPHome IoT devices, which may lack strong security) and want to access control to its hosts.

An example setup would be to run this at a server that's connected to both the client network and the mDNS servers secure network:

Client network < Server > mDNS secure network

The server can restrict traffic to the mDNS secure network, and a Nginx can be setup to take care of access control:

Browser > Nginx > mDNS proxy > mDNS host

Install

Pick the latest release with:

GOARCH=$(case $(uname -m) in i[23456]86) echo 386;; x86_64) echo amd64;; armv6l|armv7l) echo arm;; aarch64) echo arm64;; *) echo Unknown machine $(uname -m) 1>&2 ; exit 1 ;; esac) && wget -O- https://github.com/fornellas/mdns-proxy/releases/latest/download/mdns-proxy.linux.$GOARCH.gz | gunzip > mdns-proxy && chmod 755 mdns-proxy
./mdns-proxy server --base-domain example.com

Development

Docker is used to create a reproducible development environment on any machine:

git clone git@github.com:fornellas/mdns-proxy.git
cd mdns-proxy/
./builld.sh

Typically you'll want to stick to ./builld.sh rrb, as it enables you to edit files as preferred, and the build will automatically be triggered on any file changes.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
cli
lib

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL