Home

Awesome

µProxy

A minimal, memory-efficient HTTP/HTTPS/SOCKS4/SOCKS5 proxy server designed to run in memory-constraint environments.
Originally written for MicroPython, now compatible with CPython.

Features

Usage (MicroPython):

import asyncio
import uproxy

# Run a HTTP(S) proxy server at port 8765
proxy = uproxy.uHTTP(ip='0.0.0.0', port=8765)
asyncio.run(proxy.run())

Change uHTTP into uSOCKS4 or uSOCKS5 if you want a SOCKS proxy.

Usage (CPython):

cproxy.py is a CPython-compatible wrapper of uproxy.py for running uproxy in console.

cproxy.py [-h] [-v] [--proto PROTO] [--ip IP] [--port PORT] [--bind BIND]
          [--bufsize BUFSIZE] [--maxconns N] [--backlog M]
          [--timeout TIMEOUT] [--loglevel LOGLEVEL]
          [--auth AUTH] [--upstream UPSTREAM]

Available values for argument --proto are HTTP,SOCKS4, and SOCKS5.
Rest of the arguments' values are the same as in api docs.

$ python3 cproxy.py --proto HTTP --ip 0.0.0.0 --port 8765
Listening on 0.0.0.0:8765
CONNECT 192.168.1.230:54309     ==>     ifconfig.me:443
GET     192.168.1.230:54312     ==>     ifconfig.me:80
CONNECT 192.168.1.230:54315     ==>     www.google.com:443

To use cproxy.py in code:

import asyncio
import cproxy
proxy = cproxy.uHTTP()
asyncio.run(proxy.run())

API docs:

Notes: