curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Non Buffered Send & Receive

From: Naitik Shah via curl-users <curl-users_at_lists.haxx.se>
Date: Fri, 21 Jun 2024 17:48:15 +0400

Hi,

I've found some old threads around this, but there didn't seem to be any
conclusion around those. I'm trying to use curl as a ProxyCommand for ssh,
and hook up stdin/stdout to HTTP2 streams. Here's my command:

    curl \
      --silent \
      --no-buffer \
      --http2-prior-knowledge \
      --header "X-Caddy-SSH: 1" \
      --data-binary _at_/dev/stdin \
      https://myserver.com

It seems like there is buffering on the input side, and I'm wondering if
there are any flags that would allow for disabling said buffering. The
request doesn't get initiated until stdin has some data is my current guess.

For more context, here's the server side Caddy module:

https://github.com/daaku/caddy-ssh


It includes a CLI tool that works as a ProxyCommand, but being able to use
curl would be a nice benefit in general, and also specifically helpful for
environments where I cannot put a custom binary (Blink shell on iOS is my
current target use case). Here's the CLI tool:

https://github.com/daaku/caddy-ssh/blob/main/cmd/caddy-ssh/main.go


Best,

-Naitik


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-06-21