PHPackages                             postuf/socks-proxy-async - 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. postuf/socks-proxy-async

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

postuf/socks-proxy-async
========================

Lightweight asynchronous socks proxy for PHP

v0.3.1(4y ago)49.9k8[1 PRs](https://github.com/Postuf/SocksProxyAsync/pulls)1MITPHPPHP ^8.0

Since Jan 7Pushed 2y ago2 watchersCompare

[ Source](https://github.com/Postuf/SocksProxyAsync)[ Packagist](https://packagist.org/packages/postuf/socks-proxy-async)[ Docs](https://github.com/Postuf/SocksProxyAsync)[ RSS](/packages/postuf-socks-proxy-async/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (5)Dependencies (5)Versions (26)Used By (1)

SocksProxyAsync
===============

[](#socksproxyasync)

Asynchronous SOCKS5 client library

[![Gitpod ready-to-code](https://camo.githubusercontent.com/c01324668ea00cd2b02dc9fbf541676fb30543b69ef99a070d62a110917126d0/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f476974706f642d72656164792d2d746f2d2d636f64652d626c75653f6c6f676f3d676974706f64)](https://gitpod.io/#https://github.com/Postuf/SocksProxyAsync)

[![codecov](https://camo.githubusercontent.com/5a921a248615903a7502f294105d0b87ef068a19ca0f657cf829c56013ef477c/68747470733a2f2f636f6465636f762e696f2f67682f506f737475662f536f636b7350726f78794173796e632f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/Postuf/SocksProxyAsync)

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

[](#requirements)

- PHP 7.4+
- Composer
    - ext-sockets

Quick start
-----------

[](#quick-start)

First of all, add library to your app user `composer`:

```
composer require postuf/socks-proxy-async

```

How it works
------------

[](#how-it-works)

Say, you have a socket and an event loop:

```
$socket = new SocketAsync(/* ... */);
while(true) {
  // process events
  if (!$socket->ready()) {
    $socket->poll();
  } else {
    // your logic ...
  }
}

```

We create socket, set [socket\_set\_nonblock](https://www.php.net/manual/ru/function.socket-set-nonblock.php), when socket is connected, `isReady` flag is set. Internal logic is organized as state machine. You can extend it and add more steps, so that only `$socket->poll()` is called on event loop, then you just check the state and process received updates.

Testing
-------

[](#testing)

Tests require working proxy and http server to be up and running, use `node/proxy.js` to start proxy, `node/http/start.sh` (`./start.sh` within its subdir) to start http server. By default, http server runs on port 8080, proxy occupies port 1080, tests use these ports.

DNS-related tests require dns server (`node/named.js`) to be up and running.

### Make commands

[](#make-commands)

- make all - run all checks
- make test - run tests
- make cs - run codesniffer checks
- make psalm - run psalm checks
- make stan - run stan checks
- make cs - run stan and psalm checks
- make get-security - get security checker
- make security - run security checker

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 85.7% 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 ~46 days

Recently: every ~209 days

Total

24

Last Release

1251d ago

PHP version history (2 changes)v0.2.0PHP ^7.4

v0.3.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7759d1130ef0024c88247336e1a403cbe066d0580dc88a9f7103849720cf366?d=identicon)[Postuf\_ Ginemiagl](/maintainers/Postuf_%20Ginemiagl)

![](https://www.gravatar.com/avatar/7d00dd1d4eadf43052543656ded599f393f1f8251a0f067161777efdea7694c2?d=identicon)[Ririconj](/maintainers/Ririconj)

---

Top Contributors

[![Qusonann](https://avatars.githubusercontent.com/u/58689118?v=4)](https://github.com/Qusonann "Qusonann (90 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (6 commits)")[![Ginemiagl](https://avatars.githubusercontent.com/u/48316855?v=4)](https://github.com/Ginemiagl "Ginemiagl (6 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (2 commits)")[![tombouctou](https://avatars.githubusercontent.com/u/529780?v=4)](https://github.com/tombouctou "tombouctou (1 commits)")

---

Tags

asyncphpproxysocket

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/postuf-socks-proxy-async/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

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

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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