-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |