Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Transparent Proxy

Rust-based transparent HTTP/HTTPS proxy with WebSocket support.

Features

  • HTTP proxy on port 80
  • HTTPS proxy on port 443 with SSL (via acme.sh)
  • Multiple nodes: several listen-port pairs, each forwarding to its own upstream port
  • Full WebSocket/Upgrade support
  • Minimal binary size (~3MB stripped)
  • Systemd service integration

Configuration

Create /etc/transparent-proxy.toml:

listen_port = 80
listen_port_tls = 443
upstream = "YOUR_UPSTREAM_IP"
upstream_port = 5000
ssl_cert = "/etc/ssl/acme/fullchain.pem"
ssl_key = "/etc/ssl/acme/key.pem"

Multiple nodes

The top-level block is the first node and also supplies the defaults for every extra node. Add a [[node]] section per additional node; any field it omits (upstream, upstream_port, ssl_cert, ssl_key) is inherited from the top level.

listen_port = 80          # node 1: 80/443 -> upstream:5000
listen_port_tls = 443
upstream = "YOUR_UPSTREAM_IP"
upstream_port = 5000
ssl_cert = "/etc/ssl/acme/fullchain.pem"
ssl_key = "/etc/ssl/acme/key.pem"

[[node]]                  # node 2: 4354/4355 -> upstream:5001
name = "node2"
listen_port = 4354
listen_port_tls = 4355
upstream_port = 5001

Each node may also override upstream, ssl_cert and ssl_key to point at a different host or certificate. A node needs at least one of listen_port / listen_port_tls, and a port may only be claimed by one node — both are checked at startup.

Build

cargo build --release
strip target/release/transparent-proxy

Logging

journalctl -u transparent-proxy -f

Environment Variables

  • RUST_LOG - Logging level (default: info)

About

Transparent HTTP/HTTPS proxy with WebSocket support

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages