Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Proxy Multiplexer

License Python Status PyPI Tests

A lightweight, high-performance Python library that handles TLS, SOCKS5, and HTTP CONNECT simultaneously on a single port.

Features

  • 🔄 Protocol auto‑detection – reads the first byte to route TLS, SOCKS5, or HTTP
  • 🔒 Native TLS termination – uses your own SSL certificates
  • 🌐 DoH proxying – intercepts DNS‑over‑HTTPS to Google DNS
  • 🎭 Traffic masking – returns HTML on plain GET requests
  • 🚀 Async/await – built on asyncio for high concurrency
  • 🔗 Parent proxy chaining – supports SOCKS5/HTTP upstream
  • 📦 Zero external dependencies – only Python 3.10+ standard library

Installation

pip install smart-proxy-multiplexer
Quick Start
python
from smart_proxy import ProxyMultiplexer
import asyncio

async def my_auth(login, password):
    if login == "demo" and password == "demo":
        return {"host": "192.168.1.100", "port": 1080, "login": "user", "password": "pass"}
    return None

mux = ProxyMultiplexer(
    host="0.0.0.0",
    port=8443,
    auth_callback=my_auth,
)

asyncio.run(mux.start())
How It Works
text
Client (TLS/SOCKS5/HTTP) → [Port 443] → Multiplexer → Parent SOCKS5 → Internet
                                          │
                                          ├─ DoH requests → Google DNS (8.8.8.8)
                                          └─ GET without auth → HTML page

Running Tests

The library includes a comprehensive test suite using pytest.

  1. Install development dependencies:
  pip install -e .[dev]
  1. Run the tests:
   pytest tests/test_multiplexer.py -v

All tests are isolated and run on random ports. No external services are required.

License MIT © 2026 Valentin Volttecc

Contact Email: volttecc@gmail.com

Telegram: @volttecc

GitHub: VoltaStrasse

About

Universal asyncio Python library that handles TLS, SOCKS5, and HTTP CONNECT on a single port with built‑in DoH proxying and DPI‑evasive traffic masking.

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages