cqc0101/openwrt-proxy-skills / skills/dae-openwrt
dae-openwrt
Flagged在 OpenWrt、ImmortalWrt、iStoreOS 上生成、部署和排查原生 dae 配置。适用于 eBPF 接口绑定、routing/dns/group 规则、订阅导入与热重载;不接管 daed 面板配置。
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.9 KB |
| assets/templates/openwrt.dae | other | 5.3 KB |
| references/dae-rules-and-syntax.md | markdown | 6.6 KB |
| references/runtime-checks.md | markdown | 6.5 KB |
| references/troubleshooting.md | markdown | 6.2 KB |
| scripts/check_dae_syntax.py | script | 18.9 KB |
| scripts/check_path.py | script | 3.9 KB |
| scripts/diagnose_dns.sh | script | 17.1 KB |
| scripts/doctor.sh | script | 18.2 KB |
| scripts/node_link.py | script | 2.0 KB |
| scripts/parse_node.py | script | 26.5 KB |
| scripts/probe.sh | script | 22.1 KB |
| scripts/setup_openwrt_network.sh | script | 24.0 KB |
| scripts/sub_parser.py | script | 75.4 KB |
| scripts/sub_to_dae.py | script | 15.9 KB |
scripts/node_link.py
View on GitHub#!/usr/bin/env python3
"""Update query parameters without moving them into a node name. Input/output are files."""
import argparse
import os
from pathlib import Path
import re
from urllib.parse import parse_qsl, urlencode, urlsplit, urlunsplit
def update_query(link, updates):
if any(ord(c) < 32 or ord(c) == 127 for c in link):
raise ValueError("control characters are not allowed")
u = urlsplit(link)
if u.scheme not in ("vless", "trojan", "hysteria2", "hy2", "tuic") or not u.hostname:
raise ValueError("unsupported or invalid node URL")
if u.port is not None and not 1 <= u.port <= 65535:
raise ValueError("invalid port")
for key, value in updates.items():
if not re.fullmatch(r"[A-Za-z0-9_-]+", key) or any(ord(c) < 32 or ord(c) == 127 for c in value):
raise ValueError("invalid query parameter")
pairs = [(k, v) for k, v in parse_qsl(u.query, keep_blank_values=True) if k not in updates]
pairs.extend(updates.items())
return urlunsplit((u.scheme, u.netloc, u.path, urlencode(pairs), u.fragment))
def main():
p = argparse.ArgumentParser(description=__doc__)
p.add_argument("input", type=Path)
p.add_argument("output", type=Path)
p.add_argument("--set", action="append", required=True, metavar="KEY=VALUE")
a = p.parse_args()
try:
updates = {}
for item in a.set:
key, sep, value = item.partition("=")
if not sep:
raise ValueError("expected KEY=VALUE")
updates[key] = value
result = update_query(a.input.read_text(encoding="utf-8").strip(), updates)
# Never overwrite a source, symlink, or pre-existing output; no URI in stdout/errors.
fd = os.open(str(a.output), os.O_WRONLY | os.O_CREAT | os.O_EXCL, 0o600)
with os.fdopen(fd, "w", encoding="utf-8", newline="\n") as f:
f.write(result + "\n")
except (OSError, ValueError):
p.exit(2, "Cannot update node URL; check input, parameters and output path.\n")
if __name__ == "__main__":
main()
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |