Nicolas Martyanoff on Nostr: [1/2] Support for connection upgrades (e.g. WebSockets) in the Boulevard reverse ...
[1/2] Support for connection upgrades (e.g. WebSockets) in the Boulevard reverse proxy took forever to land, but it's here!
I had to replace http.Transport (it doesn't support hijacking), and spent way too much time debugging to finally realize that the second argument to the hijack function is not juste a reader on a buffer, it's layered upon the connection itself. Really not obvious.
Published at
2024-11-17 22:29:25Event JSON
{
"id": "30a8e2f45e3d3a243179f6de281a6090d02df55d6e4bfd12ade1f91f9d1219f8",
"pubkey": "6d91e7b056ab18986298e04a8b278a5e070a726487fd30a599427c79db9070e9",
"created_at": 1731882565,
"kind": 1,
"tags": [
[
"imeta",
"url https://cdn.fosstodon.org/media_attachments/files/113/500/655/470/124/668/original/c3ae57c5db51c1af.png",
"m image/png",
"dim 1281x907",
"blurhash U65}U3t8j]j[}?WVWVay~9j[WVay~9a#aza}"
],
[
"proxy",
"https://fosstodon.org/users/galdor/statuses/113500655822585081",
"activitypub"
]
],
"content": "[1/2] Support for connection upgrades (e.g. WebSockets) in the Boulevard reverse proxy took forever to land, but it's here!\n\nI had to replace http.Transport (it doesn't support hijacking), and spent way too much time debugging to finally realize that the second argument to the hijack function is not juste a reader on a buffer, it's layered upon the connection itself. Really not obvious.\n\nhttps://cdn.fosstodon.org/media_attachments/files/113/500/655/470/124/668/original/c3ae57c5db51c1af.png",
"sig": "6a8fe0c38de5dcd1fa1430c6252213a6fba3ff1ed889497ef90b0a067825c393b027731f37d712b0a21d9a4202a802f012f544497d5422bbb52c6482e58b0b1b"
}