Repository navigation
Conversation
computeKuboConfig(kuboConfig, reachabilityConfig, enabled) is the one place that decides the kubo edits. planKuboConfig also returns a record of what changed, which tells our entries from identical operator ones and lets disable restore the touched fields byte for byte.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 89ad2376eb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| export const LOOPBACK_ADDR_FILTER = "/ip4/127.0.0.0/ipcidr/8"; | ||
|
|
||
| export const WEBTRANSPORT_SWARM_ADDRESSES = [ | ||
| "/ip4/0.0.0.0/udp/443/quic-v1", |
There was a problem hiding this comment.
Avoid forcing Kubo to bind privileged UDP port 443
When the daemon runs as a normal Unix user, applying this transform makes Kubo fail to start with a permission error because every enable adds listeners on privileged UDP port 443. The integration test explicitly removes these listeners for the same reason (test/reachability/caddy-pebble.integration.test.ts:60-61), but production callers have no option to select an unprivileged port or omit them, so enabling reachability can take the node offline.
Useful? React with 👍 / 👎.
| const status = await readReachabilityStatus(flags["pkcOptions.dataPath"] || defaults.PKC_DATA_PATH); | ||
|
|
||
| if (!status.configured) { | ||
| this.log("Reachability is not configured. Browsers cannot reach this node. Run: bitsocial reachability setup"); |
There was a problem hiding this comment.
Stop directing users to a missing setup command
When status is run before configuration, this message tells the user to run bitsocial reachability setup, but the repository-wide command search finds only src/cli/commands/reachability/status.ts; no setup command or equivalent handler exists. Following the recovery instruction therefore produces a command-not-found error and leaves users unable to configure the feature.
Useful? React with 👍 / 👎.
reachability/config.json holds the operator's choices and refuses to load a newer version rather than drop its fields. The daemon's check results go in a separate file so they cannot overwrite a setup in progress.
…e status Caddy keeps certificates for old addresses and other CAs until they expire, so status now filters to the configured CA and current names. A damaged runtime status file reads as no checks yet, and the text output prints domain and Caddy checks.
…le tests Caddy is downloaded on first use and checked against a sha256 pinned in source. The generated Caddyfile keeps Caddy off UDP 443 and port 80. The integration test issues a certificate for 127.0.0.1 from Pebble and completes a js-libp2p handshake with kubo through Caddy.
89ad237 to
cb41e25
Compare
|
Consolidated into #208. |
Part of #198 (step 4). Based on #203, so earlier commits show here until those merge.
Summary
Caddyfile behaviour that came from running it, not from the issue:
libp2p,@libp2p/websockets,@libp2p/noise,@libp2p/yamuxand@libp2p/identifybecome direct dependencies, pinned to the versions already in the tree through pkc-js. They load lazily, only for a dial.Deviation from the issue: Caddy obtains one certificate per identifier, so IPv4 and IPv6 get two certificates rather than one covering both. Browsers can't tell the difference. It costs one extra order per renewal and
statuslists both.Evidence
After:
npm run test:cli: 55 files, 543 passed, 1 skipped.By hand, not in the suite: putting
/ip4/127.0.0.0/ipcidr/8back inSwarm.AddrFiltersmakes the dial fail, which confirms the issue's claim about the gater.The hashes of all six Caddy archives were checked against Caddy's own SHA-512 list for v2.11.7. Each CI OS downloads and verifies the hash for its own platform.
Merge Danger
Door: two-way
Blast Radius: install-size
No command calls this code yet. Five new direct dependencies are already installed transitively at the same versions, so the installed tree should not grow. This adds a Pebble download to CI, and that download depends on GitHub releases being reachable.