Все Новый

user:thomas фрагментов создано пользователем

title:mygist фрагментов с указанным заголовком

description:sync gists with given description

filename:myfile.txt фрагменты содержащие файлы с указанным именем

extension:yml фрагменты, содержащие файлы с указанным расширением

language:go фрагменты, содержащие файлы с указанным языком

topic:homelab фрагменты с заданной темой

all:systemctl search all fields

Регистрация

Войти

Все Новый Регистрация Войти

nuno

Зарегистрирован 2 months ago

Свежие сверху по дате создания
Свежие снизу по дате создания
Свежие сверху по дате обновления
Свежие снизу по дате обновления
Все фрагменты 570

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::group::on_load() {
8 flag::register --name
9 flag::register --desc
10 flag::register --peer

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 #!/usr/bin/env bash
2
3 function cmd::net::on_load() {
4 flag::register --name
5 flag::register --ip
6 flag::register --port
7 flag::register --desc
8 flag::register --tag
9 flag::register --detailed
10 flag::register --force

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 sed -n '295,315p' /etc/wireguard/wgctl/modules/identity.module.sh
2 result=$(json::get_nested "$id_file" "rule_flags" "$flag" 2>/dev/null) || true
3
4 if [[ -n "$result" ]]; then
5 echo "$result"
6 return 0
7 fi
8
9 # Fall back to policy value
10 local policy_name

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 ────────────────────────────────────────────────
2 Inspect: phone-helena
3 ────────────────────────────────────────────────
4
5 ── Client ──────────────────────────────────────
6
7 Name: phone-helena
8 IP: 10.1.3.4
9 Type: phone
10 Rule: user ↳ (no-proxmox, dns-restricted)

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 grep -rn "printf.*%-.*s.*%-.*s" /etc/wireguard/wgctl/commands/ | grep -v "\.module\." | grep -v "table"~
2 /etc/wireguard/wgctl/commands/net.command.sh:99: printf "\n %-20s %-16s %-6s %s\n" "NAME" "IP" "PORTS" "DESCRIPTION"
3 /etc/wireguard/wgctl/commands/net.command.sh:117: printf " %-20s %-16s %-6s %s%b\n" \
4 /etc/wireguard/wgctl/commands/list.command.sh:546: printf " %-28s %-15s %-13s %-12s %-12s %s %s\n" \
5 /etc/wireguard/wgctl/commands/list.command.sh:550: printf " %-28s %-15s %-13s %-12s %s %s\n" \
6 /etc/wireguard/wgctl/commands/hosts.command.sh:165: printf "\n %-6s %-18s %-16s %-30s %s\n" \
7 /etc/wireguard/wgctl/commands/hosts.command.sh:171: printf " %-6s %-18s %-16s %-30s %s\n" \
8 /etc/wireguard/wgctl/commands/audit.command.sh:109: test::pass "$(printf "%-28s rule=%-15s blocked (no fw rules)" \
9 /etc/wireguard/wgctl/commands/audit.command.sh:112: test::warn "$(printf "%-28s rule=%-15s blocked but has %s fw rules" \
10 /etc/wireguard/wgctl/commands/audit.command.sh:135: test::pass "$(printf "%-28s rule=%-15s fw: %s/%s" \

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 #!/usr/bin/env bash
2
3 # ============================================
4 # Lifecycle
5 # ============================================
6
7 function cmd::watch::on_load() {
8 flag::register --type
9 flag::register --name
10 flag::register --peers

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 root@wireguard:/etc/wireguard/wgctl# wgctl hosts add --ip 148.69.46.73 --name helena-wan --desc "Helena WAN" --tags isp,wan,helena
2 Traceback (most recent call last):
3 File "/etc/wireguard/wgctl/core/json_helper.py", line 2949, in <module>
4 commands[cmd](args)
5 File "/etc/wireguard/wgctl/core/json_helper.py", line 2929, in <lambda>
6 'hosts_add': lambda args: hosts_add(args[0], args[1], args[2], args[3],
7 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8 File "/etc/wireguard/wgctl/core/json_helper.py", line 2747, in hosts_add
9 _hosts_write(file, data)
10 File "/etc/wireguard/wgctl/core/json_helper.py", line 2674, in _hosts_write

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 #!/usr/bin/env bash
2
3 function cmd::net::on_load() {
4 flag::register --name
5 flag::register --ip
6 flag::register --port
7 flag::register --desc
8 flag::register --tag
9 flag::register --detailed
10 flag::register --force

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 root@wireguard:/etc/wireguard/wgctl# wgctl net help
2 Usage: wgctl net <subcommand> [options]
3
4 Manage named network services for use with block/allow rules.
5 Services map names to IPs and ports, making rules more readable.
6
7 Subcommands:
8 list List all services
9 show --name <name> Show service details
10 add --name <name> --ip <ip> Add a service

nuno / gistfile1.txt

0 лайк(-ов)
0 форк(-ов)
1 файл(-ов)
Последняя активность 1 month ago
1 #!/usr/bin/env bash
2 # ui/peer.module.sh — rendering for peer list data
3 # Both compact (tableless) and table layouts kept for future config switching.
4
5 _LIST_STYLE="${LIST_STYLE:-compact}"
6
7 function ui::peer::list_style() {
8 echo "$_LIST_STYLE"
9 }
Новее Позже

Работает на Opengist ⋅ Load: 138ms⋅

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