rama banner

Crates.io Docs.rs MIT License Apache 2.0 License Build Status

πŸ¦™ Rama (γƒ©γƒž) is a modular service framework for the πŸ¦€ Rust language to move and transform your network packets.

The motivations behind Rama's creation are detailed in the "Why Rama" chapter.

While powerful and flexible, Rama might not be the ideal framework for everyone. If you're building a conventional web server or need a simple HTTP client, other crates might better suit your needs. Although we at Plabayo use Rama extensively for our web infrastructure (clients, servers, and proxies), it has a steeper learning curve and a smaller community compared to more established alternatives.

Consider these alternatives for simpler use cases:

  • Axum for building standard HTTP web servers. It offers extensive community support and ecosystem integrations. However, be aware that Axum's higher-level abstractions may limit your control over the web stack when you need to implement non-standard features.

  • Reqwest for basic HTTP client needs. It's ideal when you don't require fine-grained control over HTTP requests/responses or TLS configuration details.

If you're specifically building proxies and find Rama's approach doesn't align with your needs, explore the alternatives listed in our project README.

Rama's core philosophy centers on empowerment and modularity. It provides a foundation for building proxies, servers, and clients without imposing restrictions. Any component in a Rama-based web stack can be customized to meet your specific requirements, even if that means implementing custom solutions for particular layers.

We gratefully acknowledge that Rama stands on the shoulders of giants. For more details about our inspirations and dependencies, see our acknowledgements.

In some cases, we've had to fork external crates to accommodate our specific needs or scope requirements. While this creates additional maintenance work, we believe it's worthwhile to support our mission of empowering Rama users. Details about these forks can be found in our FORK.md. We maintain the original code structure in these forks to facilitate upstream synchronization and contribute patches back when possible.

Rama is async-first using Tokio as its only Async Runtime. Please refer to the examples found in the /examples dir to get inspired on how you can use it for your purposes.

πŸ’‘ If your organization relies on Rama (γƒ©γƒž) for its operations, we invite you to consider becoming a sponsor πŸ’–. By supporting our project, you'll help ensure its continued development and success. To learn more about sponsorship opportunities, please refer to the "Sponsors" chapter in this book or contact us directly at sponsor@ramaproxy.org.

This framework comes with πŸ”‹ batteries included, giving you the full freedome to build the middleware and services you want, without having to repeat the "common":

categorysupport list
βœ… transportsβœ… tcp βΈ± πŸ—οΈ udp (2) βΈ± βœ… middleware
βœ… httpβœ… auto βΈ± βœ… http/1.1 βΈ± βœ… h2 βΈ± πŸ—οΈ h3 (2) βΈ± βœ… middleware
βœ… web serverβœ… fs βΈ± βœ… redirect βΈ± βœ… dyn router βΈ± βœ… static router βΈ± βœ… handler extractors βΈ± βœ… k8s healthcheck
βœ… http clientβœ… easy client βΈ± βœ… high level API βΈ± βœ… Proxy Connect βΈ± ❌ Chromium Http (3)
βœ… tlsβœ… Rustls βΈ± βœ… BoringSSL βΈ± ❌ NSS (3)
βœ… dnsβœ… DNS Resolver
βœ… proxy protocolsβœ… PROXY protocol βΈ± βœ… http proxy βΈ± βœ… https proxy βΈ± πŸ—οΈ SOCKS5 (2) βΈ± πŸ—οΈ SOCKS5H (2)
πŸ—οΈ web protocolsπŸ—οΈ Web Sockets (WS) (2) βΈ± πŸ—οΈ WSS (2) βΈ± ❌ Web Transport (3) βΈ± ❌ gRPC (3)
βœ… async-method trait servicesβœ… Service βΈ± βœ… Layer βΈ± βœ… context βΈ± βœ… dyn dispatch βΈ± βœ… middleware
βœ… telemetryβœ… tracing βΈ± βœ… opentelemetry βΈ± βœ… http metrics βΈ± βœ… transport metrics
βœ… upstream proxiesβœ… MemoryProxyDB βΈ± βœ… L4 Username Config βΈ± βœ… Proxy Filters
βœ… User Agent (UA)βœ… Http Emulation βΈ± βœ… Tls Emulation βΈ± βœ… UA Parsing
βœ… Fingerprintingβœ… Ja3 βΈ± βœ… Ja4 βΈ± βœ… Ja4H
βœ… utilitiesβœ… error handling βΈ± βœ… graceful shutdown βΈ± πŸ—οΈ Connection Pool (1) βΈ± πŸ—οΈ IP2Loc (2)
πŸ—οΈ Graphical InterfaceπŸ—οΈ traffic logger (2) βΈ± πŸ—οΈ curl export (2) βΈ± πŸ—οΈ TUI implementation (2) βΈ± ❌ traffic intercept (3) βΈ± ❌ traffic replay (3)
βœ… binaryβœ… prebuilt binaries βΈ± πŸ—οΈ proxy config (2) βΈ± βœ… http client βΈ± ❌ WASM Plugins (3)
πŸ—οΈ data scrapingπŸ—οΈ Html Processor (2) βΈ± ❌ Json Processor (3)
❌ browser❌ JS Engine (3) ⸱ ❌ Web API Emulation (3)

πŸ—’οΈ Footnotes

The primary focus of Rama is to aid you in your development of proxies:

The Distortion proxies support comes with User Agent (UA) emulation capabilities. The emulations are made possible by patterns and data extracted using rama-fp. The service is publicly exposed at https://fp.ramaproxy.org, made possible by our sponsor host https://fly.io/.

πŸ” https://echo.ramaproxy.org/ is another service publicly exposed. In contrast to the Fingerprinting Service it is aimed at developers and allows you to send any http request you wish in order to get an insight on the Tls Info and Http Request Info the server receives from you when making that request.

curl -XPOST 'https://echo.ramaproxy.org/foo?bar=baz' \ -H 'x-magic: 42' --data 'whatever forever'

Feel free to make use of while crafting distorted http requests, but please do so with moderation. In case you have ideas on how to improve the service, please let us know by opening an issue.

BrowserStack sponsors Rama by providing automated cross-platform browser testing on real devices, which uses the public fingerprinting service to aid in automated fingerprint collection on both the Http and Tls layers. By design we do not consider Tcp and Udp fingerprinting.

Next to proxies, Rama can also be used to develop Web Services and Http Clients.

GitHub Sponsors Buy Me A Coffee Paypal Donation Discord

Rama also has a channel on the official Discord of the Tokio project. Feel free to join us there as well: https://discord.com/channels/500028886025895936/1349098858831024209

Please consult the official docs.rs documentation or explore the examples found in the /examples dir to know how to use rama for your purposes.

πŸ’‘ You can find the edge docs of the rama framework code at https://ramaproxy.org/docs/rama/index.html, which contains the documentation for the main branch of the project.

🀝 Enterprise support, software customisations, integrations, professional support, consultancy and training are available upon request by sending an email to glen@plabayo.tech. Or get an entireprise subscription via Gihub Sponsors.

πŸ’– Please consider becoming a sponsor if you critically depend upon Rama (γƒ©γƒž) or if you are a fan of the project.

⌨️ | rama binary

The rama binary allows you to use a lot of what rama has to offer without having to code yourself. It comes with a working http client for CLI, which emulates User-Agents and has other utilities. And it also comes with IP/Echo services.

It also allows you to run a rama proxy, configured to your needs.

Learn more about the rama binary and how to install it at /deploy/rama-cli.md.

πŸ§ͺ | Experimental

πŸ¦™ Rama (γƒ©γƒž) is to be considered experimental software for the foreseeable future. In the meanwhile it is already used in production by ourselves and others alike. This is great as it gives us new perspectives and data to further improve and grow the framework. It does mean however that there are still several non-backward compatible releases that will follow 0.2.

In the meanwhile the async ecosystem of Rust is also maturing, and edition 2024 is also to be expected as a 2024 end of year gift. It goes also without saying that we do not nilly-willy change designs or break on purpose. The core design is by now also well defined. But truth has to be said, there is still plenty to be improve and work out. Production use and feedback from you and other users helps a lot with that. As such, if you use Rama do let us know feedback over Discord, email or a GitHub issue.

πŸ‘‰ If you are a company or enterprise that makes use of Rama, or even an individual user that makes use of Rama for commcercial purposes. Please consider becoming a business/enterprise subscriber. It helps make the development cycle to remain sustainable, and is beneficial to you as well. As part of your benefits we are also available to assist you with migrations between breaking releases. For enterprise users we can even make time to develop those PR's in your integration codebases ourselves on your behalf. A win for everybody. πŸ’ͺ