Search by

litportnet / free-proxy-sdk

litport

Dependency-free PHP client for Litport free-proxy snapshots.

v0.1.0 2026-09-16 21:56 UTC

This package is not auto-updated.

Last update: 2026-09-17 20:49:31 UTC


README

Litport free proxies: live lists, API and SDKs

Litport Free Proxy SDK for PHP

Dependency-free PHP 8.2+ client for Litport's verified HTTP, SOCKS4, and SOCKS5 snapshot. It reads the documented API snapshot and filters normalized records locally.

Install

composer require litportnet/free-proxy-sdk
use Litportnet\FreeProxy\{Client, Filters};

$proxies = (new Client())->pickBest(5, new Filters(
    protocol: 'socks5', country: 'us', maxLatencyMs: 500,
    minUptime7d: 90, minChecks7d: 50, checkedWithinMin: 30,
));

getProxies() returns normalized immutable Proxy records sorted by seven-day uptime, latency, then URL. pickBest() returns the top matching records. Filters support protocol, country, anonymity, HTTPS, maximum latency, minimum seven-day uptime, minimum checks, freshness (1–1,440 minutes), and limit. A seven-day uptime is null when fewer than 50 checks were recorded.

The client validates the API envelope (count, truncated, and a generatedAt within two minutes), proxy addresses, and nullable values. Configure the timeout with new Client(timeout: 5.0). Supply a callable transport (string $url, array $headers, float $timeout): array for deterministic tests.

Test

composer install --no-interaction --prefer-dist
composer test

Resources

Free proxies are for testing only. Never route credentials, cookies, payment data, or private data through them.