A simple IPv6-compatible port forwarding tool written in Rust.
- Supports both IPv4 and IPv6
- Forward and reverse proxy modes
- Asynchronous I/O with Tokio
- Install Rust from https://www.rust-lang.org/tools/install
- Clone this repository
- Run
cargo build --release
# Forward proxy: Listen on IPv6 port 4023 and forward to 127.0.0.1:4022
./port_forwarder --local [::1]:4023 --remote 127.0.0.1:4022 --mode forward
# Reverse proxy: Listen on 127.0.0.1:4022 and forward to IPv6 port 4023
./port_forwarder --local [::1]:4023 --remote 127.0.0.1:4022 --mode reverse
-
Forward all traffic from IPv6 port 4023 to localhost port 4022:
./port_forwarder -l [::1]:4023 -r 127.0.0.1:4022 -m forward
-
Reverse forwarding - accept connections on localhost port 4022 and forward to IPv6 port 4023:
./port_forwarder -l [::1]:4023 -r 127.0.0.1:4022 -m reverse
cargo build --release
The executable will be located at target/release/port_forwarder
.