fix: correct DNS records, peer dashboard field names, and services API response

- network_manager: api/webui DNS records now point to Caddy (172.20.0.2)
  instead of their container IPs so Caddy can reverse-proxy correctly
- ip_utils: add webui.dev block to generated Caddyfile
- config/caddy/Caddyfile: regenerated with webui.dev block
- config/dns/Corefile: simplify to single forward zone (remove duplicate)
- app.py peer_dashboard: rename peer_name→name, rx_bytes→transfer_rx,
  tx_bytes→transfer_tx to match PeerDashboard.jsx; add service_urls dict
- app.py peer_services: fix DNS (10.0.0.1→real CoreDNS IP), CalDAV URL
  (radicale.dev:5232→calendar.dev), email structure (flat→nested smtp/imap
  objects), rename webdav→files, add WireGuard config text, add username field
- PeerDashboard.jsx: render service icon links from service_urls

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-26 17:11:21 -04:00
parent e5d59fd94d
commit 3690c6d955
6 changed files with 132 additions and 95 deletions
+39 -74
View File
@@ -1,92 +1,57 @@
# Personal Internet Cell - Caddy Configuration
# This serves as the main reverse proxy and TLS termination point
# Global settings
{
# Auto-generate certificates for .cell domains
auto_https disable_redirects
auto_https off
}
# Main cell domain - replace 'mycell' with your cell name
mycell.cell {
# TLS with internal CA
tls internal
# API endpoints
# Main cell domain — no service-IP restriction needed
http://pic0.dev, http://172.20.0.2:80 {
handle /api/* {
reverse_proxy cell-api:3000
}
# Web UI
handle / {
reverse_proxy cell-webui:80
}
# Email web interface
handle /mail {
reverse_proxy cell-mail:80
}
# Calendar and contacts
handle /calendar {
handle /calendar* {
reverse_proxy cell-radicale:5232
}
# File storage
handle /files {
reverse_proxy cell-webdav:80
}
# DNS management interface
handle /dns {
reverse_proxy cell-dns:8080
}
# RainLoop Webmail
handle_path /webmail/* {
reverse_proxy cell-rainloop:8888
}
# FileGator File Browser
handle /files-ui* {
handle /files* {
reverse_proxy cell-filegator:8080
}
handle /webmail* {
reverse_proxy cell-rainloop:8888
}
handle {
reverse_proxy cell-webui:80
}
}
# Peer cell domains (will be dynamically added)
# Example: bob.cell {
# reverse_proxy cell-wireguard:51820
# }
# Per-service virtual IPs — each gets its own IP so iptables can target them
http://calendar.dev, http://172.20.0.21:80 {
reverse_proxy cell-radicale:5232
}
# Local development
localhost {
# API endpoints
http://files.dev, http://172.20.0.22:80 {
reverse_proxy cell-filegator:8080
}
http://mail.dev, http://webmail.dev, http://172.20.0.23:80 {
reverse_proxy cell-rainloop:8888
}
http://webdav.dev, http://172.20.0.24:80 {
reverse_proxy cell-webdav:80
}
http://api.dev {
reverse_proxy cell-api:3000
}
http://webui.dev {
reverse_proxy cell-webui:80
}
# Catch-all for direct IP / localhost
:80 {
handle /api/* {
reverse_proxy cell-api:3000
}
# Web UI
handle / {
handle {
reverse_proxy cell-webui:80
}
# Email web interface
handle /mail {
reverse_proxy cell-mail:80
}
# Calendar and contacts
handle /calendar {
reverse_proxy cell-radicale:5232
}
# File storage
handle /files {
reverse_proxy cell-webdav:80
}
# DNS management interface
handle /dns {
reverse_proxy cell-dns:8080
}
}
}