Complete rewrite of my original ihnet tool that fixes bugs and improves on many shortcomings.
New and improved CLI & routes system (forward multiple ports on one running process using one identity!), along with stream multiplexing (many UDP connections over one channel!) and general performance improvements.
IHNET2 is a simple, fast, and secure (UDP, TCP, or both!) port forwarder that allows one computer to connect to another even behind a NAT & a private IP.
Supports secure authentication (Argon2id based key-derivation) so not just anyone can connect to your ports.
- NAT Traversal: Connects computers behind NATs and private IPs
- Secure Authentication: Uses Argon2id-based key derivation for secure connections
- Multi-Protocol Support: Works with TCP, UDP, or both protocols simultaneously
- Stream Multiplexing: Multiple connections over one channel
- Flexible Routing: Forward multiple ports using a single identity
- Modern Architecture: Built with Rust and leveraging iroh for connectivity
Run the following to run the script and add ihnet2 system service.
curl https://raw.githubusercontent.com/Logan-010/ihnet2/refs/heads/main/install.sh | sudo shOR install as a user service without root.
curl https://raw.githubusercontent.com/Logan-010/ihnet2/refs/heads/main/install.sh | sh -s userTo build IHNET2 from source:
cargo build --releaseThe binary will be available in target/release/ihnet2.
ihnet2 daemonihnet2 route create 127.0.0.1:8080 --auth mypasswordThis will output a ticket you can use to connect from another machine.
ihnet2 route add <ticket>ihnet2 route export 127.0.0.1:8080 --to myroute.jsonihnet2 route import myroute.jsonIHNET2 uses a configuration file for settings. The default location is
~/.ihnet2/config.toml or you can specify a custom location with the -c flag.
- Authentication is handled via Argon2id key derivation
- All communication is encrypted using iroh's secure transport
- Port sharing is controlled through authentication tokens
This project is licensed under the Unlicense. See the UNLICENSE file for details.