Skip to main content

Crate nodemaven

Crate nodemaven 

Source
Expand description

Build and validate proxy connection strings.

This crate builds the username a proxy gateway expects, refuses the input that gateway would mishandle, and hands the result to whatever HTTP client you already use. It holds no session and retries nothing.

use nodemaven::Proxy;

let proxy = Proxy::builder()
    .login("your-login")
    .password("your-password")
    .param("country", "us")
    .param("filter", "medium")
    .build()?;

// reqwest::Proxy::all(proxy.url())?
assert_eq!(proxy.username(), "your-login-country-us-filter-medium");

There is no retry policy here on purpose. Retrying a refused request is the one thing that reliably makes the next one worse: measured over 1464 attempts, the chance the next attempt succeeds falls from 75% with no prior failure to 5.8% after five and 0.5% after seven, and 294 attempts spent past six consecutive failures returned three pages - 98 attempts per delivered page against 1.7 in a healthy session. A library that hid that behind a default would be spending a shared pool’s reputation on your behalf.

Structs§

BrowserProxy
The proxy fields a browser driver takes, unencoded. See Proxy::browser.
Check
What one CONNECT produced.
Client
Talks to the account API. One client, one API key.
ClientBuilder
Builds a Client.
Connect
One CONNECT, configured but not yet sent.
Page
One page of a list endpoint. One page, not the collection - see Client::iterate.
Pages
Every row from a page onward, across pages. Yields Err once and stops.
Paging
How one endpoint numbers its pages. This API uses three conventions.
Provider
One gateway’s username dialect.
ProviderBuilder
Builds a Provider by hand, for a gateway with no shipped definition.
Proxy
A set of gateway parameters plus the credentials to use them.
ProxyBuilder
Collects the parts of an identity. See Proxy::builder.

Enums§

Error
Everything this crate returns.

Constants§

API_ROOT
Every path hangs off this.
ASCII_WHITESPACE
The six characters treated as whitespace in a parameter value.
BY_OFFSET
The locations/* endpoints: limit/offset from 0.
BY_PAGE_NUMBER
sub-users/: page/per_page from 1, no size sent - the document gives per_page no default and no maximum.
DEFAULT_API_TIMEOUT
How long the built-in transport waits for a whole response.
DEFAULT_BASE_URL
The dashboard host the API lives on. Overridden by NODEMAVEN_BASE_URL.
DEFAULT_PAGE_SIZE
Rows asked for per request on the limit/offset endpoints: the largest value every one of them accepts. locations/isps/ refuses a request with no limit at all, and the others answer one with 50 rows and no total.
DEFAULT_PROVIDER
The definition used when a caller names none.
DEFAULT_TARGET
What a CONNECT is opened to.
DEFAULT_TIMEOUT
How long a Connect waits, when nothing says otherwise.
ISP_CITIES_PAGING
locations/isps/cities/: pages of 100. This endpoint’s time grows with the page - 100 rows in 8.3 s, 1000 in 56.0 s, measured 2026-09-29 - and 1000 did not fit in the default timeout.
WHITELIST_PAGING
whitelist/ips: page/page_size from 1, at the document’s maximum of 100 because its default is 5, and a 404 past the end.

Traits§

Transport
How a request reaches the API: (method, url, headers, body) in, the status and the raw body out.

Functions§

available
Ids of the definitions compiled into this crate.
load
A definition shipped with this crate.
load_file
A definition read from an arbitrary path.
load_file_as
A definition read from an arbitrary path, under an id you choose.
load_str
A definition read from TOML already in memory.

Type Aliases§

Result
The result type every fallible call in this crate returns.