-
In the vsock example, the way specified is via socat and then issuing the CONNECT request to a given port, for example 8000. How do I actually do this anywhere except for socat? 8000, the port is the request url but it's not a valid url so anything except for socat seems to reject it. Curl rejects 8000 as a uri, reqwest, hyper etc. all reject 8000 or any other port because it's an invalid url. Then how am I supposed to actually connect? The whole "port request" mechanism with CONNECT seems exceptionally inconvenient, I haven't found a way to even replicate it outside of socat which is unusable for any sort of automation. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
The only idea I currently have is to instantiate the socat command, write CONNECT to its stdin, then implement hyper's I/O traits so that they redirect the writes and reads to and from the ChildStdin/ChildStdout of the socat process. But obviously, this is a horrible idea and there must be some sort of actual way to use this feature. |
Beta Was this translation helpful? Give feedback.
-
I figured out how to do this: I basically made my own tower service where I do this when creating a connection:
I'm currently making a Even so, this is remarkably hard to do! |
Beta Was this translation helpful? Give feedback.
-
Hi @kanpov ! Glad to hear that you have found the solution. That is very similar to what we do. |
Beta Was this translation helpful? Give feedback.
I figured out how to do this: I basically made my own tower service where I do this when creating a connection:
tokio::net::UnixStream
like normalUnixStream
further so that hyper can use itI'm currently making a
hyper-sockets
crate where I'll share my implementation.Even so, this is remarkably hard to do!