Skip to content

A high-performance HTTP/HTTPS forward proxy server written in Rust with full tunneling support and comprehensive logging.

Notifications You must be signed in to change notification settings

pratik-codes/rust-forward-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust Forward Proxy

A high-performance HTTP/HTTPS forward proxy server written in Rust with full tunneling support and comprehensive logging.

Features

  • Full HTTP/HTTPS Proxy Support - Intercepts HTTP requests, tunnels HTTPS via CONNECT
  • High Performance - Built with Hyper and Tokio for async networking
  • Production Logging - Clean INFO logs for monitoring, verbose DEBUG for development
  • Modular Architecture - Clean separation of concerns with utility modules

Quick Start

# Install dependencies
cargo build

# Run the proxy (INFO logging)
cargo run

# Run with verbose logging
RUST_LOG=debug cargo run

# Test HTTP request
curl -x http://127.0.0.1:8080 http://httpbin.org/get

# Test HTTPS request  
curl -x http://127.0.0.1:8080 https://httpbin.org/get

The proxy runs on 127.0.0.1:8080 by default.

Documentation

📚 Comprehensive Guides

🔧 Technical References

How It Works

  1. HTTP Requests → Fully intercepted, logged, and forwarded to upstream servers
  2. HTTPS Requests → CONNECT method establishes encrypted tunnel, raw TCP forwarding
  3. Logging → All transactions logged with clean INFO output and detailed DEBUG data

Configuration

Set environment variables:

# Logging level
export RUST_LOG=info          # Clean logs for production
export RUST_LOG=debug         # Verbose logs for development

# Custom port (modify src/main.rs)

License

MIT License

About

A high-performance HTTP/HTTPS forward proxy server written in Rust with full tunneling support and comprehensive logging.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published