- install.sh: install from a checkout or via curl|bash, tag-pinned download, --skill-only / --uninstall / --dry-run / --yes, ends with verify --deep - set-exit: follow a rotating exit, probe first, rewrite policy only when the proxy serves the candidate address, then re-verify - LOG_REFUSALS=1: refusals go to journald under claude-egress-guard - AGENTS.md, llms.txt, Makefile: machine entry points and make check - README/README.zh-CN rewritten for two audiences (agents, humans) with a real verify sample, compatibility table, per-start cost, rotation, logging and an explicit out-of-scope list (npx, second installs, containers, root, SOCKS) - default allow list is 127.0.0.0/8 so systemd-resolved keeps working - 11 new self-tests, 42 total
3.6 KiB
3.6 KiB
Changelog
All notable changes to this project are documented here. The format follows Keep a Changelog; versions use semantic versioning.
[1.1.0] - 2026-10-27
Added
install.sh: one-command installer, usable from a checkout or piped fromraw.githubusercontent.com. Downloads a tag-pinned release when it is not run from a checkout, prints the plan, backs up replaced files, then runsverify --deep;--skill-only,--uninstall,--dry-run,--yes,--ref.claude-egress-guard set-exit --ip ADDR [--country CC]: follows a rotating residential exit. Probes the proxy with the candidate address, refuses if the proxy does not serve it, rewrites the policy atomically (mode 0600) and re-verifies.LOG_REFUSALS=1: refusals are written to journald under theclaude-egress-guardtag, so "did it ever refuse?" is a query.AGENTS.md,llms.txtand aMakefile(make check), so agent runners and contributors have machine entry points.- README restructured around two audiences: agents installing the skill, and
humans running one command. Adds a real
verify --deepsample, a compatibility table, per-start cost, refusal logging, exit rotation and an explicit "what it does not do" section (npx, second installs, containers, root, SOCKS-only proxies). - Eleven new self-tests (42 total): set-exit accept/refuse/restore, refusal logging,
and the installer's
--help,--skill-onlyand missing-argument behaviour.
Changed
- The default allow list uses
127.0.0.0/8instead of127.0.0.1/32, sosystemd-resolvedon127.0.0.53keeps working inside the jail. verify --deepno longer aborts on unset proxy variables when the config is missing; it reports the failed layer.- The real binary is checked before the diagnostic passthrough, so a broken pin
reports the actual reason instead of a shell
command not found.
[1.0.0] - 2026-10-27
Added
- Fail-closed gate for Claude Code: exit-address and country check before every start, proxy environment injection, refusal with exit code 77 when anything is missing or mismatched.
- Binary-level coverage: the gate is installed as both
/usr/local/bin/claudeand/usr/bin/claude, with the real binary pinned at/opt/claude-real/claude, so Python, cron, systemd and absolute-path callers are covered. - Optional kernel-level jail (
STRICT_NET, default on): the whole Claude process tree runs in a transient systemd scope withIPAddressDeny=anyand an explicit allow list (loopback, proxy upstream, DNS resolvers, operator-supplied CIDRs). - Self-heal after package updates, which re-create
/usr/bin/claudeas a symlink. - Installer with
--dry-run, timestamped backups of everything it replaces, and an allow list that automatically includes loopback and the host's IPv4 DNS resolvers. verify(static + live checks),verify --deep(proves the jail blocks direct egress and still allows the proxy),status(credentials masked),drill(stops and restarts the proxy unit, proves refusal and recovery),uninstall(restores from backup),show(prints the gate for audit).- Agent skill (
skills/claude-egress-guard) with authorization tiers, an operator interview limited to four facts, an evidence record template and a troubleshooting table. - Sandboxed self-test suite (31 assertions) using fake
curl,idandsystemd-run; runs without root or network. - Repository guard rails: shellcheck in CI, a leak scanner that rejects credentials, personal identifiers and non-documentation IP addresses, and an editor/git configuration that keeps line endings stable.