v0.1.1
Go quality gates / test (push) Waiting to run

This commit is contained in:
Mateusz Gruszczyński committed 2026-11-30 14:44:28 +01:00
1 parent 8c4d463f1e
commit de13d851a8
75 files changed
+4656 -442

No files matched your search

+6 -3
View File
@@ -12,6 +12,9 @@ case "$1" in
usermod -a -G easydns easydns-ui
fi
mkdir -p /etc/easydns-ui
mkdir -p /var/lib/easydns-ui/tokens
chown -R easydns-ui:easydns-ui /var/lib/easydns-ui
chmod 0700 /var/lib/easydns-ui /var/lib/easydns-ui/tokens
chown root:easydns-ui /etc/easydns-ui
chmod 0750 /etc/easydns-ui
if [ ! -s /etc/easydns-ui/panel.password ]; then
@@ -26,9 +29,9 @@ case "$1" in
fi
chown root:easydns-ui /etc/easydns-ui/panel.password /etc/easydns-ui/session.key
chmod 0640 /etc/easydns-ui/panel.password /etc/easydns-ui/session.key
if [ -f /etc/default/easydns-ui ]; then
chown root:easydns-ui /etc/default/easydns-ui
chmod 0640 /etc/default/easydns-ui
if [ -f /etc/easydns-ui/config.toml ]; then
chown root:easydns-ui /etc/easydns-ui/config.toml
chmod 0640 /etc/easydns-ui/config.toml
fi
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
+4
View File
@@ -2,7 +2,11 @@
set -e
if [ "$1" = purge ]; then
rm -f /etc/easydns-ui/panel.password /etc/easydns-ui/session.key
# config.toml is registered as a dpkg conffile, preserved on upgrade and
# removed by dpkg on purge. Do not delete it on package removal.
rmdir /etc/easydns-ui 2>/dev/null || true
# Purge removes private remote API tokens only when the package is purged.
rm -rf /var/lib/easydns-ui
fi
if [ -d /run/systemd/system ]; then
systemctl daemon-reload >/dev/null 2>&1 || true
+7
View File
@@ -10,3 +10,10 @@ EASYDNS_UI_SESSION_KEY_FILE=/etc/easydns-ui/session.key
EASYDNS_UI_USERNAME=admin
# Set to true only if users access the browser over HTTPS (e.g. behind a TLS proxy).
EASYDNS_UI_COOKIE_SECURE=false
# Optional multi-server management (disabled by default).
# Optional bootstrap default: use Configuration > Panel settings to change it in the UI.
# Once saved, the panel preference overrides this bootstrap value.
EASYDNS_UI_MULTISERVER=false
# Panel-owned private registry, saved preferences and per-remote-node control tokens.
EASYDNS_UI_NODES_DIR=/var/lib/easydns-ui
+5 -1
View File
@@ -10,13 +10,17 @@ User=easydns-ui
Group=easydns-ui
# Installer adds easydns-ui to the easydns group, if it exists.
# Unix socket or generated control.token must be accessible to this user.
EnvironmentFile=-/etc/default/easydns-ui
# Loads /etc/easydns-ui/config.toml natively (no shell evaluation).
# Optional environment overrides can be provided with a systemd drop-in.
Environment=EASYDNS_UI_CONFIG_FILE=/etc/easydns-ui/config.toml
ExecStart=/usr/bin/easydns-ui
Restart=on-failure
RestartSec=4s
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
# Required only for optional multi-server token and node registry persistence.
ReadWritePaths=/var/lib/easydns-ui
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
+54
View File
@@ -0,0 +1,54 @@
# EasyDNS Web 0.1.1 — Debian panel configuration.
# File: /etc/easydns-ui/config.toml
# Edit with sudo; secrets must remain readable only by root and the panel group.
# sudo chown root:easydns-ui /etc/easydns-ui/config.toml
# sudo chmod 0640 /etc/easydns-ui/config.toml
[panel]
listen = "127.0.0.1:8088"
username = "admin"
# Optional: set a password here (16+ characters) instead of using password_file.
# password = "replace-with-a-long-unique-password"
password_file = "/etc/easydns-ui/panel.password"
session_key_file = "/etc/easydns-ui/session.key"
session_auto = false
# Set true only when accessed via HTTPS and the reverse proxy forwards it.
cookie_secure = false
nodes_dir = "/var/lib/easydns-ui"
[api]
url = "http://127.0.0.1:9953"
# Use the token that EasyDNS itself generates; the panel does NOT mint tokens.
token_file = "/etc/easydns/data/control.token"
# Or set an explicit token instead of reading token_file:
# token = "generated-EasyDNS-control-token"
# For the local control socket, uncomment and ensure group permission:
# socket = "/etc/easydns/data/control.sock"
# Only for private trusted networks when HTTPS is unavailable:
allow_insecure_http = false
[multiserver]
enabled = false
local_name = "Local EasyDNS"
local_role = "primary"
# Optional additional servers (one Primary, two Secondary is a typical setup).
# You can alternatively add and manage servers in the panel UI.
# Changing these settings does NOT reconfigure EasyDNS replication.
# To enable this feature at startup, set enabled = true above.
# Each remote server needs its own control token, generated by that server.
#
# [[servers]]
# slot = 1
# name = "DNS Secondary 1"
# role = "secondary"
# url = "https://dns-secondary-1.example.net:9953"
# token = "generated-on-secondary-1"
# # Or: token_file = "/etc/easydns-ui/secondary-1.token"
#
# [[servers]]
# slot = 2
# name = "DNS Secondary 2"
# role = "secondary"
# url = "https://dns-secondary-2.example.net:9953"
# token = "generated-on-secondary-2"