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

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

tourze/workerman-socks4-proxy
=============================

SOCKS4代理实现

0.0.1(6mo ago)00MITPHPCI passing

Since Nov 1Pushed 5mo ago1 watchersCompare

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

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

Workerman SOCKS4 Proxy
======================

[](#workerman-socks4-proxy)

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

[!\[Latest Version\](https://img.shields.io/packagist/v/tourze/workerman-socks4-proxy.svg? style=flat-square)](https://packagist.org/packages/tourze/workerman-socks4-proxy)[!\[Build Status\](https://img.shields.io/github/actions/workflow/status/tourze/workerman-socks4-proxy/ tests.yml?branch=master&amp;style=flat-square)](https://github.com/tourze/workerman-socks4-proxy/actions)[!\[Quality Score\](https://img.shields.io/scrutinizer/g/tourze/workerman-socks4-proxy.svg? style=flat-square)](https://scrutinizer-ci.com/g/tourze/workerman-socks4-proxy)![Code Coverage](https://camo.githubusercontent.com/30a74b20525184f394f297531d2cd97ddc4475a965cbe141707c92b4bf1a60ef/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d38352532352d677265656e2e7376673f7374796c653d666c61742d737175617265)[!\[Total Downloads\](https://img.shields.io/packagist/dt/tourze/workerman-socks4-proxy.svg? style=flat-square)](https://packagist.org/packages/tourze/workerman-socks4-proxy)[!\[PHP Version\](https://img.shields.io/packagist/php-v/tourze/workerman-socks4-proxy? style=flat-square)](https://packagist.org/packages/tourze/workerman-socks4-proxy)[!\[License\](https://img.shields.io/packagist/l/tourze/workerman-socks4-proxy.svg? style=flat-square)](https://packagist.org/packages/tourze/workerman-socks4-proxy)

A high-performance SOCKS4/SOCKS4a proxy server implementation based on Workerman for PHP 8.1+. Features complete protocol support, optional user authentication, asynchronous I/O, and comprehensive logging.

Table of Contents
-----------------

[](#table-of-contents)

- [Features](#features)
- [Installation](#installation)
- [Requirements](#requirements)
- [Quick Start](#quick-start)
    - [Basic Proxy Server](#basic-proxy-server)
    - [Proxy Server with Authentication](#proxy-server-with-authentication)
- [Protocol Support](#protocol-support)
    - [SOCKS4 Protocol](#socks4-protocol)
    - [SOCKS4a Extension](#socks4a-extension)
- [API Reference](#api-reference)
- [Configuration](#configuration)
- [Testing](#testing)
- [Examples](#examples)
- [Advanced Usage](#advanced-usage)
- [Logging](#logging)
- [Security Considerations](#security-considerations)
- [License](#license)

Features
--------

[](#features)

- **Full Protocol Support**: Complete SOCKS4 and SOCKS4a protocol implementation
- **Domain Name Resolution**: SOCKS4a extension supports domain name resolution
- **User Authentication**: Optional user ID validation for access control
- **High Performance**: Asynchronous implementation using Workerman
- **PSR-3 Logging**: Comprehensive logging support with PSR-3 logger interface
- **Connection Management**: Efficient connection pooling and management
- **Simple API**: Easy-to-use configuration and setup

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

[](#installation)

Install via Composer:

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

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

[](#requirements)

- PHP 8.1 or higher
- Workerman 5.1 or higher
- PSR-3 Logger implementation
- ext-sockets (recommended for optimal performance)

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

[](#quick-start)

### Basic Proxy Server

[](#basic-proxy-server)

```
