ApacheBench Has a Separate Option for the Proxy Login
Route an ApacheBench HTTP request with -X and keep the proxy’s Basic credentials separate from the website’s account.
For an ApacheBench request through an HTTP proxy, put the intermediary after uppercase -X and leave the website in the final URL:
ab -n 1 -c 1 -X proxy.example:8080 http://origin.example/status
For a public endpoint, take the host and port from the HTTP proxy list. This is a single-request routing example. One response is not a useful performance benchmark.
If the proxy requires Basic authentication, ApacheBench supplies a different option from the website login:
| Option | Recipient |
|---|---|
| -P user:password | The intermediary |
| -A user:password | The destination server |
These options send the supplied credentials without waiting for a challenge. Use the intended account for each recipient and consider command-history and process-argument exposure when supplying real passwords.
The endpoint syntax is host:port, rather than curl’s broader proxy-URL interface. In particular, uppercase -X here is not curl’s custom-method option.
When comparing routes, retain response codes and failures alongside timing. A quick proxy rejection is not a fast response from the intended application.