From 1b8847aea598006371b261e450b027786fae328e Mon Sep 17 00:00:00 2001 From: AH-dark Date: Sat, 7 Sep 2024 01:01:12 +0800 Subject: [PATCH] doc: README.md --- README.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..ea5ebc5 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +# Layer 4 Proxy + +A simple layer 4 proxy that forwards TCP & UDP connections to a remote server. + +## Usage + +Create a `config.toml` file in the root directory of the project with the following content: + +```toml +[[forward]] +listen_host = "0.0.0.0" +listen_port = 8080 +remote_host = "0.0.0.0" +remote_port = 8081 + +[[forward]] +listen_host = "0.0.0.0" +listen_port = 8082 +remote_host = "1.1.1.1" +remote_port = 80 +``` + +Run the proxy: + +```sh +cargo build --release +chmod +x target/release/layer-4-proxy +./target/release/layer-4-proxy +``` + +## License + +This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.