grishy / go-avahi-cname Goto Github PK
View Code? Open in Web Editor NEW🪶 lightweight mDNS publisher of CNAME/subdomains for your machine
License: MIT License
🪶 lightweight mDNS publisher of CNAME/subdomains for your machine
License: MIT License
I'm getting the following error after some time (around 3 days):
Jan 27 17:59:22 ha go-avahi-cname[670]: 2024/01/27 17:59:22 Publishing every 300s and CNAME TTL 600s
Jan 31 07:19:22 ha go-avahi-cname[670]: Error:
Jan 31 07:19:22 ha go-avahi-cname[670]: > failed to publish CNAMEs: failed to create entry group: Too many objects
The avahi daemon reports the same thing:
Jan 31 07:19:22 ha avahi-daemon[642]: Too many objects for client ':1.7', client request failed.
The service is being run on Ubuntu 22.04 using systemd. Though I guess it isn't really that important. I'm using the following command:
/usr/bin/go-avahi-cname cname grafana.local.
We are not building a binary for this platform right now, as dbus cannot build without a CGO for this platform.
More info: godbus/dbus#315
It is possible to automatically get all .local
domains from Traefik and send them to avahi as CNAME.
Issue at Traefik: traefik/traefik#6334
Example of implementation: https://gitlab.com/viraptor/docker_mdns
Theoretically, it is feasible to dynamically alter the interaction with the CNAME based on the response to the request.
When a device within a network attempts to connect to, for instance, test.lab.local
, and test.lab.local
is not present in the cache, a request is sent. Consequently, two potential approaches are possible: either listening on the multicast IP or subscribing to avahi dbus messages (assuming they are available).
Implementing this approach would result in reduced network traffic by minimizing the number of packages transmitted within the network, and it would also introduce additional logic to handle response behavior. An automatic redirection of all *.lab.local
requests to lab.local
through CNAME during runtime would be achievable through this mechanism.
Hi,
Thank you for this project! It looks like what i need.
I essentially just need a network alias because some devices in my network know it by name X, some by name Y. Don't ask ;)
From the elaborate detailed description i "think" that this project does what i want it to do. But it's completely unclear to me how.
You have 2 ways to install. Binary and docker.
Binary
The binary version is partly clear to me. You register/publish new cnames.
What isn't clear here is:
Docker
The docker version is even more vague to me.
I'm looking forward to hearing some clarity about this. It's probably the fix for me :)
But as it is now, it's waaaaaay too vague for me to even try it.
Is it possible to redirect an url like:
http://potato.pc.local -> http://pc.local/potato
Or any custom rule like that ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.