PHPackages                             softonic/guzzle-proxy-middleware - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. softonic/guzzle-proxy-middleware

ActiveLibrary[HTTP &amp; Networking](/categories/http)

softonic/guzzle-proxy-middleware
================================

This package allows you to use a proxy transparently in guzzle.

0.0.4(2y ago)411.3k↓50%Apache-2.0PHPPHP &gt;=8.1

Since Jan 16Pushed 2y ago7 watchersCompare

[ Source](https://github.com/softonic/guzzle-proxy-middleware)[ Packagist](https://packagist.org/packages/softonic/guzzle-proxy-middleware)[ Docs](https://github.com/softonic/guzzle-proxy-middleware)[ RSS](/packages/softonic-guzzle-proxy-middleware/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (6)Used By (0)

Guzzle Proxy Middleware
=======================

[](#guzzle-proxy-middleware)

[![Latest Version](https://camo.githubusercontent.com/9f9f89778a8966ef9e759ec6560c6e082dbe47417f893d8d7568f1f81ca6fec4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://github.com/softonic/guzzle-proxy-middleware/releases)[![Software License](https://camo.githubusercontent.com/36cfc741510e076bec951c1421a2b1c3a5553e953fcdb378339626a5f33c1e8d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d417061636865253230322e302d626c75652e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/ebd5e4e2dbe5fc1cb3574a8a53ab8a7c58cae2a06a8bd09ae252d3eb7bc6de66/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/softonic/guzzle-proxy-middleware)[![Coverage Status](https://camo.githubusercontent.com/96a7548cac714adc8c3edcf6d816f4ac34d30167fb000137da48035501516297/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/softonic/guzzle-proxy-middleware/code-structure)[![Quality Score](https://camo.githubusercontent.com/58d2a5774bb7fa1b461327213bbbd5253de1c625534575a557c6a30e269fb896/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/softonic/guzzle-proxy-middleware)[![Total Downloads](https://camo.githubusercontent.com/626bf1e14ef08d64127f419b187e8f0a41666dc7eeed5405dbea3b4fa9e71c87/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/softonic/guzzle-proxy-middleware)[![Average time to resolve an issue](https://camo.githubusercontent.com/2c2d4acfadf919e367e2bfab6d676fb11260e456d1d74f22466872da8744b9e4/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f7265736f6c7574696f6e2f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](http://isitmaintained.com/project/softonic/guzzle-proxy-middleware "Average time to resolve an issue")[![Percentage of issues still open](https://camo.githubusercontent.com/f521dacc569d6c092c2f4ffa7b2dca1a28158408de7f2d30cb5dc8e5697213ad/687474703a2f2f697369746d61696e7461696e65642e636f6d2f62616467652f6f70656e2f736f66746f6e69632f67757a7a6c652d70726f78792d6d6964646c65776172652e7376673f7374796c653d666c61742d737175617265)](http://isitmaintained.com/project/softonic/guzzle-proxy-middleware "Percentage of issues still open")

This package provides middleware for [guzzle](https://github.com/guzzle/guzzle/) for handling proxy connection using one of the following proxy services:

- [Proxy Bonanza](https://proxybonanza.com)
- [SSL Private Proxy](https://www.sslprivateproxy.com)

Installation
------------

[](#installation)

To install, use composer:

```
composer require softonic/guzzle-proxy-middleware

```

Usage
-----

[](#usage)

To use this middleware, you need to initialize it like:

For Proxy Bonanza:

```
$proxyManager = new ProxyManager(
    new ProxyBonanza(
        new GuzzleClient(),
        $cache, // A PSR-6 item pool cache.
        '',
        ''
    )
);
```

For SSL Private Proxy:

```
$proxyManager = new ProxyManager(
    new SslPrivateProxy(
        new GuzzleClient(),
        $cache, // A PSR-6 item pool cache.
        ''
    )
);
```

And inject it to Guzzle with something like:

```
$stack = new HandlerStack();
$stack->setHandler(new CurlHandler());
$stack->push($proxyManager);
$guzzleClient = new GuzzleClient(['handler' => $stack]);
```

From now on every request sent with `$guzzleClient` will be done using a random proxy from your proxy list.

Testing
-------

[](#testing)

`softonic/guzzle-proxy-middleware` has a [PHPUnit](https://phpunit.de) test suite and a coding style compliance test suite using [PHP CS Fixer](http://cs.sensiolabs.org/).

To run the tests, run the following command from the project folder.

```
$ docker-compose run test
```

To run interactively using [PsySH](http://psysh.org/):

```
$ docker-compose run psysh
```

License
-------

[](#license)

The Apache 2.0 license. Please see [LICENSE](LICENSE) for more information.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 64.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~590 days

Total

4

Last Release

908d ago

PHP version history (2 changes)0.0.1PHP &gt;=7.1

0.0.4PHP &gt;=8.1

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/524887?v=4)[Joskfg](/maintainers/Joskfg)[@joskfg](https://github.com/joskfg)

![](https://www.gravatar.com/avatar/a0d32fbf2a47dc28c1935adfc1c79c50d4b728eba55825377e549e934f1003a0?d=identicon)[devsoftonic](/maintainers/devsoftonic)

---

Top Contributors

[![xaviapa](https://avatars.githubusercontent.com/u/8439057?v=4)](https://github.com/xaviapa "xaviapa (9 commits)")[![rccrdpccl](https://avatars.githubusercontent.com/u/18526422?v=4)](https://github.com/rccrdpccl "rccrdpccl (3 commits)")[![josemanuel-cardona](https://avatars.githubusercontent.com/u/196229448?v=4)](https://github.com/josemanuel-cardona "josemanuel-cardona (1 commits)")[![joskfg](https://avatars.githubusercontent.com/u/524887?v=4)](https://github.com/joskfg "joskfg (1 commits)")

---

Tags

middlewareproxyGuzzle

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/softonic-guzzle-proxy-middleware/health.svg)

```
[![Health](https://phpackages.com/badges/softonic-guzzle-proxy-middleware/health.svg)](https://phpackages.com/packages/softonic-guzzle-proxy-middleware)
```

###  Alternatives

[kevinrob/guzzle-cache-middleware

A HTTP/1.1 Cache for Guzzle 6. It's a simple Middleware to be added in the HandlerStack. (RFC 7234)

43417.4M104](/packages/kevinrob-guzzle-cache-middleware)[caseyamcl/guzzle_retry_middleware

Guzzle v6+ retry middleware that handles 429/503 status codes and connection timeouts

21810.7M64](/packages/caseyamcl-guzzle-retry-middleware)[rtheunissen/guzzle-log-middleware

Guzzle middleware to log requests and responses

842.3M17](/packages/rtheunissen-guzzle-log-middleware)[eljam/guzzle-jwt-middleware

A jwt authentication middleware for guzzle 6

28722.5k3](/packages/eljam-guzzle-jwt-middleware)[rtheunissen/guzzle-rate-limiter

Guzzle 6 middleware used to delay requests dynamically

52177.2k1](/packages/rtheunissen-guzzle-rate-limiter)[softonic/guzzle-oauth2-middleware

Guzzle middleware with OAuth2 integration

103.6M5](/packages/softonic-guzzle-oauth2-middleware)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
