[repo] NixOS and docs: ianitor-caddy-guard with caddy-fallback, caddy-revert after every control stop, admin socket only for control, Caddy trial deadline in the engine-switch VM test, trusted proxies stay off beside Caddy
This commit is contained in:
@@ -32,6 +32,14 @@ visitor ── Caddy :443 (as today) ── https://127.0.0.1:18443 Ianitor edg
|
||||
- Caddy keeps the public side for the two names and hands them to Ianitor over TLS; Ianitor
|
||||
serves them with Domi certificates, which Caddy checks against the Domi root (a public file).
|
||||
- Every other host is untouched. Rollback: revert the patch and switch (below).
|
||||
- Visitor addresses: Ianitor sees every visit coming from 127.0.0.1 (Caddy), so the share-link
|
||||
throttle counts all visitors together and the visit log shows 127.0.0.0. The option
|
||||
`services.ianitor.edge.trustedProxies = [ "127.0.0.1" ]` would make edge believe Caddy's
|
||||
`X-Forwarded-For` instead, but edge listens on a TCP port on loopback that **any local user or
|
||||
process can reach**, and any of them could then claim any address. It stays **off** for the
|
||||
trial (the two hosts have no share links and no visit log); turn it on only on a machine where
|
||||
every local account is trusted. (A Unix-socket listener for edge, which Caddy alone could reach,
|
||||
is the proper fix; not built yet.)
|
||||
|
||||
## The patch
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ new file mode 100644
|
||||
index 0000000..cd23016
|
||||
--- /dev/null
|
||||
+++ b/hyperv-infra/modules/ianitor.nix
|
||||
@@ -0,0 +1,51 @@
|
||||
@@ -0,0 +1,49 @@
|
||||
+{ config, lib, inputs, ... }:
|
||||
+
|
||||
+# Ianitor beside Caddy (Ianitor ROADMAP §1.12, Phase 3): two low-risk hosts, flowers and esp32,
|
||||
@@ -100,8 +100,6 @@ index 0000000..cd23016
|
||||
+ httpListen = "127.0.0.1:18080";
|
||||
+ httpsListen = "127.0.0.1:18443";
|
||||
+ openFirewall = false;
|
||||
+ # Caddy in front, on loopback: its X-Forwarded-For names the visitor (throttle, logs).
|
||||
+ trustedProxies = [ "127.0.0.1" ];
|
||||
+ };
|
||||
+ control.listen = "127.0.0.1:7878";
|
||||
+ shareLinkKeyFile = config.sops.secrets."ianitor/share-link-key".path;
|
||||
|
||||
Reference in New Issue
Block a user