最後活躍 1 month ago

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

1 file changed, 64 insertions

gistfile1.txt(檔案已創建)

@@ -0,0 +1,64 @@
1 + wgctl test --section destructive --verbose
2 +
3 + ────────────────────────────────────────────────
4 + wgctl Test Suite
5 + ────────────────────────────────────────────────
6 +
7 + Destructive (modifying state)
8 + ──────────────────────────────────────────────────
9 + ❌ add phone peer
10 + Output: => ERROR: ❌ Client already exists: phone-testunit
11 + root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit
12 + Are you sure you want to permanently remove 'phone-testunit'? [y/N] y
13 +
14 + ────────────────────────────────────────────────
15 + Removing client: phone-testunit
16 + ────────────────────────────────────────────────
17 + => INFO: 🔑 🔒 Removed keys for: phone-testunit
18 + => SUCCESS: ✅ 🔒 Client removed: phone-testunit
19 + root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose
20 +
21 + ────────────────────────────────────────────────
22 + wgctl Test Suite
23 + ────────────────────────────────────────────────
24 +
25 + Destructive (modifying state)
26 + ──────────────────────────────────────────────────
27 + ✅ add phone peer
28 + ✅ block peer
29 + ✅ list shows blocked
30 + ✅ unblock peer
31 + ✅ rule assign
32 + ✅ rule unassign
33 + ❌ group add
34 + Output: => ERROR: ❌ Group already exists: testgroup
35 + root@wireguard:/etc/wireguard/wgctl# wgctl rm --name phone-testunit
36 + Are you sure you want to permanently remove 'phone-testunit'? [y/N] y
37 +
38 + ────────────────────────────────────────────────
39 + Removing client: phone-testunit
40 + ────────────────────────────────────────────────
41 + => INFO: 🔑 🔒 Removed keys for: phone-testunit
42 + => SUCCESS: ✅ 🔒 Client removed: phone-testunit
43 + root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group unblock --name testgroup 2>&1
44 + root@wireguard:/etc/wireguard/wgctl# /usr/local/bin/wgctl group rm --name testgroup 2>&1
45 + Remove group 'testgroup'? This only removes the group definition, not the peers. [y/N] y
46 + => SUCCESS: ✅ 🔒 Group removed: testgroup
47 + root@wireguard:/etc/wireguard/wgctl# wgctl test --section destructive --verbose
48 +
49 + ────────────────────────────────────────────────
50 + wgctl Test Suite
51 + ────────────────────────────────────────────────
52 +
53 + Destructive (modifying state)
54 + ──────────────────────────────────────────────────
55 + ✅ add phone peer
56 + ✅ block peer
57 + ✅ list shows blocked
58 + ✅ unblock peer
59 + ✅ rule assign
60 + ✅ rule unassign
61 + ✅ group add
62 + ✅ group peer add
63 + ❌ group block (expected 'Blocked' in output)
64 + root@wireguard:/etc/wireguard/wgctl#
上一頁 下一頁