Code Monkey home page Code Monkey logo

rdnat's Introduction

rdnat

This is a dynamic network address translation (DNAT) tool based on Rust and Tokio asynchronous runtime library. The tool supports network monitoring, data forwarding, proxy server functions and other network operations.

Installation

Clone the repository and build the project:

git clone https://github.com/crafcat7/rdnat.git
cd rdnat
cargo build --release

Listening on Ports

This function starts two TCP listener port, waiting for the connection from the two ports. Once the two ports to receive connection at the same time, will start between them.

./rdnat -listen 8000 8001

This command will be in the machine start listening on ports 8000 and 8001.

Agent

In proxy mode, the tool will connect to two specified destination addresses and forward data between the two connections. This is similar to the listening function, but in this case the destination address is remote, rather than a local listening port.

./rdnat -agent 192.168.1.100:8000 192.168.1.101:8001

This will connect to port 8000 of 192.168.1.100 and port 8001 of 192.168.1.101 respectively and forward data between the two.

Forward

The forwarding function enables the application to listen to the local port and forward all received connections and their data to a specified remote address.

./rdnat -forward 8000 192.168.1.102:8000

This will be the local port 8000 listeners, all inbound connections will be forwarded to the remote address 192.168.1.102 8000.

Proxy

Based on the specified protocol (HTTP or SOCKS5), the function will start a proxy server. It is to monitor the address specified.

  • HTTP proxy without authentication
./rdnat -proxy http 8888 -no-auth
  • HTTP proxy with authentication
./rdnat -proxy http 8888 <username> <password>
  • SOCKET5 proxy without authentication
./rdnat -proxy socks5 1080 -no-auth
  • SOCKS5 proxy with authentication
./rdnat -proxy socks5 1080 <username> <password>

rdnat's People

Contributors

crafcat7 avatar

Stargazers

lion2tomato avatar Jun.wan avatar Donny(董九柱) avatar Pengxiang Hao avatar  avatar  avatar  avatar Neo Xu avatar garyhobson avatar VIFEX avatar Benign X avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.