secubox-openwrt/package/secubox/secubox-app-meshname-dns/Makefile
CyberMind-FR 07705f458c feat(meshname-dns): Add decentralized .ygg domain resolution
Implements Meshname DNS for Yggdrasil mesh networks with gossip-based
service discovery and dnsmasq integration.

New packages:
- secubox-app-meshname-dns: Core service with meshnamectl CLI
- luci-app-meshname-dns: LuCI dashboard for service management

Features:
- Services announce .ygg domains via gossip protocol (meshname_announce)
- dnsmasq integration via /tmp/hosts/meshname dynamic hosts file
- Cross-node resolution through gossip message propagation
- RPCD handler with 8 methods for LuCI integration

CLI commands: announce, revoke, resolve, list, sync, status, daemon

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-28 07:57:16 +01:00

61 lines
1.8 KiB
Makefile

# SPDX-License-Identifier: MIT
include $(TOPDIR)/rules.mk
PKG_NAME:=secubox-app-meshname-dns
PKG_VERSION:=1.0.0
PKG_RELEASE:=1
PKG_MAINTAINER:=CyberMind <contact@cybermind.fr>
PKG_LICENSE:=MIT
include $(INCLUDE_DIR)/package.mk
define Package/secubox-app-meshname-dns
SECTION:=secubox
CATEGORY:=SecuBox
SUBMENU:=Mesh
TITLE:=Meshname DNS - Decentralized .ygg domain resolution
DEPENDS:=+secubox-mirrornet +yggdrasil +dnsmasq +libubox-jshn
PKGARCH:=all
endef
define Package/secubox-app-meshname-dns/description
Decentralized DNS for Yggdrasil mesh networks.
Services announce themselves via gossip protocol with .ygg domains.
Local dnsmasq resolves queries using dynamically updated hosts file.
endef
define Build/Compile
endef
define Package/secubox-app-meshname-dns/install
$(INSTALL_DIR) $(1)/etc/config
$(INSTALL_CONF) ./files/etc/config/meshname-dns $(1)/etc/config/meshname-dns
$(INSTALL_DIR) $(1)/etc/init.d
$(INSTALL_BIN) ./files/etc/init.d/meshname-dns $(1)/etc/init.d/meshname-dns
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) ./files/usr/sbin/meshnamectl $(1)/usr/sbin/meshnamectl
$(INSTALL_DIR) $(1)/usr/lib/meshname-dns
$(INSTALL_DATA) ./files/usr/lib/meshname-dns/announcer.sh $(1)/usr/lib/meshname-dns/announcer.sh
$(INSTALL_DATA) ./files/usr/lib/meshname-dns/resolver.sh $(1)/usr/lib/meshname-dns/resolver.sh
$(INSTALL_DATA) ./files/usr/lib/meshname-dns/gossip-handler.sh $(1)/usr/lib/meshname-dns/gossip-handler.sh
endef
define Package/secubox-app-meshname-dns/postinst
#!/bin/sh
[ -n "$${IPKG_INSTROOT}" ] || {
# Add meshname hosts file to dnsmasq
if ! uci -q get dhcp.@dnsmasq[0].addnhosts | grep -q meshname; then
uci add_list dhcp.@dnsmasq[0].addnhosts='/tmp/hosts/meshname'
uci commit dhcp
fi
/etc/init.d/meshname-dns enable
}
exit 0
endef
$(eval $(call BuildPackage,secubox-app-meshname-dns))