PHPackages                             phprivoxy/proxy - 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. phprivoxy/proxy

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

phprivoxy/proxy
===============

Core library for HTTP/HTTPS proxy building.

v0.8.10(2y ago)0271MITPHPPHP &gt;=8.1

Since Jun 26Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phprivoxy/proxy)[ Packagist](https://packagist.org/packages/phprivoxy/proxy)[ Docs](https://www.phprivoxy.ru)[ RSS](/packages/phprivoxy-proxy/feed)WikiDiscussions main Synced yesterday

READMEChangelog (9)Dependencies (7)Versions (10)Used By (1)

phprivoxy/proxy
===============

[](#phprivoxyproxy)

Core library for HTTP/HTTPS proxy building.
-------------------------------------------

[](#core-library-for-httphttps-proxy-building)

This PHP package based on Workerman framework () and will be useful for custom proxy servers creation.

### Requirements

[](#requirements)

- **PHP &gt;= 8.1**

### Installation

[](#installation)

#### Using composer (recommended)

[](#using-composer-recommended)

```
composer create phprivoxy/proxy
```

### Simple transparent proxy sample

[](#simple-transparent-proxy-sample)

```
$handler = new PHPrivoxy\Proxy\Transparent();
new PHPrivoxy\Core\Server($handler);// By default, it listen all connections on 8080 port.
```

Configure your browser to work through a proxy server with the IP address 127.0.0.1 and port 8080.

Try to open any site on HTTP or HTTPS protocols. As sample, try to open , , .

This sample you also may find at "tests" directory.

Just run it:

```
php tests/transparent.php start
```

### Simple SSL MITM (Man In The Middle) proxy sample

[](#simple-ssl-mitm-man-in-the-middle-proxy-sample)

```
use Psr\Http\Server\MiddlewareInterface;
use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;

class HttpClientMiddleware implements MiddlewareInterface
{
    public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $client = new GuzzleHttp\Client();
        try {
            $response = $client->send($request, ['allow_redirects' => false]);
        } catch (GuzzleHttp\Exception\ConnectException $e) {
            // Do something
        } catch (GuzzleHttp\Exception\BadResponseException $e) {
            return $e->getResponse();
        }

        return $response;
    }
}

$httpClientMiddleware = new HttpClientMiddleware();
$queue = [$httpClientMiddleware];
$psr15handler = new Relay\Relay($queue);
$tcpHandler = new PHPrivoxy\Proxy\MITM($psr15handler);
$processes = 6; // Default 1.

new PHPrivoxy\Core\Server($tcpHandler, $processes);// By default, it listen all connections on 8080 port.
```

This sample you also may find at "tests" directory.

Just run it:

```
php tests/mitm.php start
```

On first run it create a self-signed SSL root certificate in CA subdirectory. Add this self-signed CA certificate in your browser trusted certificates!

For each site PHPrivoxy\\Proxy\\MITM will generate self-signed certificate in "certificates" subdirectory.

In this sample, we use simple PSR-15 compatible HttpClientMiddleware for site downloading. You also may add your own PSR-15 compatible Middlewares in queue for PSR-15 handler (modified Relay\\Relay in this sample).

### License

[](#license)

MIT License See [LICENSE](LICENSE)

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

9

Last Release

731d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/172364593?v=4)[PHPrivoxy](/maintainers/phprivoxy)[@phprivoxy](https://github.com/phprivoxy)

---

Top Contributors

[![phprivoxy](https://avatars.githubusercontent.com/u/172364593?v=4)](https://github.com/phprivoxy "phprivoxy (21 commits)")

---

Tags

httpphphttpsproxysslhigh-performancehttp-proxyphp proxyssl proxyphprivoxyhttps-proxyprivoxy

### Embed Badge

![Health badge](/badges/phprivoxy-proxy/health.svg)

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

###  Alternatives

[guzzlehttp/psr7

PSR-7 message implementation that also provides common utility methods

8.0k1.1B4.0k](/packages/guzzlehttp-psr7)[zounar/php-proxy

Forward your HTTP/HTTPS requests to another server.

1834.5k](/packages/zounar-php-proxy)[sunrise/http-router

A powerful solution as the foundation of your project.

17451.6k10](/packages/sunrise-http-router)[mimmi20/browser-detector

Library to detect Browsers and Devices

48157.5k5](/packages/mimmi20-browser-detector)

PHPackages © 2026

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