public function withProxy($proxy, $port = '', $type = '', $username = '', $password = '')
    {
        $this->withOption( 'PROXY', $proxy );

        if( !empty($port) ) {
            $this->withOption( 'PROXYPORT', $port );
        }

        if( !empty($type) ) {
            $this->withOption( 'PROXYTYPE', $type );
        }

        if( !empty($username) && !empty($password) ) {
            $this->withOption( 'PROXYUSERPWD', $username .':'. $password );
        }

        return $this;
    }
public function withProxy($proxy, $port = '', $type = '', $username = '', $password = '')
    {
        $this->withOption( 'PROXY', $proxy );

        if( !empty($port) ) {
            $this->withOption( 'PROXYPORT', $port );
        }

        if( !empty($type) ) {
            $this->withOption( 'PROXYTYPE', $type );
        }

        if( !empty($username) && !empty($password) ) {
            $this->withOption( 'PROXYUSERPWD', $username .':'. $password );
        }

        return $this;
    }
public function withProxy ( $ proxy , $ port = '' , $ type = '' , $ username = '' , $ password = '' ) { $ this -> withOption ( 'PROXY' , $ proxy ) ; if ( ! empty ( $ port ) ) { $ this -> withOption ( 'PROXYPORT' , $ port ) ; } if ( ! empty ( $ type ) ) { $ this -> withOption ( 'PROXYTYPE' , $ type ) ; } if ( ! empty ( $ username ) && ! empty ( $ password ) ) { $ this -> withOption ( 'PROXYUSERPWD' , $ username . ':' . $ password ) ; } return $ this ; }
Enable Proxy for the cURL request

@param   string $proxy       Hostname
@param   string $port        Port to be used
@param   string $type        Scheme to be used by the proxy
@param   string $username    Authentication username
@param   string $password    Authentication password
@return Builder
Enable Proxy for the cURL request