Follow-up question - is there any good

Follow-up question - is there any good example of a simple websocket pass-through proxy for passing through websocket connections to a container?
16 Replies
Mike Nomitch
Mike Nomitch2mo ago
the fetch() method on Container will do it automatically so just pass in the Worker's request to it
FrozenFire
FrozenFireOP2mo ago
So just something like:
app.get("/singleton", async (c) => {
const container = getContainer(c.env.NOTARY);
return await container.fetch(c.req.raw);
});
app.get("/singleton", async (c) => {
const container = getContainer(c.env.NOTARY);
return await container.fetch(c.req.raw);
});
?
Mike Nomitch
Mike Nomitch2mo ago
ah, I think so - that's Hono?
FrozenFire
FrozenFireOP2mo ago
Yeah, I just cloned that template
Mike Nomitch
Mike Nomitch2mo ago
If c.req.raw is the same as the request argument in a standard fetch handler then yes ah yeah then should be good If not LMK
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
FrozenFire
FrozenFireOP2mo ago
Currently debugging my deploy. Unsure where the issue is right now. I have deployed it and it seems like it's up according to wrangler containers list https://cf-tlsn-notary.signup-b22.workers.dev/ Getting an error that there are no container instances
FrozenFire
FrozenFireOP2mo ago
GitHub
GitHub - TheFrozenFire/cf-tlsn-notary
Contribute to TheFrozenFire/cf-tlsn-notary development by creating an account on GitHub.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
FrozenFire
FrozenFireOP2mo ago
Application ID would be where? Is this it? b22e0cb476976048f1f91cf0ef29ca63
FrozenFire
FrozenFireOP2mo ago
https://github.com/tlsnotary/tlsn/blob/v0.1.0-alpha.10/crates/notary/server/src/server.rs This is the service I'm wrapping, btw, if it lends any useful context
GitHub
tlsn/crates/notary/server/src/server.rs at v0.1.0-alpha.10 · tlsno...
Rust implementation of the TLSNotary protocol. Contribute to tlsnotary/tlsn development by creating an account on GitHub.
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
FrozenFire
FrozenFireOP2mo ago
Not clearly seeing anything like an application ID
No description
FrozenFire
FrozenFireOP2mo ago
Seems like maybe the durable object is not able to connect to the container. I'm quite certain the port I've specified (7047) is what the container listens to by default. The container also defaults to non-TLS, so that shouldn't be the issue Error checking 7047: The container is not listening in the TCP address 10.0.0.1:7047 I'll check that it's binding 0.0.0.0 specifically How do you get the logs from a container?
➜ cf-tlsn-notary git:(main) npx wrangler containers info a0342142-c75d-4b99-863a-48fa3cc9b90a

⛅️ wrangler 4.21.0 (update available 4.21.2)
─────────────────────────────────────────────
▲ [WARNING] 🚧 `wrangler containers info` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose


╰ Container
  ...
  ● notary (2025-06-25T21:15:12.287000064Z)
      │ id: a0342142-c75d-4b99-863a-48fa3cc9b90a
      │ created_at: 2025-06-25T21:15:12.287000064Z
      │ account_id: b22e0cb476976048f1f91cf0ef29ca63
      │ name: notary
      │ version: 1
      │ scheduling_policy: default
      │ instances: 1
      │ max_instances: 1
      │ configuration:
      │ image: registry.cloudflare.com/b22e0cb476976048f1f91cf0ef29ca63/notary-server:v0.1.0-alpha.10
      │ vcpu: 0.0625
      │ memory: 256MB
      │ memory_mib: 256
      │ disk:
      │ size: 2GB
      │ size_mb: 2000
      │ network:
      │ assign_ipv6: none
      │ assign_ipv4: none
      │ mode: private
      │ command:
      │ entrypoint:
      │ runtime: firecracker
      │ observability:
      │ logs:
      │ enabled: true
      │ logging:
      │ enabled: true
      │ constraints:
      │ tier: 1
      │ durable_objects:
      │ namespace_id: 02e038dda6184e628158e7d6b4682119
      │ health:
      │ instances:
      │ healthy: 0
      │ failed: 0
      │ scheduling: 0
      │ starting: 0
      ╰ durable_objects_active: 1
➜ cf-tlsn-notary git:(main) npx wrangler containers info a0342142-c75d-4b99-863a-48fa3cc9b90a

⛅️ wrangler 4.21.0 (update available 4.21.2)
─────────────────────────────────────────────
▲ [WARNING] 🚧 `wrangler containers info` is an open-beta command. Please report any issues to https://github.com/cloudflare/workers-sdk/issues/new/choose


╰ Container
  ...
  ● notary (2025-06-25T21:15:12.287000064Z)
      │ id: a0342142-c75d-4b99-863a-48fa3cc9b90a
      │ created_at: 2025-06-25T21:15:12.287000064Z
      │ account_id: b22e0cb476976048f1f91cf0ef29ca63
      │ name: notary
      │ version: 1
      │ scheduling_policy: default
      │ instances: 1
      │ max_instances: 1
      │ configuration:
      │ image: registry.cloudflare.com/b22e0cb476976048f1f91cf0ef29ca63/notary-server:v0.1.0-alpha.10
      │ vcpu: 0.0625
      │ memory: 256MB
      │ memory_mib: 256
      │ disk:
      │ size: 2GB
      │ size_mb: 2000
      │ network:
      │ assign_ipv6: none
      │ assign_ipv4: none
      │ mode: private
      │ command:
      │ entrypoint:
      │ runtime: firecracker
      │ observability:
      │ logs:
      │ enabled: true
      │ logging:
      │ enabled: true
      │ constraints:
      │ tier: 1
      │ durable_objects:
      │ namespace_id: 02e038dda6184e628158e7d6b4682119
      │ health:
      │ instances:
      │ healthy: 0
      │ failed: 0
      │ scheduling: 0
      │ starting: 0
      ╰ durable_objects_active: 1
Unknown User
Unknown User2mo ago
Message Not Public
Sign In & Join Server To View
FrozenFire
FrozenFireOP2mo ago
Failed to connect to prover: received corrupt message of type InvalidContentType Hrmm. Seems like the connection is coming through wrong It does seem to be coming through, though Yeah, at a bit of a loss on this one. I don't know enough about how DO requests to the container is serialized

Did you find this page helpful?