What it is

Rama is a framework designed to support various proxy protocols and configuration methods for network clients. It provides mechanisms for configuring proxies directly, via environment variables, and through system-wide settings, including support for HTTP, HTTP over TLS (HTTPS), and SOCKS5 proxies.

How it works

Proxies can be configured directly using ProxyRoute(s) or exposed via application settings. Applications can also utilize environment variables such as HTTP_PROXY, ALL_PROXY, HTTPS_PROXY, and NO_PROXY, which are managed through the ProxyEnvLayer and NoProxyEnvLayer.

For system-wide configuration, Rama supports HTTP, HTTPS, and SOCKS5 proxies, along with bypass rules, via the SystemProxyLayer. Furthermore, Rama 0.4 introduced support for Proxy Auto Configuration (PAC) via the rama-pac crate, allowing users to evaluate PAC scripts or generate scripts for domain routing.

Known limitations

Previously, network clients built using Rama did not inherently respect system configuration settings for proxies, though this behavior is now supported out of the box via the SystemProxyLayer in version 0.4.

Sources


The Web Scraping Wiki is compiled from the tests and research published on The Web Scraping Club, the newsletter for web scraping professionals. Subscribe to get the next article in your inbox.