Title: mcpx: reach a daemon by identity, not by address — iroh, and the Go-binding question it forces · Issue #1967 · developing-today/code · GitHub
Open Graph Title: mcpx: reach a daemon by identity, not by address — iroh, and the Go-binding question it forces · Issue #1967 · developing-today/code
X Title: mcpx: reach a daemon by identity, not by address — iroh, and the Go-binding question it forces · Issue #1967 · developing-today/code
Description: Relocated from dezren39/darwin-nix#297 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/ni...
Open Graph Description: Relocated from dezren39/darwin-nix#297 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc...
X Description: Relocated from dezren39/darwin-nix#297 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue refe...
Opengraph URL: https://github.com/developing-today/code/issues/1967
X: @github
Domain: github.com
IPv4 address: 140.82.114.3
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"mcpx: reach a daemon by identity, not by address — iroh, and the Go-binding question it forces","articleBody":"Relocated from dezren39/nix#297 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue references inside it are historical (dezren39/nix numbering).\n\nParent: #174\n\n## Summary\n\nReaching a daemon today means reaching an *address*. `daemon.endpoint`\n(`internal/settings/registry.go:356`) takes a URL, the server listens on a unix\nsocket and a TCP port (`internal/daemon/server.go:205,220`), and #85 covers\ngetting to that port over ssh with tunnels. All of it assumes you can name a\nroute to the machine.\n\nThe thing that is actually wanted is to reach a daemon by **identity** — \"my\nlaptop's mcpx\", from a phone, from a different network, with no port forwarded,\nno public IP, no dynamic DNS and no ssh key copied anywhere. iroh does exactly\nthis: QUIC between nodes named by an ed25519 public key, hole-punched directly\nwhere possible and relayed where not, end-to-end encrypted either way.\n\nThe crux is not whether that is desirable. It is that **iroh is Rust and mcpx is\nGo**, and this issue exists mostly to force that question into the open before\nanyone starts, because the honest answer may be that a Go-native transport wins\non merit.\n\n## Original notes\n\n> add another for iroh support\n>\n> you can imagine what i might want build out your dreams\n\n## Current state\n\n**Two listeners, both address-shaped.** `Server.Start` binds a unix socket at\n`s.paths.Socket` and a TCP listener on a host/port\n(`internal/daemon/server.go:205,220`). `daemon.endpoint` lets a client point at\na remote daemon, with a documented fallback to a local one when the remote is\nunreachable (`internal/settings/registry.go:356-364`).\n\n**Remote reach is already a theme, already scoped to ssh.** #85 is \"remote\naccess over ssh -- TUI, RPC, reverse tunnels, and why not a built-in ssh\nserver\", under the #174 surfaces tracker. ssh solves authentication and\nencryption and solves routing *only if* you can already reach the host. The\nlaptop-behind-NAT case is precisely where it does not help, and that is the case\nworth solving.\n\n**Content addressing is also already a theme.** #187 asks for \"one\ncontent-addressed cache for prepared dependencies, import graphs and flake\nresolution\". Artifacts shipped in #57. Both are BLAKE3-shaped problems that\n`iroh-blobs` already solves as a library, with verified streaming and resumable\ntransfer.\n\n**No Go implementation of iroh exists.** iroh is a Rust project (n0-computer).\n`iroh-ffi` provides C bindings. There is no maintained Go port and writing one\nis not a weekend.\n\n## Approaches\n\n### Approach A — least recommended: cgo against `iroh-ffi`\n\nLink the Rust library into the Go binary through its C FFI.\n\nThis gets real iroh with its real guarantees and poisons the build. mcpx is\ncurrently a pure-Go binary that `nix build` cross-compiles without ceremony;\ncgo plus a Rust toolchain means per-platform native artefacts, a much larger\n`package.nix`, cross-compilation that stops being free, and a release matrix\n(#158) that multiplies. It also drags Rust's async runtime into a Go process,\nwhich is a category of debugging nobody in this repository has signed up for.\nThe capability is not worth that unless everything else has failed.\n\n### Approach B — middle: iroh as a sidecar, tunnelling to the existing socket\n\nRun an iroh node as a separate process. It accepts an incoming connection by\n`NodeId`, and proxies the stream to the daemon's existing unix socket. mcpx\nlearns one new thing: how to supervise and address a sidecar.\n\nHonest and incremental. The daemon needs no new transport at all — it already\nspeaks HTTP over a unix socket, and the sidecar is a tunnel endpoint. It keeps\nGo pure, it is testable, and it can be an optional component people install\nrather than something in every binary.\n\nIts costs are distribution and truth-in-advertising: a second binary from a\nsecond toolchain in the release pipeline, and \"mcpx supports iroh\" meaning \"mcpx\nsupports a thing you install next to mcpx\".\n\n### Approach C — recommended: write down the requirement, then pick the transport on Go-native merit\n\nThe property wanted is a short list, and iroh is one implementation of it:\n\n1. a daemon reachable by stable cryptographic identity, not by address\n2. NAT traversal without port forwarding, with a relay fallback\n3. end-to-end encryption and mutual authentication from that identity\n\nWho may then do what is a separate question, tracked separately (#298/#253),\nand explicitly **not** a dependency of this issue.\n\nStated that way, the Go ecosystem has candidates that do not cost a Rust\ntoolchain, and they should be evaluated *against* iroh rather than assumed\ninferior:\n\n- **`tsnet`** (Tailscale) embeds a full Tailscale node **in a Go program**. It\n gives 1–3 outright, with mature hole-punching, a working relay network\n (DERP), identity tied to an existing account, and ACLs that are a real answer\n to 4. It is pure Go and already in this project's orbit — #115 proposes a\n Tailscale *server*, which means the dependency may be arriving anyway. The\n cost is a dependency on Tailscale's coordination service unless self-hosting\n Headscale, which is a genuine centralisation objection iroh does not have.\n- **`go-libp2p`** gives 1–3 with no central coordinator, pure Go, at the price\n of being a large dependency with sharp operational edges around relays and\n peer discovery.\n- **iroh**, via B, if the decentralisation and the blob story outweigh the\n sidecar.\n\n**Where iroh wins on something the others do not have:** `iroh-blobs` is\nBLAKE3-verified, resumable, content-addressed transfer, and #187 is already\nasking for a content-addressed cache. If prepared dependencies, import graphs\nand artefacts became iroh blobs, then \"fetch this script's dependency closure\nfrom whichever of my machines has it\" is the same mechanism as \"reach my\ndaemon\", and that is a genuinely better story than tsnet or libp2p offer. If\nthat convergence is the goal, iroh's case is much stronger and B becomes worth\nits cost.\n\nSo: do not start with a transport. Start with a short research issue that\nanswers \"which of tsnet, libp2p and iroh-as-sidecar meets 1–4 for a pure-Go\nbinary, and does #187 want iroh-blobs badly enough to pay for a sidecar?\" Then\nimplement the winner behind an interface the daemon can hold more than one of,\nbecause the authorisation work in 4 is required regardless of who wins and is\nprobably the larger half of the job.\n\n## Open questions\n\n- Does the daemon hold more than one transport at once, or is it one at a time\n by configuration? Holding several is friendlier and multiplies the surface\n each has to be correct on.\n- Does the TUI (#85's reverse-tunnel motivation) work acceptably over a relayed\n connection, or does the latency make it unpleasant precisely when hole\n punching fails?\n- Is the real requirement \"reach my daemon\" or \"reach my daemon *from a phone*\"?\n If a browser is in the picture at all, none of iroh, tsnet or libp2p is\n directly reachable from a web page, and the answer is a hosted relay, which is\n a different project.\n- Does `daemon.endpoint` grow a scheme (`iroh://\u003cnodeid>`, `ts://\u003chost>`), or\n does identity-based reach get its own setting? A scheme keeps one setting and\n one mental model.\n- If a sidecar is acceptable here, is it acceptable for the Roc platform host\n too? Two issues wanting a Rust artefact is a different decision from one.\n\n## Ease · Impact · Related\n\n**Ease:** S for the research comparison; M for a sidecar tunnel (B); L–XL for\ncgo (A). **Impact:** high — \"reach your own daemon from anywhere without\nconfiguring a network\" is the difference between mcpx as a local tool and mcpx\nas personal infrastructure.\n\n**Depends on / related:** #85 (remote access over ssh — the incumbent answer,\nand this issue is the case ssh cannot reach), #174 (parent tracker: surfaces),\n#187 (content-addressed cache — the strongest argument for iroh specifically,\nvia `iroh-blobs`), #115 (proposes a Tailscale server; if that lands, `tsnet` is\nalready a dependency and Approach C's calculus changes), #158 (release\nartefacts, which a sidecar multiplies), #84 (embedding and the C ABI — the same\ncgo question from the other direction), #113 (the operation surface where a\n\"who may call this\" policy would be administered). Authorisation is tracked\nseparately in #253/#298/#300 and is **not** a dependency of this issue.\n\n## Acceptance criteria\n\n- A written comparison of iroh-from-Go options (bindings, sidecar, protocol reimplementation) against a Go-native identity transport, with a recommendation — the Go-binding question is answered, not deferred.\n- If a transport is built: a client reaches a daemon by node identity from a different network with no port forwarding, no public IP, and no ssh key copying, authenticated by the identity key.\n- Address-based endpoints (unix socket, TCP, ssh per #85) keep working unchanged.\n- Failure modes (relay-only path, identity mismatch) produce clear errors, never a silent fallback to an unauthenticated route.\n","author":{"url":"https://github.com/dezren39","@type":"Person","name":"dezren39"},"datePublished":"2026-10-28T22:48:53Z","url":"https://github.com/developing-today/code/issues/1967"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:d487b0ec-2efe-1974-d778-e266db22c640 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A842:F8B90:8E64AE:BD6F91:6B063534 |
| html-safe-nonce | 07d911d3e773aa0e72b7cd9383ee7e239014fa80e00e60a6d29a343812406ace |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBODQyOkY4QjkwOjhFNjRBRTpCRDZGOTE6NkIwNjM1MzQiLCJ2aXNpdG9yX2lkIjoiMTQ4MTM2NjY3NDk1ODg1NzUyNCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 62a9a95bf33da056eab42699658f8bec7b27632e31b63259211f0c8c551e23cf |
| hovercard-subject-tag | issue:6088933183 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/developing-today/code/1967/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cde70692e68e88bc4a80d97a0bd6da055e39ce665d4952b11f3c6cddafedeee5/developing-today/code/issues/1967 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cde70692e68e88bc4a80d97a0bd6da055e39ce665d4952b11f3c6cddafedeee5/developing-today/code/issues/1967 |
| og:image:alt | Relocated from dezren39/darwin-nix#297 on 2026-10-28 (placement audit): mcpx's single source lives in developing-today/code (pkgs/mcpx); re-home tracked at #309. Original body below; issue referenc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | dezren39 |
| hostname | github.com |
| expected-hostname | github.com |
| None | c3584c853cd39700ecff6e2cf8364295ffdb5313e571046c41cd2479270f7df0 |
| turbo-cache-control | no-preview |
| go-import | github.com/developing-today/code git https://github.com/developing-today/code.git |
| octolytics-dimension-user_id | 26439447 |
| octolytics-dimension-user_login | developing-today |
| octolytics-dimension-repository_id | 627308783 |
| octolytics-dimension-repository_nwo | developing-today/code |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 627308783 |
| octolytics-dimension-repository_network_root_nwo | developing-today/code |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9eb3bb1597d09170a5f282cd38ae376dee1a5ec1 |
| ui-target | canary-2 |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width