最後活躍 1 month ago

nuno 已修改 1 month ago. 還原成這個修訂版本

1 file changed, 79 insertions

gistfile1.txt(檔案已創建)

@@ -0,0 +1,79 @@
1 + Directory Structure
2 + /etc/wireguard/wgctl/
3 + ├── core/
4 + │ ├── core.sh — bootstrap, module/command loader
5 + │ ├── context.sh — path constants (ctx:: functions)
6 + │ ├── utils.sh — shared utilities
7 + │ ├── json.sh — Python helper wrappers (json:: functions)
8 + │ ├── json_helper.py — all Python data functions
9 + │ ├── fmt.sh — date/number formatting
10 + │ ├── fmt_helper.py — Python formatting helpers
11 + │ ├── ui.sh — display primitives (ui:: functions)
12 + │ ├── log.sh — logging functions (log:: functions)
13 + │ ├── flag.sh — flag parsing
14 + │ ├── module.sh — module loader
15 + │ ├── command.sh — command loader
16 + │ └── color.module.sh — color helpers (color:: functions)
17 + ├── modules/
18 + │ ├── config.module.sh — config reading/defaults
19 + │ ├── peers.module.sh — peer queries, status, formatting
20 + │ ├── firewall.module.sh — iptables wrappers (fw:: functions)
21 + │ ├── keys.module.sh — key generation/reading
22 + │ ├── ip.module.sh — IP allocation, validation
23 + │ ├── monitor.module.sh — endpoint cache, watchlist, events
24 + │ ├── rule.module.sh — rule resolution with inheritance
25 + │ ├── group.module.sh — group queries
26 + │ ├── block.module.sh — block state management
27 + │ └── net.module.sh — service registry, annotations
28 + ├── commands/
29 + │ ├── add.command.sh
30 + │ ├── remove.command.sh
31 + │ ├── rename.command.sh
32 + │ ├── list.command.sh
33 + │ ├── inspect.command.sh
34 + │ ├── block.command.sh
35 + │ ├── unblock.command.sh
36 + │ ├── rule.command.sh
37 + │ ├── group.command.sh
38 + │ ├── net.command.sh
39 + │ ├── fw.command.sh
40 + │ ├── audit.command.sh
41 + │ ├── watch.command.sh
42 + │ ├── logs.command.sh
43 + │ ├── config.command.sh
44 + │ ├── qr.command.sh
45 + │ ├── service.command.sh
46 + │ ├── shell.command.sh
47 + │ └── test.command.sh
48 + └── install/
49 +
50 + /etc/wireguard/.wgctl/
51 + ├── wgctl.conf — config overrides
52 + ├── rules/ — assignable rule files
53 + │ ├── user.rule
54 + │ ├── guest.rule
55 + │ ├── admin.rule
56 + │ ├── zephyr.rule — example per-user rule
57 + │ └── base/ — base rules (not directly assignable)
58 + │ ├── no-nginx.rule
59 + │ ├── no-proxmox.rule
60 + │ ├── no-truenas.rule
61 + │ ├── no-lan.rule
62 + │ ├── dns-restricted.rule
63 + │ └── moonlight-02.rule
64 + ├── groups/ — group definition files
65 + │ ├── family.group
66 + │ ├── arctic.group
67 + │ └── test.group
68 + ├── blocks/ — per-peer block state (JSON)
69 + │ └── phone-test.block
70 + ├── meta/ — per-peer metadata
71 + │ └── phone-nuno.meta
72 + ├── services.json — network services registry
73 + └── daemon/
74 + ├── events.log — WireGuard events (JSONL)
75 + ├── fw_events.log — firewall drops (JSONL, via ulogd2)
76 + ├── watchlist.json — blocked peer IPs for monitor
77 + ├── endpoint_cache.json — cached real endpoints
78 + ├── transfer_cache.json — activity delta cache
79 + └── wgctl-monitor.py — scapy packet capture daemon
上一頁 下一頁