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.

Supporting socks proxy via unix sockets

From: Balakrishnan Balasubramanian via curl-users <curl-users_at_lists.haxx.se>
Date: Mon, 11 Apr 2022 17:17:20 -0400

Hi Daniel,

Following up for this feature. The current pull request works with below
syntax

     curl --proxy "socks5h://unix/path/to/socks.sock""https://example.com"

     curl --socks5-hostname "unix/path/to/socks.sock""https://example.com"

The '/path/to/socks.sock' is assumed as absolute path. If the hostname
part of the url is 'unix' and the path part of the url is not empty, the
proxy is assumed to be over unix domain socket.

The other option for the syntax,

     curl --proxy "socks5h://../path/to/socks.sock

It could be a bit confusing as '..' usually refers to parent directory.
Also should the path be absolute or relative? Please confirm which
syntax you'd like to go with.

About testing, I added two tests and they are passing in my fork.
https://github.com/balki/curl/tree/socksd. I created a separate PR for
the changes just in the test server(tests/server/socksd.c). Let me know
if you'd rather have as one single PR.
https://github.com/curl/curl/pull/8687

Thanks,

Bala


-- 
Unsubscribe: https://lists.haxx.se/listinfo/curl-users
Etiquette:   https://curl.haxx.se/mail/etiquette.html
Received on 2022-04-11