Fast, lightweight protocol translation hub.
Project description
protoproxy
Fast, lightweight protocol translation hub. Normalizes any supported protocol into a canonical format and re-serializes it out.
Overview
protoproxy sits between a reverse proxy and one or more backend services. Incoming requests — regardless of source protocol — are normalized into a shared canonical Python dict. From there, protoproxy routes and re-serializes into whatever protocol the target backend speaks.
New protocols are two files: an input module that normalizes into the canonical dict, and an output module that translates back out. The core stays untouched.
Currently supports HTTPS and MCP.
+------------------------------------+
| protoproxy |
| |
+----------+ | +----------+ +-------------+ |
Internet <--> | Nginx | <------> | | https | | Canonical | |
(HTTPS) | :443 | | | input/ |<--->| dict | |
|Rate limit| | | output | | | |
| Bearer | | +----------+ +-------------+ |
| token | | ^ |
+----------+ | | |
| v |
| +-------------+ |
| | mcp | |
| | input/ | |
| | output | |
| +-------------+ |
| | |
+--------------------------+---------+
|
v
+---------------+
| MCP Server |
| :8026 |
+---------------+
protoproxy doesn't replace your reverse proxy — it complements it. Nginx handles TLS termination, rate limiting, and bearer token or API key authentication. Only clean, authorized traffic reaches protoproxy.
How It Works
- Reverse proxy receives public HTTPS traffic, enforces rate limits and auth, and forwards clean requests to protoproxy
main.pyreceives the forwarded request and checksconfig.jsonto determine the source protocol and target backendhttps_input.pybreaks down the incoming request into a canonical Python dict — a neutral intermediate format every module understandsmain.pychecksconfig.jsonfor the target port and protocol, then calls the matching output modulemcp_output.pytranslates the canonical dict into the target protocol and forwards it to the backend service- The response travels back through the same chain in reverse — backend → output module → canonical dict → input module → reverse proxy → client
Configuration
protoproxy is configured via config.json. Secrets (tokens, keys) go in .env and are never committed.
{
"PROTOPROXY_HOST": "127.0.0.1",
"PROTOPROXY_PORT": 8008,
"LOG_LEVEL": "info",
"PROXY_HOST": "127.0.0.1",
"PROXY_PORT": 8008,
"OUTPUTS": {
"mcp": {
"host": "127.0.0.1",
"port": 8026
}
}
}
| Key | Type | Description |
|---|---|---|
PROTOPROXY_HOST |
str | Interface protoproxy binds to |
PROTOPROXY_PORT |
int | Port protoproxy listens on (default 8008) |
LOG_LEVEL |
str | debug, info, warning, error |
PROXY_HOST |
str | Host of your reverse proxy |
PROXY_PORT |
int | Port your reverse proxy forwards to protoproxy |
OUTPUTS |
dict | Protocol name → host and port of backend service |
Installation
pip install protoproxy
Or from source:
git clone https://github.com/YOUR_USERNAME/protoproxy.git
cd protoproxy
pip install -e .
Quick Start
python -m protoproxy
protoproxy will start on 127.0.0.1:8008 by default and load config.json from the working directory.
Supported Protocols
| HTTPS | | MCP |
Contributing
Issues and PRs welcome. To add a new protocol, open an issue first to discuss the canonical dict contract before writing code.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file protoproxy-0.0.3.tar.gz.
File metadata
- Download URL: protoproxy-0.0.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1a36e9b4beda38ffec67c8b4f14626ac13c6ac597225f865465eb539a0da083f
|
|
| MD5 |
ecd5878cc50a2f9fcd762e8279f137fc
|
|
| BLAKE2b-256 |
eb48450b4a592c17b9855fe54910e702475931b2cd7e504cc72bf0c037edb6ee
|
Provenance
The following attestation bundles were made for protoproxy-0.0.3.tar.gz:
Publisher:
publish.yml on geomux/protoproxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protoproxy-0.0.3.tar.gz -
Subject digest:
1a36e9b4beda38ffec67c8b4f14626ac13c6ac597225f865465eb539a0da083f - Sigstore transparency entry: 1361034340
- Sigstore integration time:
-
Permalink:
geomux/protoproxy@abacfd5e15b1c442871fc6c680e36828184d085f -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/geomux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abacfd5e15b1c442871fc6c680e36828184d085f -
Trigger Event:
release
-
Statement type:
File details
Details for the file protoproxy-0.0.3-py3-none-any.whl.
File metadata
- Download URL: protoproxy-0.0.3-py3-none-any.whl
- Upload date:
- Size: 5.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7c6e485850227914b4a2ed96914ed906d809259628dfa484d9b0fefc487cc560
|
|
| MD5 |
ae83e1657542f3263c03ea4b1d883070
|
|
| BLAKE2b-256 |
30fa8b4da9d15f1145fc62a474d099c417671a9163c38b6df69a423213f5b9fa
|
Provenance
The following attestation bundles were made for protoproxy-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on geomux/protoproxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
protoproxy-0.0.3-py3-none-any.whl -
Subject digest:
7c6e485850227914b4a2ed96914ed906d809259628dfa484d9b0fefc487cc560 - Sigstore transparency entry: 1361034385
- Sigstore integration time:
-
Permalink:
geomux/protoproxy@abacfd5e15b1c442871fc6c680e36828184d085f -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/geomux
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@abacfd5e15b1c442871fc6c680e36828184d085f -
Trigger Event:
release
-
Statement type: