Expand description
Upstream proxy types and utilities.
See the ProxyFilter
for more information on how to select a proxy,
and the ProxyDB
trait for how to implement a proxy database.
If you wish to support proxy filters directly from the username,
you can use the ProxyFilterUsernameParser
to extract the proxy filter
so it will be added to the Context
’s Extensions
.
The ProxyDB
is used by Connection Pools to connect via a proxy,
in case a ProxyFilter
is present in the Context
’s Extensions
.
§DB Live Reloads
ProxyDB
implementations like the MemoryProxyDB
feel static in nature, and they are.
The goal is really to load it once and read it often as fast as possible.
In fact, given that we access everything through shared references, there is also no cheap way to mutate it all the time.
As such the normal way to update data such as your proxy list is by performing a rolling update of your actual rama-driven proxy workloads.
That said. By using crates such as left-right
you can relatively affordable perform live reloads by having the writer on its own tokio
task and wrap the reader in a ProxyDB
implementation. This way you can live reload based upon
a signal, or more realistically, every x minutes.
Modules§
- Http Proxy Support
- Proxy Protocol support
Structs§
- A wrapper around a
T
ProxyDB
which can be updated through the only linked writerLiveUpdateProxyDBSetter
. - Writer to set a new
ProxyDB
in the linkedLiveUpdateProxyDB
. - A fast in-memory ProxyDatabase that is the default choice for Rama.
- The error type that can be returned by
MemoryProxyDB
when some of the proxies could not be inserted due to a proxy that had a duplicate key or was invalid for some other reason. - The error type that can be returned by
MemoryProxyDB
when no proxy could be returned. - The selected proxy to use to connect to the proxy.
- A CSV Reader that can be used to create a
MemoryProxyDB
from a CSV file or raw data. - An error that can occur when reading a Proxy CSV row.
- Filter to select a specific kind of proxy.
- A string filter that normalizes the string prior to consumption.
Enums§
- The kind of error that
MemoryProxyDBInsertError
represents. - The kind of error that
MemoryProxyDBQueryError
represents. - The kind of error that can occur when reading a Proxy CSV row.
Traits§
- The trait to implement to provide a proxy database to other facilities, such as connection pools, to provide a proxy based on the given
TransportContext
andProxyFilter
. - Trait that is used by the
ProxyDB
for providing an optional filter predicate to rule out returned results.