Repository navigation
wp http-proxy check now shows the proxy it uses for the URL, or why it uses none, and names any proxy environment variable that cURL reads for the request. It prints the size of the response body. Add --body to print the body.
wp http-proxy status now says why the proxy is off. An http-proxy value that is not a block, such as a bare URL, now prints a warning.
The README now covers installing behind a proxy or without wp package install, updating and uninstalling, proxy login methods, proxies that inspect HTTPS, networks without public DNS, and troubleshooting. The package is now on Packagist. To report a security issue privately, see SECURITY.md.
Upgrade notes:
checkno longer prints the response body by default. Usewp http-proxy check <url> --bodyfor the previous output.statusadds the reason afterHTTP proxy: disabled, such asHTTP proxy: disabled (no http-proxy configuration).
Install:
wp package install ekamran/wp-cli-http-proxy-command:@stable
Updating from an earlier version with WP-CLI 2.12: wp package update keeps the installed release. Run the install command above again to move to v0.1.3.
Tested with WP-CLI 2.12.0 on PHP 7.2 and PHP 8.4, and WP-CLI nightly on PHP 8.5. Also tested end to end on the official wordpress:cli-php8.4 image, with WP-CLI 2.12.0 and nightly, through a Squid proxy that was the only way out of the network.