* feature: Support use of FQDN resolution with DNS and mDNS
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* - fixed `cronjobs.go` call to `port.Set()`
- refactored lots of the new code and fixed errors
- added validation functions into `validate.go` to handle unicode FQDN and punycode
- fixed memory leak from not closing avahi server connection by establishing permanent connection
- updated regex used in on device form and PB validation pattern to accept international unicode FQDN or IPv4 addresses
- updated regex used for netmask validation on form
- timeout mDNS queries after 2 seconds
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* fix: remove unintentional change
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* perform FQDN/IP validation in Svelte instead of HTML form
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* disable IP tracking if field value does not match regex for IPv4
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* fix: port state not always saved, don't resolve deviceIP for every port
* send wol packets also to broadcast
* fix: handle lowercase string comparision
---------
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
Co-authored-by: Maxi Quoß <maxi@quoss.org>
* feat: optional per-device ip address tracking via periodic arp scan
Adds a per-device "Track IP address" toggle (disabled by default) and a
global cron interval setting. When enabled, upsnap periodically arp-scans
the local subnets of opted-in devices with nmap and updates a device's ip
address whenever its mac address is found at a different one. Subnets are
skipped unless directly attached to the host, so routed devices are never
scanned. Uses the same nmap + CAP_NET_RAW requirements as the existing
network scan feature; no new privileges needed.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* test: cover ip tracking subnet helpers and nmap xml parsing
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* refactor: extract ip tracking into its own package and expand test coverage
Move the arp scan sweep out of cronjobs into a new iptracking package with
two entry points: TrackAllSubnets (the cron sweep) and TrackOneSubnet (a
single validated scan). Device lookup is now by mac address across all
tracked devices, with updates constrained to the device's own subnet.
The scannability check becomes networking.ValidateScannableSubnet, which
reports why a subnet can't be scanned and accepts any subnet overlapping a
directly attached network, so sub-blocks of an attached prefix are now
scannable. The mac-to-ip mapping moves to networking as Nmaprun.MacToIP.
Cover the subnet guard, mac normalization, skip paths, and sweep
orchestration with tests against a stubbed scanner and a real migrated
schema.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* feat: pause tracking sweeps while nobody is connected
With lazy_ping turned on, the periodic tracking sweep now skips its tick
while no realtime clients are connected, just like the ping cron, and owes
a catch-up sweep to the next client that connects: the realtime connect
hook runs one sweep only when a tick was actually skipped (or none has run
since boot), so page reloads during active use trigger nothing. This
extends lazy_ping's meaning from "pause pings when idle" to "pause
periodic network activity when idle"; the setting's description is updated
accordingly.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* ui: move lazy ping section below ip tracking in settings
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
* disable toggle when tracking is disabled
* fix: load private store
---------
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
Co-authored-by: Maxi Quoß <maxi@quoss.org>
The default export from cron-parser is deprecated/removed in newer
versions. Replace `cronParser` with `CronExpressionParser` in both
the cron helper and settings page.
* Add Greek language support to settings
* Create gr-GR.json
* Add Greek translations for user interface
* Translate settings and welcome messages to Greek
* Update locale.ts
* Add Greek language support to account page
* fix el-GR language code
---------
Co-authored-by: Maxi Quoß <maxi@quoss.org>
* Format pending countdown as MM:SS
* directly use value, variable is not reused
* keep animation and 2 digits
---------
Co-authored-by: Jarvis <jarvis@local>
Co-authored-by: Maxi Quoß <maxi@quoss.org>
* add note for DEVICE_IP and DEVICE_MAC availability in cmds
Updated translations
Renamed device_tabs.0 and 1 to device_tabs_0 and 1 due to
causing problems in the inlang interpreting the . as a nested key
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
* remove some backticks
---------
Signed-off-by: invario <67800603+invario@users.noreply.github.com>
Co-authored-by: Maxi Quoß <maxi@quoss.org>