All New

user:thomas gists created by user

title:mygist gists with given title

description:sync gists with given description

filename:myfile.txt gists having files with given name

extension:yml gists having files with given extension

language:go gists having files with given language

topic:homelab gists with given topic

all:systemctl search all fields

Register

Login

All New Register Login

All gists

Recently created
Least recently created
Recently updated
Least recently updated

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 root@wireguard:/etc/wireguard/wgctl# wgctl activity
2
3 ────────────────────────────────────────────────
4 Activity Monitor (last 24h)
5 ────────────────────────────────────────────────
6
7 desktop-roboclean ↓14MB ↑509MB 0 drops
8
9 laptop-nuno ↓270MB ↑217MB 0 drops
10 laptop-nuno ↓ 585KB ↑ 187KB 810 conns

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 #!/usr/bin/env bash
2 # activity.command.sh — WireGuard activity snapshot
3
4 # ============================================
5 # Lifecycle
6 # ============================================
7
8 function cmd::activity::on_load() {
9 load_module net

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 log::error "Service not found: ${filter_service}"
2 return 1
3 fi
4 fi
5 [[ -n "$filter_ip" ]] && service_ip="$filter_ip"
6
7 # Fetch aggregated data
8 local data
9 data=$(json::activity_aggregate \
10 "$(ctx::fw_events_log)" \

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 98: data=$(json::activity_aggregate \
2 99: "$(ctx::fw_events_log)" \
3 100: "$(ctx::events_log)" \
4 102: "$(ctx::net)" \
5 103: "$(ctx::clients)" \
6 104: "$(ctx::meta)" \
7 234: data=$(json::activity_aggregate \
8 235: "$(ctx::fw_events_log)" "$(ctx::events_log)" \
9 236: "$(config::interface)" "$(ctx::net)" \
10 237: "$(ctx::clients)" "$(ctx::meta)" \

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 wc -l /etc/wireguard/wgctl/core/lib/events.py
2 head -30 /etc/wireguard/wgctl/core/lib/events.py
3 673 /etc/wireguard/wgctl/core/lib/events.py
4 """
5 events.py — WireGuard and firewall event processing.
6 """
7
8 import os
9 import json
10 import sys

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::test::run_cmd() {
2 local desc="$1" expected="${2:-}"
3 shift 2
4
5 local tmp exit_code
6 tmp=$(mktemp)
7
8 set +e
9 timeout 30 "$WGCTL_BINARY" "$@" > "$tmp" 2>&1
10 exit_code=$?

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::unblock::run() {
2 local name="" identity="" type=""
3 local ips=() subnets=() ports=() services=()
4 local all=false quiet=false force=false
5 local reason=""
6
7 while [[ $# -gt 0 ]]; do
8 case "$1" in
9 --name) name="$2"; shift 2 ;;
10 --identity) identity="$2"; shift 2 ;;

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::block::run() {
2 local name="" identity="" type="" block_name=""
3 local ips=() subnets=() ports=() services=()
4 local quiet=false force=false
5 local reason=""
6
7 while [[ $# -gt 0 ]]; do
8 case "$1" in
9 --name) name="$2"; shift 2 ;;
10 --identity) identity="$2"; shift 2 ;;

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 function cmd::block::run() {
2 local name="" identity="" type="" block_name=""
3 local ips=() subnets=() ports=() services=()
4 local quiet=false force=false
5
6 while [[ $# -gt 0 ]]; do
7 case "$1" in
8 --name) name="$2"; shift 2 ;;
9 --identity) identity="$2"; shift 2 ;;
10 --type) type="$2"; shift 2 ;;

nuno / gistfile1.txt

0 likes
0 forks
1 files
Last active 5 months ago
1 /etc/wireguard/wgctl/commands/block.command.sh:7:function cmd::block::on_load() {
2 /etc/wireguard/wgctl/commands/block.command.sh:25:function cmd::block::help() {
3 /etc/wireguard/wgctl/commands/block.command.sh:60:function cmd::block::run() {
4 /etc/wireguard/wgctl/commands/block.command.sh:219:function cmd::block::_block_identity() {
5 /etc/wireguard/wgctl/commands/block.command.sh:254:function cmd::block::_get_endpoint() {
6 /etc/wireguard/wgctl/commands/block.command.sh:264:function cmd::block::_block_all() {
7 /etc/wireguard/wgctl/commands/unblock.command.sh:7:function cmd::unblock::on_load() {
8 /etc/wireguard/wgctl/commands/unblock.command.sh:25:function cmd::unblock::help() {
9 /etc/wireguard/wgctl/commands/unblock.command.sh:58:function cmd::unblock::run() {
10 /etc/wireguard/wgctl/commands/unblock.command.sh:190:function cmd::unblock::_unblock_identity() {
Newer Older

Powered by Opengist ⋅ Load: 109ms⋅

English
Čeština Deutsch English Español Français Magyar Italiano 日本語 Polski Português Русский Türkçe Українська 中文 繁體中文
⋅ KrilHub