0.1.0 |
|
---|
#178 in #non-blocking
71 downloads per month
8KB
179 lines
🦙 Rama (ラマ) is a modular proxy framework for the 🦀 Rust language to move and transform your network packets. The reasons behind the creation of rama can be read in the "Why Rama" chapter.
You can use it to develop:
- 🚦 Reverse proxies;
- 🔓 TLS Termination proxies;
- 🌐 HTTP(S) proxies;
- 🧦 SOCKS5 proxies;
- 🔎 MITM proxies;
- 🕵️♀️ Distortion proxies.
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.
- Learn more by reading the Rama book at https://ramaproxy.org/book
- or checkout the framework Rust docs at https://ramaproxy.org/docs/rama.
There is no crates.io release of rama yet. If you already want to start using rama already your can do so by referring to it in your Cargo.toml
as follows:
rama = { git = "https://github.com/plabayo/rama" }
💬 Come join us at Discord on the #rama
public channel. To ask questions, discuss ideas and ask how rama may be useful for you.
⚠️ rama is early work in progress, use at your own risk.
Not everything that exists is documented and not everything that is documented is implemented.
📖 Rama's full documentatuon, references and background material can be found in the form of the "rama book" at https://ramaproxy.org/.
⛨ | Safety
This crate uses #![forbid(unsafe_code)]
to ensure everything is implemented in 100% safe Rust.
🦀 | Minimum supported Rust version
Rama's MSRV is 1.75
.
🧭 | Roadmap
Please refer to https://github.com/plabayo/rama/milestones to know what's on the roadmap. Is there something not on the roadmap for the next version that you would really like? Please create a feature request to request it and become a sponsor if you can.
💼 | License
This project is dual-licensed under both the MIT license and Apache 2.0 License.
👋 | Contributing
🎈 Thanks for your help improving the project! We are so happy to have
you! We have a contributing guide to help you get involved in the
rama
project.
Should you want to contribure this project but you do not yet know how to program in Rust, you could start learning Rust with as goal to contribute as soon as possible to rama
by using "the Rust 101 Learning Guide" as your study companion. Glen can also be hired as a mentor or teacher to give you paid 1-on-1 lessons and other similar consultancy services. You can find his contact details at https://www.glendc.com/.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted
for inclusion in rama
by you, shall be licensed as both MIT and Apache 2.0,
without any additional terms or conditions.
Acknowledgements
Special thanks goes to all involved in developing, maintaining and supporting the Rust programming language, the Tokio ecosystem and all other crates that we depend upon.
Extra credits also go to Axum, from which ideas and code were copied as its a project very much in line with the kind of software we want Rama to be, but for a different purpose. Our hats also go off to Tower, its inventors and all the people and creatures that help make it be every day. The initial code for the SOCKS5 support was copied from EAimTY's codebases.
💖 | Sponsors
Rama is completely free, open-source software which needs lots of effort and time to develop and maintain.
Support this project by becoming a sponsor. One time payments are accepted at GitHub as well as at "Buy me a Coffee"
Sponsors help us continue to maintain and improve rama
, as well as other
Free and Open Source (FOSS) technology. It also helps us to create
educational content such as https://github.com/plabayo/learn-rust-101,
and other open source libraries such as https://github.com/plabayo/tower-async.
Sponsors receive perks and depending on your regular contribution it also allows you to rely on us for support and consulting.
Contribute to Open Source
Part of the money we receive from sponsors is used to contribute to other projects
that we depend upon. Plabayo sponsors the following organisations and individuals
building and maintaining open source software that rama
depends upon:
name | projects | |
---|---|---|
💌 | Tokio | (Tokio Project and Ecosystem) |
💌 | Sean McArthur | (Hyper and Tokio) |
💌 | Ratatui | (TUI framework) |
💌 | Ulixee | (Browser Profile Data) |
Past Contributions
name | projects | |
---|---|---|
💌 | Tokio | (Tokio Project and Ecosystem) |
💌 | Ratatui | (TUI framework) |
🌱 | Alternatives
While there are a handful of proxies written in Rust, there is only one other Rust framework specifically made for proxy services. All other proxies are single purpose code bases, some even just for learning purposes.
Cloudflare has been working on a proxy service framework, named pingora
, since a couple of years already,
and on the 28th of February of 2024 they also open sourced it.
Rama is not for everyone, but we sure hope it is right for you.
If not, consider giving pingora
a try, it might very well be the next best thing for you.
Finally, ByteDance has an open source proxy framework written in Rust to developer forward
and reverse proxies alike, named g3proxy
.
❓| FAQ
Available at https://ramaproxy.org/book/faq.html.
Dependencies
~3–14MB
~138K SLoC