Skip to content

Feature: SSH style --proxycommand #4941

@fasmide

Description

@fasmide

I did this

man curl :)

I expected the following

I expected to find a -pc, --proxycommand which, ssh ProxyCommand style, would allow the user to make curl run a command and use its stdio to make requests and not do any network connection by itself.

That way, it would be really easy to use ssh as a means of transport to another network, e.g.

curl --proxycommand 'ssh pi@raspberrypi.local -W 10.1.1.75 80' \ http://some/otherwise/unavailable/service.php 

Today, bash scripts have to run, maintain and close an ssh session prior to running curl, which in my opinion is rather cumbersome

I do realize its often possible to turn the situation around, by SSH'ing to the remote host and, if available, run curl on the remote - while being a good workaround in a lot of cases there is always this one time where you have multiple -F parameters (so you cannot really use @- for POST input) or just don't want to expose auth details with the remote.

I'm just the average curl user and as such haven't read the documentation thoroughly - but I have a feeling the Opensocket and Closecosket options can be used to achieve this

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions