PHPackages                             tourze/workerman-proxy-protocol - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. tourze/workerman-proxy-protocol

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tourze/workerman-proxy-protocol
===============================

ProxyProtocol V1

0.0.1(6mo ago)07↓66.7%MITPHPCI passing

Since Nov 14Pushed 6mo ago1 watchersCompare

[ Source](https://github.com/tourze/workerman-proxy-protocol)[ Packagist](https://packagist.org/packages/tourze/workerman-proxy-protocol)[ RSS](/packages/tourze-workerman-proxy-protocol/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (5)Versions (2)Used By (0)

Workerman Proxy Protocol
========================

[](#workerman-proxy-protocol)

[English](README.md) | [中文](README.zh-CN.md)

[![Latest Version](https://camo.githubusercontent.com/6771e90b1c47581c601cbe01988af1e023e8f777a2db154f9472f7f9b7f13cee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f776f726b65726d616e2d70726f78792d70726f746f636f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-proxy-protocol)[![Total Downloads](https://camo.githubusercontent.com/0c0af7e1774905a6f19ea71fb84237b1e62c7818a68619a6a03c903f58d58e50/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f776f726b65726d616e2d70726f78792d70726f746f636f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-proxy-protocol)

A Proxy Protocol implementation for Workerman framework, supporting both V1 and V2 versions.

Features
--------

[](#features)

- Support for Proxy Protocol V1 and V2 versions
- Compatible with Workerman framework protocol interface
- Automatic parsing of proxy protocol headers
- Uses WeakMap to manage connection-to-header mapping, preventing memory leaks
- Strict compliance with HAProxy Proxy Protocol specification
- Support for TCP4, TCP6, and UNKNOWN connection types

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

[](#installation)

```
composer require tourze/workerman-proxy-protocol
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Workerman &gt;= 5.1
- tourze/proxy-protocol-core

Quick Start
-----------

[](#quick-start)

### Using Proxy Protocol V1

[](#using-proxy-protocol-v1)

```
