yt-dlp-gui/deploy/ct209/nftables-ytg-isolate.conf
Claude Code d3715ea882 Переезд на US2-7 (CT 209): AGENTS.md, образцы юнита и nft, ссылка «Исходный код» из links.json
- AGENTS.md: новый дом (CT 209 ytdlp), прямой выход с адреса US2-7 без второго IP и туннелей,
  изоляция nft от соседей, версия yt-dlp и deno, отсутствие cookies; прежний текст про pve — архив.
- deploy/ct209: образцы ytdlp-gui.service и nftables (адреса — заглушки).
- app.py: рабочее имя git читается из опубликованного снимка zapret-links (links.json) по HTTP с кэшем
  на 10 минут и проверкой имени; пакета zapret_links с pve (/home/codex-pve/zapret-links) больше нет.
- tests/test_source_link.py: тесты под новое чтение (кэш, чужое имя, недоступный снимок).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-07 23:16:08 +00:00

18 lines
791 B
Text

#!/usr/sbin/nft -f
flush ruleset
table inet ytg_isolate {
chain output {
type filter hook output priority 0; policy accept;
# replies to the front nginx (CT 204) and to local clients
ct state established,related accept
# everything the service (and its yt-dlp / ffmpeg children) starts toward internal ranges is dropped
meta skuid ytgrab ip daddr { 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 169.254.0.0/16, 100.64.0.0/10 } ct state new drop
meta skuid ytgrab ip6 daddr { fc00::/7, fe80::/10 } ct state new drop
}
chain input {
type filter hook input priority 0; policy accept;
# the app answers only the front nginx in CT 204 (<FRONT_NGINX_ADDRESS>) and the local machine
tcp dport 8090 ip saddr != { <FRONT_NGINX_ADDRESS>, 127.0.0.1 } drop
}
}