diff --git a/BUILD.md b/BUILD.md new file mode 100755 index 0000000..5bf2b00 --- /dev/null +++ b/BUILD.md @@ -0,0 +1,8 @@ +## How to build + +```sh +cargo build --release +mv target/release/flowgate anywhere/you/need +``` + +todo: more details \ No newline at end of file diff --git a/README.md b/README.md index a5d2585..eab89c1 100755 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ HTTP requests redirection system Features: - Request redirection -- SSL/TLS support +- TLS support - Keep-alive connections - Sending IP in header (X-Real-IP) @@ -12,8 +12,16 @@ TODO: - Creating trees of flowgate - Filter by headers - Modify response headers +- HTTP/3 full support -## IP forwarding types +## How to use + +Firstly, download it from releases. or build from sources (read BUILD.md) \ +Just run it and configure in `conf.yml` file. + +## Configuration + +### IP forwarding methods - None (`none`):\ Do nothing @@ -22,17 +30,4 @@ TODO: - Simple (`simple`):\ Appends `ip:port\n` to the beginning of the request - Header (`header[:HEADER_NAME]`):\ - Adds header `HEADER_NAME: ip:port` to the request - -## How to run - -You need [Rust](https://www.rust-lang.org/) installed with cargo! - -```sh -cargo run # --------------------------------- # Run -cargo run --release # ----------------------- # Run release -cargo build && sudo ./target/release/flowgate # Run with root -cargo build # ------------------------------------------------ # Build -cargo build --release # -------------------------------------- # Build release -cargo build --release --no-default-features --features FEATURE # Build with feature -``` \ No newline at end of file + Adds header `HEADER_NAME: ip:port` to the request \ No newline at end of file diff --git a/shell.nix b/shell.nix index cefd016..9bca4e3 100755 --- a/shell.nix +++ b/shell.nix @@ -2,7 +2,7 @@ with import { }; mkShell { nativeBuildInputs = [ - openssl - pkg-config + cargo + rustc ]; } \ No newline at end of file diff --git a/src/main.rs b/src/main.rs index 289e275..6581ee2 100755 --- a/src/main.rs +++ b/src/main.rs @@ -16,4 +16,6 @@ async fn main() { let server = FlowgateServer::new(config.clone()); server.start().await; + + loop {} } \ No newline at end of file