Skip to content
KitploitKITPLOIT
ToolsExploitsBlog
Log in
Submit
ToolsExploitsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

FeedsContactPrivacyΒ© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
smtp-tunnel-proxy β€” A high-speed covert tunnel that disguises TCP traffic as SMTP email communication to bypass Deep Packet Inspection (DPI) firewalls. | Kitploit
Tools/GitHubGitHub/x011/smtp-tunnel-proxy
Encryption/Decryption ToolsIDS/IPS EvasionNetwork SecurityAuthenticationRed Teaming
GitHubx011/smtp-tunnel-proxy

smtp-tunnel-proxy

A high-speed covert tunnel that disguises TCP traffic as SMTP email communication to bypass Deep Packet Inspection (DPI) firewalls.

View Repository
1.8k164809 months agoReviewed by Kitploit

Most Popular

View all β†’

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools β†’
Share

πŸ“§ SMTP Tunnel Proxy

A high-speed covert tunnel that disguises TCP traffic as SMTP email communication to bypass Deep Packet Inspection (DPI) firewalls.

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Application │─────▢│   Client    │─────▢│   Server    │─────▢│  Internet    β”‚
β”‚  (Browser)  β”‚ TCP  β”‚ SOCKS5:1080 β”‚ SMTP β”‚  Port 587   β”‚ TCP  β”‚              β”‚
β”‚             │◀─────│             │◀─────│             │◀─────│              β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                            β”‚                    β”‚
                            β”‚   Looks like       β”‚
                            β”‚   Email Traffic    β”‚
                            β–Ό                    β–Ό
                     β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                     β”‚     DPI Firewall               β”‚
                     β”‚  βœ… Sees: Normal SMTP Session  β”‚
                     β”‚  ❌ Cannot see: Tunnel Data    β”‚
                     β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

🎯 Features

FeatureDescription
πŸ”’ TLS EncryptionAll traffic encrypted with TLS 1.2+ after STARTTLS
🎭 DPI EvasionInitial handshake mimics real SMTP servers (Postfix)
⚑ High SpeedBinary streaming protocol after handshake - minimal overhead
πŸ‘₯ Multi-UserPer-user secrets, IP whitelists, and logging settings
πŸ”‘ AuthenticationPer-user pre-shared keys with HMAC-SHA256
🌐 SOCKS5 ProxyStandard proxy interface - works with any application
πŸ“‘ MultiplexingMultiple connections over single tunnel
πŸ›‘οΈ IP WhitelistPer-user access control by IP address/CIDR
πŸ“¦ Easy InstallOne-liner server installation with systemd service
🎁 Client PackagesAuto-generated ZIP files for each user
πŸ”„ Auto-ReconnectClient automatically reconnects on connection loss

πŸ“š For in-depth technical details, protocol specifications, and security analysis, see TECHNICAL.md.


⚑ Quick Start

πŸ“‹ Prerequisites

  • Server: Linux VPS with Python 3.8+, port 587 open
  • Client: Windows/macOS/Linux with Python 3.8+
  • Domain name: Required for TLS certificate verification (free options: DuckDNS, No-IP, FreeDNS)

πŸš€ Server Setup (VPS)

Step 1️⃣: Get a Domain Name

Get a free domain pointing to your VPS:

  • πŸ¦† DuckDNS - Recommended, simple and free
  • 🌐 No-IP - Free tier available
  • πŸ†“ FreeDNS - Many domain options

Example: myserver.duckdns.org β†’ 203.0.113.50 (your VPS IP)

Step 2️⃣: Run the Installer

curl -sSL https://raw.githubusercontent.com/x011/smtp-tunnel-proxy/main/install.sh | sudo bash

The installer will:

  1. πŸ“₯ Download and install everything
  2. ❓ Ask for your domain name
  3. πŸ” Generate TLS certificates automatically
  4. πŸ‘€ Offer to create your first user
  5. πŸ”₯ Configure firewall
  6. πŸš€ Start the service

That's it! Your server is ready.

βž• Add More Users Later

smtp-tunnel-adduser bob      # Add user + generate client ZIP
smtp-tunnel-listusers        # List all users
smtp-tunnel-deluser bob      # Remove a user

πŸ”„ Update Server

smtp-tunnel-update           # Updates code, preserves config/certs/users

πŸ’» Client Setup

Option A: Easy Way (Recommended)

  1. Get your username.zip file from the server admin
  2. Extract the ZIP file
  3. Run the launcher:
PlatformHow to Run
πŸͺŸ WindowsDouble-click start.bat
🐧 LinuxRun ./start.sh
🍎 macOSRun ./start.sh

The launcher will automatically install dependencies and start the client.

βœ… You should see:

SMTP Tunnel Proxy Client
User: alice

[INFO] Starting SMTP Tunnel...
[INFO] SOCKS5 proxy will be available at 127.0.0.1:1080

Connecting to myserver.duckdns.org:587
Connected - binary mode active
SOCKS5 proxy on 127.0.0.1:1080

Option B: Manual Way

cd alice
pip install -r requirements.txt
python client.py

Option C: Custom Configuration

# Download files
scp [email protected]:/etc/smtp-tunnel/ca.crt .

# Create config.yaml:
cat > config.yaml << EOF
client:
  server_host: "myserver.duckdns.org"
  server_port: 587
  socks_port: 1080
  username: "alice"
  secret: "your-secret-from-admin"
  ca_cert: "ca.crt"
EOF

# Run client
python client.py -c config.yaml

πŸ“– Usage

🌐 Configure Your Applications

Set SOCKS5 proxy to: 127.0.0.1:1080

🦊 Firefox

  1. Settings β†’ Network Settings β†’ Settings
  2. Manual proxy configuration
  3. SOCKS Host: 127.0.0.1, Port: 1080
  4. Select SOCKS v5
  5. βœ… Check "Proxy DNS when using SOCKS v5"

🌐 Chrome

  1. Install "Proxy SwitchyOmega" extension
  2. Create profile with SOCKS5: 127.0.0.1:1080

πŸͺŸ Windows (System-wide)

Settings β†’ Network & Internet β†’ Proxy β†’ Manual setup β†’ socks=127.0.0.1:1080

🍎 macOS (System-wide)

System Preferences β†’ Network β†’ Advanced β†’ Proxies β†’ SOCKS Proxy β†’ 127.0.0.1:1080

🐧 Linux (System-wide)

export ALL_PROXY=socks5://127.0.0.1:1080

πŸ’» Command Line

# curl
curl -x socks5h://127.0.0.1:1080 https://ifconfig.me

# git
git config --global http.proxy socks5://127.0.0.1:1080

# Environment variable
export ALL_PROXY=socks5://127.0.0.1:1080

βœ… Test Connection

# Should show your VPS IP
curl -x socks5://127.0.0.1:1080 https://ifconfig.me

βš™οΈ Configuration Reference

πŸ–₯️ Server Options (config.yaml)

OptionDescriptionDefault
hostListen interface0.0.0.0
portListen port587
hostnameSMTP hostname (must match certificate)mail.example.com
cert_fileTLS certificate pathserver.crt
key_fileTLS private key pathserver.key
users_filePath to users configurationusers.yaml
log_usersGlobal logging settingtrue

πŸ‘₯ User Options (users.yaml)

Each user can have individual settings:

users:
  alice:
    secret: "auto-generated-secret"
    # whitelist:              # Optional: restrict to specific IPs
    #   - "192.168.1.100"
    #   - "10.0.0.0/8"        # CIDR notation supported
    # logging: true           # Optional: disable to stop logging this user

  bob:
    secret: "another-secret"
    whitelist:
      - "203.0.113.50"        # Bob can only connect from this IP
    logging: false            # Don't log Bob's activity
OptionDescriptionDefault
secretUser's authentication secretRequired
whitelistAllowed IPs for this user (CIDR supported)All IPs
loggingEnable activity logging for this usertrue

πŸ’» Client Options

OptionDescriptionDefault
server_hostServer domain nameRequired
server_portServer port587
socks_portLocal SOCKS5 port1080
socks_hostLocal SOCKS5 interface127.0.0.1
usernameYour usernameRequired
secretYour authentication secretRequired
ca_certCA certificate for verificationRecommended

πŸ“‹ Service Management

# Check status
sudo systemctl status smtp-tunnel

# Restart after config changes
sudo systemctl restart smtp-tunnel

# View logs
sudo journalctl -u smtp-tunnel -n 100

# Uninstall
sudo /opt/smtp-tunnel/uninstall.sh

πŸ”§ Command Line Options

πŸ–₯️ Server

python server.py [-c CONFIG] [-d]

  -c, --config    Config file (default: config.yaml)
  -d, --debug     Enable debug logging
Download Tool