Commit Graph
2 Commits
Author SHA1 Message Date
tke a23fa00dfb feat(proxy): apt proxy audit + doctor mode; reinstall-from-clone = update
apt-audit.js scans EVERY file in apt.conf.d for Acquire::*::Proxy, classifying:
- creds: embedded userinfo (plaintext leak + stale-cred hammering risk)
- overrides: sorts after 80proxy-bridge so apt last-wins REPLACES the bridge URL
- external: points at a non-bridge proxy
Installer Legacy section alerts + fixes (backup kept: *.disabled-by-proxy-bridge).
New 'install.js doctor [--fix]': audits apt, bashrc, snap, service drop-ins,
service state, keyring presence; exit 1 when issues found.

Update semantics: deploy writes .installed-from (git commit + file hashes);
runtime JSONs are never created if present and never overwritten; tests prove
3 consecutive installs leave runtime state byte-identical. Downgrade protection
comes from the visible marker + diff reporting, never silent clobbering.

Tests: 6 audit + 2 installer (update-semantics, doctor) — suite now 23/23.
2026-09-23 16:07:53 +02:00
tke 3f9be30784 feat(proxy): idempotent interactive installer; retire credential-embedding legacy scripts
install.js (node, replaces install_proxy.sh + setup.js + update_*.sh + get_proxy.sh):
- sections: preflight, deploy, config import/create, credentials, legacy migration,
  systemd unit, system-wide proxy (bashrc/apt/docker/snapd/ollama), verify
- idempotent: re-run converges; tests prove a second non-interactive run shows
  zero CHANGED
- imports existing /opt configs non-destructively; asks before changing
- credentials: prompted when keyring entry missing; verified with ONE CONNECT
  round-trip before storing; 407 responses are never stored (anti-lockout);
  unreachable upstream stores nothing
- legacy migration: removes bashrc #PROXY_A93JK2 line + plaintext-cred files,
  rewrites cred-embedding apt/snap/service drop-ins to the bridge URL
- flags: --dry-run, --non-interactive (fails listing missing info), --no-systemd

Tests cover dry-run-no-op, idempotency, verify-store-on-200, refuse-on-407.
2026-09-23 15:14:19 +02:00