Skip to main content

Universal asyncio multiplexer for TLS, SOCKS5, and HTTP CONNECT on a single port

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smart_proxy_multiplexer-1.0.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

smart_proxy_multiplexer-1.0.1-py3-none-any.whl (10.2 kB view details)

Uploaded Python 3

File details

Details for the file smart_proxy_multiplexer-1.0.1.tar.gz.

File metadata

  • Download URL: smart_proxy_multiplexer-1.0.1.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for smart_proxy_multiplexer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 d212f3e38f5829da6c45801a87a609bc2b62931290928fd9155039799b440784
MD5 250b5ed8e2d411cbea642a376e0199ca
BLAKE2b-256 c1667c676b3f6813605a4a06e86b3d959d2f70e7cede6ec0720d568ad08a7c27

See more details on using hashes here.

Provenance

The following attestation bundles were made for smart_proxy_multiplexer-1.0.1.tar.gz:

Publisher: python-publish.yml on VoltaStrasse/smart-proxy-multiplexer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file smart_proxy_multiplexer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for smart_proxy_multiplexer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b08dbd82f9b76634768bb4061e39136d57e8cd5b1ee2eccf264bf1d495cc1e3b
MD5 782c5ac1d2eb52228bc63456d4263ae4
BLAKE2b-256 c5dbd6c1a4a6fa4c1e4c4bfde2c4ac1f47ae1054f868ec7e49243a7ca617181a

See more details on using hashes here.

Provenance

The following attestation bundles were made for smart_proxy_multiplexer-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on VoltaStrasse/smart-proxy-multiplexer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page