grpcurl icon indicating copy to clipboard operation
grpcurl copied to clipboard

Add support for abstract unix sockets

Open hq6 opened this issue 4 years ago • 1 comments
trafficstars

Recent versions of curl are able to send requests to abstract unix sockets curl --abstract-unix-socket egress.sock ....

This is very useful for talking to Envoys that are configured to use such sockets.

grpcurl already supports Unix domain sockets, but it would be nice if it could also support abstract unix sockets. I'm not sure if it's significantly more work to also support abstract sockets, but I'd be interested in making a PR for this if such a PR would be accepted.

hq6 avatar Sep 20 '21 09:09 hq6

@hq6, I think this is already supported, so perhaps this only requires a doc change.

With normal domain sockets, what would normally be "host:port" for the server is instead the path to the domain socket. But it looks like you should be able to do "@named-socket" for abstract sockets (e.g. instead of a path, use an at-sign, "@", followed by the abstract socket's name).

Can you try that and let me know if it works for you?

jhump avatar Sep 22 '21 12:09 jhump

I think I did try this and forgot to respond to this issue. Yes, I can confirm that this works.

hq6 avatar Nov 15 '22 22:11 hq6