Skip to content

knva/port_forwarder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Port Forwarder

A simple IPv6-compatible port forwarding tool written in Rust.

Features

  • Supports both IPv4 and IPv6
  • Forward and reverse proxy modes
  • Asynchronous I/O with Tokio

Installation

  1. Install Rust from https://www.rust-lang.org/tools/install
  2. Clone this repository
  3. Run cargo build --release

Usage

# 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

Examples

  1. Forward all traffic from IPv6 port 4023 to localhost port 4022:

    ./port_forwarder -l [::1]:4023 -r 127.0.0.1:4022 -m forward
    
  2. 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
    

Building

cargo build --release

The executable will be located at target/release/port_forwarder.

Dependencies

  • Tokio for asynchronous I/O
  • Clap for command-line argument parsing

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages