A simple, chainable HTTP proxy with multithreading support
Project description
SSProxy
A simple, stupid, chainable HTTP proxy with multithreading support, written in Python.
Features
- Multithreaded - Handles multiple concurrent connections
- Chainable - Can chain through upstream proxies (with Basic auth support)
- HTTP CONNECT Support - Tunnels HTTPS traffic through the proxy
- YAML Configurable - All settings can be configured via
config.yaml - CLI Overrides - Command-line arguments take precedence over config
- Colorful Output - Terminal-friendly colored logging for requests/responses
Installation
pip install -e .
Usage
Command Line
# Run with default config (config.yaml)
ssproxy
# Run on custom port
ssproxy -p 8888
# Chain through upstream proxy
ssproxy --upstream proxy.example.com:8080
# Disable colored output
ssproxy --plain
# Show all options
ssproxy --help
Configuration File
Create config.yaml:
host: 127.0.0.1
port: 8080
upstream_proxy:
enabled: false
host: 127.0.0.1
port: 8888
auth:
enabled: false
username: ""
password: ""
logging:
enabled: true
colorful: true
show_request_body: false
show_response_body: false
threads:
max_connections: 100
timeout: 30
Programmatic Usage
from proxy.config import ProxyConfig
from proxy.server import ProxyServer
config = ProxyConfig()
config.port = 8080
server = ProxyServer(config)
server.start()
How It Works
Client <--> HTTP Proxy <--> Server
|
v
Upstream Proxy (optional)
|
v
Target Server
HTTP Requests
Standard HTTP requests are forwarded directly to the target server:
GET http://example.com/path HTTP/1.1
Host: example.com
CONNECT Tunneling
HTTPS traffic uses the CONNECT method to establish a tunnel:
CONNECT example.com:443 HTTP/1.1
Host: example.com:443
The proxy establishes a TCP tunnel, allowing encrypted traffic to pass through.
CLI Options
| Option | Description |
|---|---|
-c, --config |
Path to YAML config file |
--host |
Host to bind to |
-p, --port |
Port to bind to |
--upstream |
Upstream proxy (host:port) |
--no-upstream |
Disable upstream proxy |
--timeout |
Connection timeout (seconds) |
--max-connections |
Max concurrent connections |
--plain |
Disable colored output |
--quiet |
Disable logging |
--debug |
Enable debug logging |
Testing
# Start proxy
ssproxy -p 8080
# Test with curl
curl http://httpbin.org/ip --proxy http://127.0.0.1:8080
# Test HTTPS tunneling
curl https://example.com --proxy http://127.0.0.1:8080
Requirements
- Python 3.8+
- PyYAML
Examples: ssproxy # Run with default config (config.yaml) ssproxy -p 8888 # Run on port 8888 ssproxy --config /path/to/config.yml # Use custom config file ssproxy --no-upstream # Disable upstream proxy chain ssproxy --upstream proxy.example.com:8080 # Set upstream proxy ssproxy --plain # Disable colored output """,
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 ssproxy-0.1.0.1.tar.gz.
File metadata
- Download URL: ssproxy-0.1.0.1.tar.gz
- Upload date:
- Size: 12.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
aba98e0fc771ee58e12b5a0a589a94d2b878de8ea8a24490eb6e0b8104fd5a7d
|
|
| MD5 |
3e6870f1623d709e4bc4a57aa31b707d
|
|
| BLAKE2b-256 |
7cdc86f5466abfc54db1ad315871a19b6f1ad515380a4808b18f1cdb2a9bd189
|
Provenance
The following attestation bundles were made for ssproxy-0.1.0.1.tar.gz:
Publisher:
pypi-publish.yml on daedalus/ssproxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssproxy-0.1.0.1.tar.gz -
Subject digest:
aba98e0fc771ee58e12b5a0a589a94d2b878de8ea8a24490eb6e0b8104fd5a7d - Sigstore transparency entry: 1150668591
- Sigstore integration time:
-
Permalink:
daedalus/ssproxy@7c4b8e2eb9c1feed0a84f835d18721bb05baed42 -
Branch / Tag:
refs/tags/v0.1.0.1 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7c4b8e2eb9c1feed0a84f835d18721bb05baed42 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ssproxy-0.1.0.1-py3-none-any.whl.
File metadata
- Download URL: ssproxy-0.1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6cbd85f7348c4ce806837033d7cdd8b122961d1bdc78d210f77856fd7c0b48d
|
|
| MD5 |
5f1e1a7735814b0fb6bd79cb1ebc18ac
|
|
| BLAKE2b-256 |
21a42874360512b5337b1c4506144f4fb9d35a51eebb38faf29c9f98dc6e087f
|
Provenance
The following attestation bundles were made for ssproxy-0.1.0.1-py3-none-any.whl:
Publisher:
pypi-publish.yml on daedalus/ssproxy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ssproxy-0.1.0.1-py3-none-any.whl -
Subject digest:
d6cbd85f7348c4ce806837033d7cdd8b122961d1bdc78d210f77856fd7c0b48d - Sigstore transparency entry: 1150668641
- Sigstore integration time:
-
Permalink:
daedalus/ssproxy@7c4b8e2eb9c1feed0a84f835d18721bb05baed42 -
Branch / Tag:
refs/tags/v0.1.0.1 - Owner: https://github.com/daedalus
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi-publish.yml@7c4b8e2eb9c1feed0a84f835d18721bb05baed42 -
Trigger Event:
release
-
Statement type: