| Title: | Client for the Litport Free Proxy Snapshot API |
|---|---|
| Description: | Fetches and validates snapshots of verified HTTP, SOCKS4, and SOCKS5 proxies from the Litport free proxy API. Filters results by protocol, country, anonymity, HTTPS support, latency, uptime, and freshness, returning a normalized data frame. Validation rejects private and reserved IPv4 ranges, malformed timestamps, and truncated or stale snapshots. |
| Authors: | Litport [aut, cre] |
| Maintainer: | Litport <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-10 01:27:08 UTC |
| Source: | https://github.com/litportnet/free-proxy-sdk |
Fetches and validates snapshots of verified HTTP, SOCKS4, and SOCKS5 proxies from the Litport free proxy API. Filters results by protocol, country, anonymity, HTTPS support, latency, uptime, and freshness, returning a normalized data frame. Validation rejects private and reserved IPv4 ranges, malformed timestamps, and truncated or stale snapshots.
Create a client with litport_client, then fetch proxies
with get_proxies or pick_best. Both functions
validate the snapshot envelope and every proxy row, raising conditions of
class litport_error (with a more specific subclass such as
litport_http_error or litport_snapshot_validation_error) on
failure.
litport_client, get_proxies,
pick_best
https://litport.net/free-proxy
https://litport.net/docs/free-proxy-api
Fetches the Litport free proxy snapshot, validates it, and returns the matching proxy records as a normalized data frame ordered by seven-day uptime, then latency, then URL.
get_proxies(client, ...)get_proxies(client, ...)
client |
A |
... |
Named filters. Supported names are |
The snapshot envelope and every proxy row are validated before filtering.
Invalid envelopes raise litport_snapshot_validation_error; a
truncated snapshot raises litport_snapshot_truncated_error;
an HTTP status outside 200-299 raises litport_http_error (carrying
a status element); a transport timeout raises
litport_timeout_error; any other transport failure, such as a
name-resolution or TLS error, raises litport_transport_error.
Proxy host values are validated as
public IPv4 addresses, rejecting private and other reserved ranges. A
row's uptime_7d is forced to NA whenever it has fewer than
50 checks in the last 7 days. Only rows whose last_checked
timestamp falls within checked_within_min minutes of the current
time (and no more than 5 seconds in the future) are kept. Results are
sorted with non-missing uptime_7d first (descending), then
non-missing latency_ms first (ascending), then url
(ascending), before limit is applied.
A data.frame with one row per matching proxy and the columns
protocol, ip, port, url, country,
region, city, timezone, asn, asn_org,
anonymity, https, latency_ms,
latency_median_ms, uptime_24h, uptime_7d,
checks_7d, exit_ip, sources_count, first_seen,
and last_checked (the last two as POSIXct in UTC). When no
proxies match, a zero-row data.frame with the same columns and
column types is returned rather than NULL.
https://litport.net/free-proxy
https://litport.net/docs/free-proxy-api
client <- litport_client() ## Not run: proxies <- get_proxies(client, protocol = "socks5", country = "us", limit = 5) proxies$url ## End(Not run)client <- litport_client() ## Not run: proxies <- get_proxies(client, protocol = "socks5", country = "us", limit = 5) proxies$url ## End(Not run)
Creates a client object holding the snapshot endpoint, request timeout, and
optional transport and clock overrides used by get_proxies and
pick_best. No network request is made here.
litport_client(api_url = NULL, timeout = 10, transport = NULL, now = NULL)litport_client(api_url = NULL, timeout = 10, transport = NULL, now = NULL)
api_url |
Character string giving the snapshot endpoint URL. Defaults to the public Litport free proxy snapshot API. |
timeout |
Positive, finite number of seconds to wait for the snapshot
request before raising a |
transport |
Optional function with signature |
now |
Optional zero-argument function returning the current time as a
|
The client itself performs no network I/O; it only stores configuration
that is used later by get_proxies. Constructing a client
raises a condition of class litport_filter_validation_error if
timeout is not a positive, finite number, or if transport or
now are supplied but are not functions.
An object of class "litport_client": a list holding the validated
api_url, timeout, transport, and now settings.
Pass it to get_proxies or pick_best.
https://litport.net/free-proxy
https://litport.net/docs/free-proxy-api
client <- litport_client() ## Not run: proxies <- get_proxies(client, protocol = "socks5", country = "us") ## End(Not run)client <- litport_client() ## Not run: proxies <- get_proxies(client, protocol = "socks5", country = "us") ## End(Not run)
Fetches the Litport free proxy snapshot and returns at most count of the
highest-ranked matching proxy records, applying the same filters and ordering as
get_proxies.
pick_best(client, count, ...)pick_best(client, count, ...)
client |
A |
count |
Non-negative integer giving the maximum number of rows to return. |
... |
Named filters passed through to |
pick_best is equivalent to calling get_proxies with
the same filters and then taking the first count rows, since
get_proxies already returns results sorted best-first. It
raises litport_filter_validation_error if count is not a
non-negative integer.
A data.frame with the same columns as get_proxies,
containing at most count rows taken from the front of the sorted,
filtered result. When no proxies match, a zero-row data.frame with
the same columns and column types is returned rather than NULL.
https://litport.net/free-proxy
https://litport.net/docs/free-proxy-api
client <- litport_client() ## Not run: best <- pick_best(client, 5, protocol = "http") best$url ## End(Not run)client <- litport_client() ## Not run: best <- pick_best(client, 5, protocol = "http") best$url ## End(Not run)