Skip to content

Commit

Permalink
move all old code (not yet deleted) to old dirs
Browse files Browse the repository at this point in the history
time to start on iteration #5
  • Loading branch information
glendc committed Dec 25, 2023
1 parent c30b8e1 commit 3ada5d6
Show file tree
Hide file tree
Showing 63 changed files with 67 additions and 1,724 deletions.
496 changes: 36 additions & 460 deletions Cargo.lock

Large diffs are not rendered by default.

14 changes: 4 additions & 10 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[workspace]
members = [".", "rama-cli", "rama-rt", "rama-rt-macros"]
members = [".", "rama-cli"]

[workspace.package]
version = "0.2.0"
Expand Down Expand Up @@ -36,17 +36,11 @@ hyper = { package = "rama-hyper", version = "0.1001000", features = ["http1", "h
hyper-util = { package = "rama-hyper-util", version = "0.1002", features = ["server-auto"] }
matchit = "0.7.3"
pin-project-lite = "0.2.13"
rama-rt = { version = "0.2", path = "./rama-rt" }
rama-rt-macros = { version = "0.2", path = "./rama-rt-macros" }
serde = { version = "1.0", features = ["derive"] }
serde_urlencoded = "0.7"
tower-async = { version = "0.2", features = [
"util",
"timeout",
"filter",
"limit",
] }
tower-async-http = { version = "0.2", features = ["full"] }
tower = { version = "0.4.13", default-features = false, features = ["util"] }
tower-layer = "0.3.2"
tower-service = "0.3.2"
tracing = "0.1"

[dev-dependencies]
Expand Down
13 changes: 2 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
[ghs-badge]: https://img.shields.io/badge/sponsor-30363D?style=for-the-badge&logo=GitHub-Sponsors&logoColor=#EA4AAA
[ghs-url]: https://github.com/sponsors/plabayo

🦙 Rama is a modular proxy framework for the 🦀 Rust language to move and transform your network packets. You can use it to develop 🚦 reverse proxies, 🔓 TLS termination proxies, 🌐 HTTP(S) proxies, 🧦 SOCKS5 proxies and 🕵️‍♀️ distortion proxies.
🦙 Rama is a modular proxy framework for the 🦀 Rust language to move and transform your network packets. You can use it to develop 🚦 reverse proxies, 🔓 TLS termination proxies, 🌐 HTTP(S) proxies, 🧦 SOCKS5 proxies and 🕵️‍♀️ distortion proxies. Rama is async-first using [Tokio](https://tokio.rs/) as its Async Runtime.

Please refer to [the examples found in the `./examples` dir](./examples) to get inspired on how you can use it for your purposes. There is no [crates.io](https://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:

Expand Down Expand Up @@ -74,7 +74,7 @@ without any additional terms or conditions.

Special thanks goes to all involved in developing, maintaining and supporting [the Rust programming language](https://www.rust-lang.org/), the [Tokio ecosystem](https://tokio.rs/) and [all other crates](./Cargo.toml) that we depend upon.

Extra credits also go to [Axum](https://github.com/tokio-rs/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](https://github.com/tower-rs/tower), its inventors and all the people and creatures that help make it be every day.
Extra credits also go to [Axum](https://github.com/tokio-rs/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](https://github.com/tower-rs/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

Expand Down Expand Up @@ -121,12 +121,3 @@ Note that the Tokio runtime and its ecosystems sparked initial experimental vers
but that we since then, after plenty of non-published iterations, have broken free from that ecosystem,
and are now supporting other ecosystems as well. In fact, by default we link not into any async runtime,
and rely only on the `std` library for for any future/async primitives.

### What Async Runtime is used?

We try to write the Rama codebase in an async runtime agnostic manner. Everything that is
runtime specific (e.g. low level primitives) lives within `rama-rt`. For now [multithreaded Tokio](https://tokio.rs/) is the only platform tested on and that is ready to use. In fact it is for now the only one implemented in the `rama-rt` crate.

There are currently no plans to move away from [Tokio](https://tokio.rs/), we do however have plans to look into adding opt-in (feature-gated) supported for _io-uring_.

Please [open an issue](https://github.com/plabayo/rama/issues) or come and talk to us by [joining our Discord][discord-url] in case you want to help in adding support for different async runtimes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
22 changes: 22 additions & 0 deletions old-src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#![feature(return_type_notation)]
#![allow(incomplete_features)]

pub mod rt;

pub mod service;
pub mod state;

pub mod stream;

pub mod tcp;

pub mod http;
pub mod tls;

#[allow(unreachable_pub)]
mod sealed {
pub trait Sealed<T> {}
}

/// Alias for a type-erased error type.
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
Empty file added old-src/service/mod.rs
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions rama-cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ clap = { version = "4.4", features = [ "derive" ] }
crossterm = "0.27"
rama = { version = "0.2", path = ".." }
ratatui = "0.25"
tokio = { version = "1.35", features = [ "rt-multi-thread", "macros" ] }

[[bin]]
name = "rama"
Expand Down
2 changes: 1 addition & 1 deletion rama-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ enum Commands {
Run,
}

#[rama::rt::main]
#[tokio::main]
async fn main() -> anyhow::Result<()> {
let args = Cli::parse();

Expand Down
29 changes: 0 additions & 29 deletions rama-rt-macros/Cargo.toml

This file was deleted.

64 changes: 0 additions & 64 deletions rama-rt-macros/README.md

This file was deleted.

Loading

0 comments on commit 3ada5d6

Please sign in to comment.