src/Request.php
public function setProxyAuthentication($username, $password, $method = CURLAUTH_BASIC)
    {
        if (array_key_exists(CURLOPT_HTTPPROXYTUNNEL, $this->curlOptions)) {
            $this->curlOptions[ CURLOPT_PROXYUSERPWD ] = "$username:$password";
        }

        $this->curlOptions[ CURLOPT_PROXYAUTH ] = CURLAUTH_BASIC;

        if (in_array($method, [
            CURLAUTH_BASIC,
            CURLAUTH_NTLM,
        ])) {
            $this->curlOptions[ CURLOPT_PROXYAUTH ] = $method;
        }

        return $this;
    }
public function setProxyAuthentication($username, $password, $method = CURLAUTH_BASIC)
    {
        if (array_key_exists(CURLOPT_HTTPPROXYTUNNEL, $this->curlOptions)) {
            $this->curlOptions[ CURLOPT_PROXYUSERPWD ] = "$username:$password";
        }

        $this->curlOptions[ CURLOPT_PROXYAUTH ] = CURLAUTH_BASIC;

        if (in_array($method, [
            CURLAUTH_BASIC,
            CURLAUTH_NTLM,
        ])) {
            $this->curlOptions[ CURLOPT_PROXYAUTH ] = $method;
        }

        return $this;
    }
Request::setProxyAuthentication

Sets the username and password to use for the connection to the proxy.

@param string     $username The HTTP Proxy authentication username.
@param string     $password The HTTP Proxy authentication password.
@param int|string $method   The HTTP Proxy authentication method. The options are:
1. CURLAUTH_BASIC
2. CURLAUTH_NTLM

@return static