Nuno Duque Nunes
3c3f870427
feat: logs descending sort, gap/offline indicator, endpoint resolution
...
- wg_events: sort_order param (desc default), --ascending/--descending flags
- wg_events: endpoint cache fallback via _endpoint() helper
- wg_events: gap computed ascending always, then sliced/reversed correctly
- fw_events: sort_order param, descending default
- ui::logs::wg_row: gap suffix with 'offline' label when gap > threshold
- logs.command.sh: --ascending/--descending flags, pass sort_order to both functions
- daemon: endpoint cache fallback in poll_handshakes
- json.sh: json::wg_events passes ctx::endpoint_cache as arg
2026-05-26 01:34:48 +00:00
Nuno Duque Nunes
cf71e9f51a
test: add tests for all new features, fix bugs found by tests
...
- integration: logs query flags, hosts command, peer command sections
- unit: fmt::bytes, config::dns_string, parse_since, ui::group::status
- destructive: duplicate rule validation, peer update-dns/tunnel
- fix: config::allowed_ips_for used $2 instead of $1
- fix: identity rule assign exit_code unbound variable
- fix: ctx::identity → ctx::identities in peers::get_identity
- fix: peers::get_identity restored (needed for rule assign duplicate check)
- rule assign: blocks if rule already in peer's identity via peers::get_identity
- identity rule assign: --migrate removes conflicting direct peer rules
2026-05-26 00:09:30 +00:00
Nuno Duque Nunes
794e75bc9b
feat: duplicate rule validation, peer command, fallback DNS
...
- rule assign: block if rule already in peer's identity
- identity rule assign: --migrate flag to remove conflicting direct peer rules
- commands/peer.command.sh: update-dns and update-tunnel subcommands
- config.sh: config::dns_fallback, config::dns_string
- peers.module.sh: peers::get_display_subnet extraction
- wgctl peer update-dns --all: retrofits existing peer configs with fallback DNS
- wgctl.conf: WG_DNS_FALLBACK support
2026-05-25 21:39:17 +00:00
Nuno Duque Nunes
d14db5e85c
remove hardcoded policies
2026-05-25 18:47:48 +00:00
Nuno Duque Nunes
a003e3b753
fix: policy_read accidental defaults merge from module split
...
- _policy_read: remove erroneous _POLICY_DEFAULTS merge (introduced during split)
- fmt.sh: fmt::bytes extracted from cmd::activity::_fmt_bytes
- identity/subnet/policy list: ui::sort_rows applied
- ctx::policies moved from policy.module.sh to context.sh
2026-05-25 18:45:23 +00:00
Nuno Duque Nunes
86220850c1
fix: handshake session detection, endpoint cache, watch ordering
...
- wgctl-monitor: update _hs_last_logged on ALL handshakes not just new sessions
- wgctl-monitor: fix endpoint_cache.json absolute path
- wgctl-monitor: move script to wgctl/daemon/ (correct location)
- watch: _poll_handshakes sorts by ts descending, endpoint cache fallback
- watch: empty endpoint uses - not em dash (alignment fix)
- logs: newline between fw and wg sections
- monitor::live extracted, cmd::logs::follow no longer calls cmd:⌚ :run
- ui.sh: UTF-8 extra byte constants
2026-05-25 16:19:13 +00:00
Nuno Duque Nunes
3058750c3d
cleanup: ui::pad_mb removal, watch alignment fixes, endpoint cache fallback
...
- ui::rule::list_row: inline padding math replaces ui::pad_mb (major perf gain)
- ui:⌚ :fw_row/wg_row: drop ui::pad_mb for fw/wg labels (always 2 chars)
- watch: endpoint fallback via monitor::get_cached_endpoint
- watch: _poll_handshakes sorts by ts descending (most recent first)
- watch: empty endpoint uses - not — (avoids multi-byte padding issues)
- ui.sh: UTF-8 extra byte constants (_UI_EMDASH_EXTRA, _UI_ARROW_EXTRA, _UI_BULLET_EXTRA)
2026-05-25 15:09:13 +00:00
Nuno Duque Nunes
28ee56aeff
feat: identity show with rule tree, peer dimming, net/group tableless layouts
...
- identity show: peers, rules tree, dim offline peers
- ui::rule::identity_block --no-header flag with reduced indentation
- ui::identity::device_row: index suffix fix, offline dimming
- net list/show: tableless with port display and descriptions
- group list/show: tableless with status coloring, stale peer handling
- group list_data: filter stale peers via clients_dir
- logs: hourly collapse for attempts, --detailed for raw events
- hosts resolution in wg_events static view
- wg-quick PostDown iptables error fix (2>/dev/null)
2026-05-24 20:46:02 +00:00
Nuno Duque Nunes
689908c875
refactor: tableless design for net, group list | net, group show
2026-05-24 00:08:15 +00:00
Nuno Duque Nunes
b813810ff3
feat: hosts.json IP resolution system
...
- wgctl hosts command (list, show, add, rm) with tags support
- modules/resolve.module.sh — chain: hosts.json → services.json → raw IP
- modules/hosts.module.sh — hosts::resolve_ip, hosts::lookup_ip
- resolve::ip and resolve::dest used in watch, logs, activity
- _WGCTL_RAW=true via --raw flag bypasses all resolution
- json_helper.py: hosts_list, hosts_show, hosts_add, hosts_remove, hosts_lookup
2026-05-23 22:01:45 +00:00
Nuno Duque Nunes
560e4cbe09
feat: peer list row coloring, verbose status, dim offline rows
...
- Dim gray for offline peers — lights off visual
- Dim/bold red for blocked peers (offline/online)
- Dim/bold yellow for restricted peers (offline/online)
- online (blocked) / offline (blocked) verbose status
- LIST_VERBOSE_STATUS=false to revert to simple status
- Rule list: +0/-0 dimmed, 0 peers dimmed
- Summary includes group breakdown
2026-05-23 04:51:33 +00:00
Nuno Duque Nunes
4dcf98b128
feat: tableless logs/watch layout with service annotations
...
- wgctl logs: tableless layout, fw/wg sections, --merged flag, --raw flag
- wgctl watch: tableless layout, service annotations, colored fw/wg labels
- wgctl rule list: tableless with +N/-N/+all indicators, inline extends
- wgctl activity: transfer totals and firewall drops per peer
- ui/logs.module.sh: fw_row, wg_row, watch rows, table versions kept
- ui/rule.module.sh: list_row, list_group_header, list_base_header
- fmt.sh: FMT_DATETIME_SHORT, updated fmt::set_date_format
- json_helper.py: fw_events with service annotation, wg_events with count
2026-05-23 03:24:20 +00:00
Nuno Duque Nunes
57e08e88c4
feat: rule list tableless layout with inline extends and +all/-N indicators
2026-05-22 23:12:27 +00:00
Nuno Duque Nunes
15897203a5
fix: blocked peer color, last seen annotation, subnet display in detailed view
2026-05-22 16:46:41 +00:00
Nuno Duque Nunes
4b2f2a846a
feat: identity, subnet, policy systems + tableless layouts
2026-05-22 03:42:40 +00:00
Nuno Duque Nunes
92d829e184
implement policy system
2026-05-21 02:16:32 +00:00
Nuno Duque Nunes
de1a44a7e4
finish base implementation
2026-05-20 21:49:44 +00:00
Nuno Duque Nunes
8bb1de4976
init feature
2026-05-19 15:26:31 +00:00
Nuno Duque Nunes
4ac25e283d
cleanup structure,bak files | change peers header to match fw in rule inspect
2026-05-19 01:17:20 +00:00
Nuno Duque Nunes
7323bf20f1
feat: main group display, group::has_peer, config validation, full block cleanup on unblock, ui::empty helper, blocks header count
2026-05-17 22:06:21 +00:00
Nuno Duque Nunes
16b4351313
feat: block/unblock --service, fw::has_rule wrappers, restricted status, net annotations, block system tests, 64 tests passing
2026-05-15 11:36:05 +00:00
Nuno Duque Nunes
c1d0a9ddd4
feat: block/unblock --service, fw::has_rule/has_block_rule/has_allow_rule, block::cleanup, restricted status in inspect, net service annotations
2026-05-15 09:22:17 +00:00
Nuno Duque Nunes
9a3ac2ae47
feat: net command, service annotations, block::restore_rules_for, fw refactor, restricted status, block system cleanup
2026-05-15 08:04:06 +00:00
Nuno Duque Nunes
cf90ab22db
feat: block system JSON migration, M:N group tracking, block module, block::restore_all, color module, fw refactor
2026-05-15 04:44:53 +00:00
Nuno Duque Nunes
7b32dcfebc
feat: rule inheritance, rule groups, rule show/inspect redesign, rule add/update --extends --group, list filters
2026-05-14 02:10:50 +00:00
Nuno Duque Nunes
6ac1a7d3a2
feat: rule inheritance, rule groups, rule inspect, ui::center, fw dedup, activity metrics
2026-05-13 22:44:07 +00:00
Nuno Duque Nunes
a09c59a7c4
fix: iptables rule ordering, idempotent fw functions, rule module cleanup, variable leak fixes
2026-05-13 04:14:30 +00:00
Nuno Duque Nunes
a7fd62ce32
refactor: group::each_peer helper, peer existence checks, group remove cleanup, watch multi-peer filter
2026-05-13 00:06:34 +00:00
Nuno Duque Nunes
51e3443357
refactor: rule::show new layout, assign fix, unblock helpers, test improvements
2026-05-12 04:27:47 +00:00
Nuno Duque Nunes
0efa6c3a9e
feat: date format config, batch optimizations, list refactor, fw:: rename, .wgctl data dir
2026-05-11 22:27:33 +00:00
root
78f9caaf17
add wgctl
2026-05-06 23:02:12 +00:00