curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. 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 himself.

Support socks proxy via unix domain socket

From: Balakrishnan Balasubramanian via curl-users <>
Date: Tue, 16 Mar 2021 22:02:56 -0400

Curl supports --unix-socket option, but this assumes the socket is a http proxy.
Usecase: When docker containers need to access tor, it is easy to bind the tor's unix socket to the container's filesystem instead of messing with networking.
Tor supports the following configuration to allow applications to connect to it:

    SOCKSPort unix:/path/to/socks5.socket WorldWritable

Suggested command line:

    ❯ curl --proxy socks5://unix:/path/to/socks5.socket
    curl: (6) Could not resolve host: unix

similarly setting the ALL_PROXY environment variable to the above string could enable the proxy.


Received on 2021-03-17