PHPackages                             tourze/workerman-sni-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. tourze/workerman-sni-proxy

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

tourze/workerman-sni-proxy
==========================

基于Workerman的SNI代理服务器，支持透明代理和流量转发

0.1.0(6mo ago)02MITPHPCI passing

Since Mar 30Pushed 4mo ago1 watchersCompare

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

READMEChangelog (5)Dependencies (7)Versions (6)Used By (0)

Workerman SNI Proxy
===================

[](#workerman-sni-proxy)

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

[![Latest Version](https://camo.githubusercontent.com/a9cd316d3de9ef1e894bd81865cc0713921f1fba938aed103feb5093016662c1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f746f75727a652f776f726b65726d616e2d736e692d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-sni-proxy)[![Total Downloads](https://camo.githubusercontent.com/7863e272f4bd52c79d76bad95934ba4a607f9c1f27d8d0be0dc43613a700577e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f746f75727a652f776f726b65726d616e2d736e692d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-sni-proxy)[![License](https://camo.githubusercontent.com/79d83c4a6d10a70594b0173b41709f688cb82ec9576c58e9e2e1b81707ef1dc3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f746f75727a652f776f726b65726d616e2d736e692d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://github.com/tourze/workerman-sni-proxy/blob/master/LICENSE)

[![PHP Version](https://camo.githubusercontent.com/de612c5f883c4f105242e9a3051db450246ee76afb3dbd2d0d60ff767c6d0364/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f746f75727a652f776f726b65726d616e2d736e692d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tourze/workerman-sni-proxy)[![Build Status](https://camo.githubusercontent.com/a13a41dba9042f9074a7ad778ec68911b6ed61607db655d72e7e2b6208682cc5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f746f75727a652f776f726b65726d616e2d736e692d70726f78792f63692e796d6c3f7374796c653d666c61742d737175617265)](https://github.com/tourze/workerman-sni-proxy/actions)[![Code Coverage](https://camo.githubusercontent.com/6651821a882990bbc598893615d2ba243af9a4b711830122e50875101b891dfa/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f746f75727a652f776f726b65726d616e2d736e692d70726f78792e7376673f7374796c653d666c61742d737175617265)](https://codecov.io/gh/tourze/workerman-sni-proxy)

A high-performance SNI (Server Name Indication) proxy server based on [Workerman](https://github.com/walkor/workerman).

Features
--------

[](#features)

- Parses SNI extension from client TLS handshakes to identify target hosts
- Routes connections to appropriate backend servers based on SNI hostname
- Supports whitelisting of allowed hostnames
- Provides flexible configuration options for binding address and port
- Handles connection pooling and management efficiently
- Integrates with PSR-compatible loggers (including Monolog)
- Minimal dependencies, lightweight design for optimal performance

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

[](#requirements)

- PHP 8.1 or higher
- Workerman 5.1 or higher
- PSR-compatible logger (optional, Monolog recommended)

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

[](#installation)

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

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

[](#quick-start)

### Basic Example

[](#basic-example)

```
