PHPackages                             retrowaver/proxy-checker - 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. retrowaver/proxy-checker

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

retrowaver/proxy-checker
========================

Proxy Checker is a PHP library that allows you to quickly check a list of proxies.

1.0.0(6y ago)2213MITPHPPHP ^7.2.5CI failing

Since Feb 6Pushed 6y ago1 watchersCompare

[ Source](https://github.com/retrowaver/php-proxy-checker)[ Packagist](https://packagist.org/packages/retrowaver/proxy-checker)[ RSS](/packages/retrowaver-proxy-checker/feed)WikiDiscussions master Synced 1w ago

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

PHP Proxy Checker
=================

[](#php-proxy-checker)

Proxy Checker is a PHP library that allows you to quickly check a list of proxies.

- fast (thanks to asynchronous requests)
- simple (PSR-7 based)
- supports many protocols
- customizable (full control over request / response checking)

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

[](#installation)

```
composer require retrowaver/proxy-checker

```

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

[](#how-it-works)

`ProxyChecker` constructor takes 2 mandatory arguments:

- PSR-7 Request
- object that implements `ResponseCheckerInterface`

When `checkProxies()` is called, it attempts to send that request using every proxy, and then calls `checkResponse()` of provided `ResponseCheckerInterface` implementation, which ultimately decides whether proxy is valid or not.

Depending on how much control you want, you can use built-in `ResponseCheckerBuilder` for a quick start (see below) or make a custom class.

1. Basic usage
--------------

[](#1-basic-usage)

### Step 1. Make proxy array

[](#step-1-make-proxy-array)

Make proxy array manually:

```
use Retrowaver\ProxyChecker\Entity\Proxy;

$proxies = [
    (new Proxy)
        ->setIp('127.0.0.1')
        ->setPort(1080)
        ->setProtocol('http'),
    (new Proxy)
        ->setIp('192.168.1.1')
        ->setPort(8080)
        ->setProtocol('http')
];
```

... or use built-in simple importer:

```
use Retrowaver\ProxyChecker\Import\SimpleImporter;

$importer = new SimpleImporter;

$lines = file('path-to-file-with-proxies.txt'); // ip:port format
$proxies = $importer->import($lines, 'http');
```

### Step 2. Prepare a request

[](#step-2-prepare-a-request)

Prepare a PSR-7 request that will be send using proxies.

```
use GuzzleHttp\Psr7\Request;

$request = new Request('GET', 'http://example.com');
```

### Step 3. Prepare ResponseChecker

[](#step-3-prepare-responsechecker)

You can use built-in ResponseCheckerBuilder:

```
use Retrowaver\ProxyChecker\ResponseChecker\ResponseCheckerBuilder;

$responseChecker = (new ResponseCheckerBuilder)
    ->bodyContains('some string on target website')
;
```

or write a custom `ResponseCheckerInterface` implementation:

```
use Psr\Http\Message\ResponseInterface;
use Retrowaver\ProxyChecker\Entity\ProxyInterface;

class CustomResponseChecker implements ResponseCheckerInterface
{
    public function checkResponse(
        ResponseInterface $response,
        ProxyInterface $proxy
    ): bool {
        if (...) {
            // proxy not valid
            return false;
        }

        // valid proxy
        return true;
    }
}
```

```
$responseChecker = new CustomResponseChecker;
```

### Step 4. Create ProxyChecker and check proxies

[](#step-4-create-proxychecker-and-check-proxies)

```
use Retrowaver\ProxyChecker\ProxyChecker;

$proxyChecker = new ProxyChecker($request, $responseChecker);

$validProxies = $proxyChecker->checkProxies($proxies);
```

2. Additional info
------------------

[](#2-additional-info)

### Options reference

[](#options-reference)

`ProxyChecker` accepts optional parameters `$options` and `$requestOptions`:

- `$options`
    - `concurrency` - max concurrent request (default 50)
- `$requestOptions` are [Guzzle request options](http://docs.guzzlephp.org/en/stable/request-options.html) that are passed to Guzzle client while sending a request. Currently there's only one default value: `'timeout' => 20`

### Supported protocols

[](#supported-protocols)

PHP Proxy Checker should work with http, https, socks4, socks4a, socks5 and socks5h proxies (see [https://curl.haxx.se/libcurl/c/CURLOPT\_PROXY.html](https://curl.haxx.se/libcurl/c/CURLOPT_PROXY.html) for descriptions).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

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

Unknown

Total

1

Last Release

2293d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e8a213aeb658b57785c0f5c749fbbb82a40a94bf366ef052c7e2e8664c1a8d2c?d=identicon)[retrowaver](/maintainers/retrowaver)

---

Top Contributors

[![retrowaver](https://avatars.githubusercontent.com/u/23421260?v=4)](https://github.com/retrowaver "retrowaver (13 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/retrowaver-proxy-checker/health.svg)

```
[![Health](https://phpackages.com/badges/retrowaver-proxy-checker/health.svg)](https://phpackages.com/packages/retrowaver-proxy-checker)
```

###  Alternatives

[google/cloud-core

Google Cloud PHP shared dependency, providing functionality useful to all components.

343121.4M79](/packages/google-cloud-core)[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[eliashaeussler/typo3-solver

Extension for TYPO3 CMS to extend TYPO3's exception handling with AI generated solutions

292.1k](/packages/eliashaeussler-typo3-solver)

PHPackages © 2026

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