Skip to content

pytest: add SOCKS tests and scoring#17986

Closed
icing wants to merge 9 commits intocurl:masterfrom
icing:pytest-socks
Closed

pytest: add SOCKS tests and scoring#17986
icing wants to merge 9 commits intocurl:masterfrom
icing:pytest-socks

Conversation

@icing
Copy link
Contributor

@icing icing commented Jul 21, 2025

Configure curl with --with-test-sockd=<path to sockd> for a locally installed dante sockd server and new test_40_* will verify that down- and uploads work via SOCKS.

Invoke scorecard.py with --socks4 or --socks5 to run performance tests with SOCKS. Note that SOCKS is not supported for HTTP/3.

refs #17969

Configure curl with `--with-test-sockd=<path to sockd>` for a locally
installed dante sockd server and new `test_40_*` will verify that
down- and uploads work via SOCKS.

Invoke scorecard.py with `--socks4` or `--socks5` to run performance
tests with SOCKS. Note that SOCKS is not supported for HTTP/3.

refs curl#17969
@icing
Copy link
Contributor Author

icing commented Jul 21, 2025

Tested on my macOS dev machine with the following results:

Version: curl 8.15.1-DEV (x86_64-apple-darwin24.5.0) libcurl/8.15.1-DEV OpenSSL/3.5.0 zlib/1.2.12 brotli/1.1.0 zstd/1.5.7 libidn2/2.3.8 libpsl/0.21.5 libssh2/1.11.1 nghttp2/1.65.0 ngtcp2/1.12.0 nghttp3/1.10.1 librtmp/2.3 libgsasl/2.2.2
Features: alt-svc AsynchDNS brotli Debug gsasl GSS-API HSTS HTTP2 HTTP3 HTTPS-proxy HTTPSRR IDN IPv6 Kerberos Largefile libz NTLM PSL SPNEGO SSL SSLS-EXPORT threadsafe TLS-SRP TrackMemory UnixSockets zstd


Downloads from httpd/2.4.64
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   11 MB/s [82.6%/4MB]      317 MB/s [87.5%/8MB]           261 MB/s [96.8%/17MB]
   10MB  103 MB/s [84.8%/4MB]      774 MB/s [94.4%/11MB]          963 MB/s [99.2%/25MB]
  100MB  506 MB/s [93.7%/8MB]      976 MB/s [98.0%/11MB]         1349 MB/s [99.8%/26MB]
Downloads from httpd/2.4.64via ['--socks4', '127.0.0.1:52517']
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   10 MB/s [79.3%/3MB]      312 MB/s [83.8%/8MB]           238 MB/s [91.7%/17MB]
   10MB   98 MB/s [86.6%/4MB]      845 MB/s [93.1%/11MB]          866 MB/s [99.2%/25MB]
  100MB  542 MB/s [92.5%/8MB]     1020 MB/s [95.5%/10MB]         1240 MB/s [99.5%/26MB]
Downloads from httpd/2.4.64via ['--socks5', '127.0.0.1:52840']
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   10 MB/s [81.0%/3MB]      318 MB/s [83.3%/8MB]           234 MB/s [92.4%/17MB]
   10MB  101 MB/s [84.9%/3MB]      817 MB/s [92.8%/11MB]          920 MB/s [99.2%/24MB]
  100MB  528 MB/s [93.1%/8MB]      997 MB/s [95.6%/11MB]         1241 MB/s [99.6%/26MB]

Uploads to httpd/2.4.64
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   11 MB/s [82.4%/3MB]      306 MB/s [92.3%/8MB]           248 MB/s [97.0%/16MB]
   10MB   98 MB/s [88.3%/4MB]      725 MB/s [97.9%/10MB]          775 MB/s [99.6%/20MB]
  100MB  526 MB/s [96.3%/8MB]      937 MB/s [99.7%/10MB]         1051 MB/s [99.9%/21MB]
Uploads to httpd/2.4.64 via ['--socks4', '127.0.0.1:53329']
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   10 MB/s [81.1%/3MB]      297 MB/s [89.4%/8MB]           229 MB/s [94.0%/16MB]
   10MB  102 MB/s [83.0%/3MB]      722 MB/s [97.1%/10MB]          790 MB/s [99.5%/19MB]
  100MB  504 MB/s [96.3%/8MB]      914 MB/s [99.6%/10MB]          978 MB/s [99.8%/21MB]
Uploads to httpd/2.4.64 via ['--socks5', '127.0.0.1:53653']
   size    single [cpu/rss]      serial(50) [cpu/rss]      parallel(50x50) [cpu/rss]
    1MB   10 MB/s [81.8%/3MB]      284 MB/s [90.6%/8MB]           217 MB/s [92.3%/16MB]
   10MB  102 MB/s [85.0%/3MB]      735 MB/s [97.1%/10MB]          790 MB/s [99.3%/20MB]
  100MB  503 MB/s [96.4%/8MB]      900 MB/s [99.6%/10MB]          986 MB/s [99.8%/21MB]

@github-actions github-actions bot added the CI Continuous Integration label Jul 21, 2025
@vszakats
Copy link
Member

sockd init logic for CMake (untested):

diff --git a/docs/INSTALL-CMAKE.md b/docs/INSTALL-CMAKE.md
index 6f8a914d73..7fe8d1db2e 100644
--- a/docs/INSTALL-CMAKE.md
+++ b/docs/INSTALL-CMAKE.md
@@ -463,6 +463,7 @@ Details via CMake
 - `CADDY`:                                  Default: `caddy`
 - `HTTPD_NGHTTPX`:                          Default: `nghttpx`
 - `HTTPD`:                                  Default: `apache2`
+- `SOCKD`:                                  Default: `sockd`
 - `TEST_NGHTTPX`:                           Default: `nghttpx`
 - `VSFTPD`:                                 Default: `vsftps`
 
diff --git a/tests/http/CMakeLists.txt b/tests/http/CMakeLists.txt
index 0c2d65f17f..5e415cbe7c 100644
--- a/tests/http/CMakeLists.txt
+++ b/tests/http/CMakeLists.txt
@@ -52,5 +52,11 @@ if(NOT HTTPD_NGHTTPX)
 endif()
 mark_as_advanced(HTTPD_NGHTTPX)
 
-# Consumed variables: APXS, CADDY, HTTPD, HTTPD_NGHTTPX, VSFTPD
+find_program(SOCKD "sockd")
+if(NOT SOCKD)
+  set(SOCKD "")
+endif()
+mark_as_advanced(SOCKD)
+
+# Consumed variables: APXS, CADDY, HTTPD, HTTPD_NGHTTPX, SOCKD, VSFTPD
 configure_file("config.ini.in" "${CMAKE_CURRENT_BINARY_DIR}/config.ini" @ONLY)

@icing
Copy link
Contributor Author

icing commented Jul 21, 2025

Thanks, applied.

@bagder bagder closed this in ab5e0bf Jul 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants

Comments