rport-0.2.14 is not a library.
RPort - WebRTC-based remote port forwarding tool written in Rust
RPort is a modern, WebRTC-based remote port forwarding tool written in Rust. It enables secure peer-to-peer connections for port forwarding, remote access, and network tunneling without requiring complex NAT traversal configurations.
It is built on top of rustrtc, a pure Rust WebRTC implementation.
Features
- π WebRTC-based P2P connections - Direct peer-to-peer tunneling
- π Secure tunneling - End-to-end encrypted connections
- π Configuration file support - TOML-based configuration with CLI override
- π IPv6 filtering - Automatic IPv6 candidate filtering for better compatibility
- π§ Multiple operation modes - Agent, client, and proxy modes
- π Background daemon support - Run as a system daemon with custom log files
- π Structured logging - Comprehensive logging with tracing support
- β‘ High performance - Built with Tokio async runtime
- π Built-in TURN server - No need for third-party TURN servers
Architecture
βββββββββββββββ WebRTC P2P βββββββββββββββ
β Client βββββββββββββββββββΊβ Agent β
β β β β
β rport -p β β rport -t β
β 8080:22 β β 22 --id β
βββββββββββββββ βββββββββββββββ
β β
β β
βΌ βΌ
βββββββββββββββ βββββββββββββββ
βLocal Serviceβ βRemote Serverβ
β :8080 β β :22 (SSH) β
βββββββββββββββ βββββββββββββββ
Quick Start
1. Install
2. Run Server (Coordinator)
3. Run Agent (Remote machine)
# Forward remote port 22 to the server with ID "my-server"
4. Connect Client (Local machine)
# Map local port 8080 to remote "my-server"
# Now you can SSH through the tunnel
SSH Integration
Easily connect without direct port mapping using ProxyCommand:
# Direct command
# via ~/.ssh/config
Configuration
RPort loads configuration from ~/.rport.toml:
= "secret-token"
= "http://your-server:3000"
# Optional: Add ICE servers
[[]]
= ["stun:stun.l.google.com:19302"]
Advanced Usage
- Daemon Mode: Append
--daemon --log-file rport.logto the command. - Troubleshooting: Use
RUST_LOG=rport=debugfor verbose logs. - NAT: Built-in TURN server handles most NAT scenarios automatically.
Security Considerations
- Use strong tokens and restrict configuration file permissions (
chmod 600). - Agent listing functionality is disabled to prevent information disclosure.
Build on linux