feat: add Yggdrasil overlay network to firmware build

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-05 14:53:10 +00:00
parent 38d78071c7
commit da567b6398
2 changed files with 31 additions and 1 deletions

View File

@@ -374,7 +374,33 @@ SYS_EOF
uci commit system
# ============================================================================
# 10. FINAL
# 10. YGGDRASIL OVERLAY NETWORK
# ============================================================================
# Generate unique keys for this node
yggdrasil -genconf | sed 's/IfName: .*/IfName: ygg0/' > /etc/yggdrasil.conf
# UCI network interface for yggdrasil TUN
uci batch <<-YGG_EOF
set network.yggdrasil=interface
set network.yggdrasil.device='ygg0'
set network.yggdrasil.proto='none'
YGG_EOF
uci commit network
# Add yggdrasil to LAN zone (mesh nodes trust each other)
uci add_list firewall.@zone[0].network='yggdrasil'
uci commit firewall
# Enable yggdrasil service
/etc/init.d/yggdrasil enable
# Save yggdrasil address to node keys file
YGG_ADDR=$(yggdrasil -address -useconffile /etc/yggdrasil.conf 2>/dev/null || echo "unknown")
echo "YGGDRASIL_ADDRESS=${YGG_ADDR}" >> /etc/parahub/keys
# ============================================================================
# 11. FINAL
# ============================================================================
# Log completion
@@ -383,5 +409,6 @@ logger -t parahub-mesh "Hostname: ${HOSTNAME}"
logger -t parahub-mesh "Private: ${PRIVATE_SSID} @ ${PRIV_IP}/24"
logger -t parahub-mesh "Guest: ${PUBLIC_SSID} @ ${GUEST_IP}/24"
logger -t parahub-mesh "Mesh ID: ${MESH_ID}"
logger -t parahub-mesh "Yggdrasil: ${YGG_ADDR}"
exit 0

View File

@@ -58,6 +58,9 @@ PACKAGES_CORE=(
wpad-mesh-mbedtls
-wpad-basic-mbedtls
# Yggdrasil overlay network
yggdrasil
# SQM traffic shaping
sqm-scripts
kmod-sched-cake