Crates.io | l4p |
lib.rs | l4p |
version | 0.1.9 |
source | src |
created_at | 2024-06-19 19:20:36.997117 |
updated_at | 2024-06-22 14:09:20.200744 |
description | Simple and fast layer 4 proxy in Rust |
homepage | https://code.kiers.eu/jjkiers/layer4-proxy |
repository | https://code.kiers.eu/jjkiers/layer4-proxy |
max_upload_size | |
id | 1277319 |
size | 97,479 |
Hey, now we are on level 4!
l4p
is a layer 4 proxy implemented by Rust to listen on specific ports and transfer TCP data to remote addresses (only TCP) according to the configuration.
To gain best performance on your computer's architecture, please consider build the source code. First, you may need Rust tool chain.
$ cd l4p
$ cargo build --release
Binary file will be generated at target/release/l4p
, or you can use cargo install --path .
to install.
Or you can use Cargo to install l4p
:
$ cargo install l4p
Or you can download binary file form the Release page.
l4p
will read yaml format configuration file from /etc/l4p/l4p.yaml
, and you can set custom path to environment variable L4P_CONFIG
, here is an minimal viable example:
version: 1
log: info
servers:
proxy_server:
listen:
- "127.0.0.1:8081"
default: remote
upstream:
remote: "tcp://www.remote.example.com:8082" # proxy to remote address
There are two upstreams built in:
For detailed configuration, check this example.
fourth
, of which this is a heavily modified fork.l4p
is available under terms of Apache-2.0.