PHPackages                             phprivoxy/core - 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/core

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

phprivoxy/core
==============

Core library for TCP and HTTP connections handling.

v0.10.4(2y ago)0421MITPHPPHP &gt;=8.1

Since Jun 24Pushed 2y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (3)Versions (13)Used By (1)

phprivoxy/core
==============

[](#phprivoxycore)

Core library for TCP connections handling.
------------------------------------------

[](#core-library-for-tcp-connections-handling)

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

### Requirements

[](#requirements)

- **PHP &gt;= 8.1**

### Installation

[](#installation)

#### Using composer (recommended)

[](#using-composer-recommended)

```
composer create phprivoxy/core
```

### Simple TCP server sample

[](#simple-tcp-server-sample)

```
namespace PHPrivoxy\Core;

use Workerman\Connection\TcpConnection;

class HelloWorld implements PHPrivoxy\Core\Tcp\TcpHandlerInterface
{
    public function handle(TcpConnection $connection, ?ConnectionParameters $connectionParameters = null): void
    {
        $connection->send("HTTP/1.1 200 OK\r\ncontent-type: text/html;charset=UTF8\r\n\r\n" . 'Hello, world!');
        $connection->close();
    }
}

$handler = new HelloWorld();
new TcpServer($handler, 1, 8080, '0.0.0.0');
```

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

Just run it:

```
php tests/tcp_server.php start
```

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 protocol. As sample, try to open , , .

Try to open  - it will work! :-)

### Simple HTTP server sample

[](#simple-http-server-sample)

```
namespace PHPrivoxy\Core;

use Psr\Http\Server\RequestHandlerInterface;
use Psr\Http\Message\ServerRequestInterface;
use Psr\Http\Message\ResponseInterface;
use Workerman\Connection\TcpConnection;

class Psr7HelloWorld implements RequestHandlerInterface
{
    public function handle(ServerRequestInterface $request): ResponseInterface
    {
        return new Workerman\Psr7\Response(200, ['content-type' => 'text/html'], 'Hello, world!');
    }
}

class ResponseHandler implements PHPrivoxy\Core\Http\ResponseHandlerInterface
{
    public function handle(ResponseInterface $response, TcpConnection $connection): void
    {
        $connection->send($response);
        $connection->close();
    }
}

$requestHandler = new Psr7HelloWorld();
$responseHandler = new ResponseHandler();
new HttpServer($requestHandler, $responseHandler, 1, 8080, '0.0.0.0');
```

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

Just run it:

```
php tests/http_server.php start

### License
MIT License See [LICENSE](LICENSE)
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

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 ~1 days

Total

12

Last Release

732d 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 (26 commits)")

---

Tags

httphttpsprocessinghandlingprocesscoretcphandlersslConnectionconnectionshigh-performancephprivoxy

### Embed Badge

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

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

###  Alternatives

[hhxsv5/laravel-s

🚀 LaravelS is an out-of-the-box adapter between Laravel/Lumen and Swoole.

3.9k691.5k13](/packages/hhxsv5-laravel-s)[league/uri

URI manipulation library

1.1k240.0M391](/packages/league-uri)[league/uri-interfaces

Common tools for parsing and resolving RFC3987/RFC3986 URI

539238.7M44](/packages/league-uri-interfaces)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78127.7M466](/packages/react-http)[padraic/humbug_get_contents

Secure wrapper for accessing HTTPS resources with file\_get\_contents for PHP 5.3+

1255.4M5](/packages/padraic-humbug-get-contents)[workerman/http-client

5678.2k24](/packages/workerman-http-client)

PHPackages © 2026

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