Skip to main content

Lightweight and fast python web proxy

Project description

pyproxy

pyproxy is a lightweight, fast, and customizable Python-based web proxy server designed to handle both HTTP and HTTPS traffic efficiently. It can be used for various purposes, including web scraping, traffic monitoring, and content filtering.




Features

Feature Supported
HTTP & HTTPS
Web request logging
Domain & URL blacklist
SSL inspection
Custom 403 Forbidden page
Remote (HTTP) blacklist support
Shortcut support
Disable inspection for banking websites
Custom headers
Web interface monitoring
Lightweight Docker image
Proxy chaining (multi-proxy forwarding)
IP whitelist with subnet support

📦 Installation

Install from package

pip install pyproxytools

Install from source

git clone https://github.com/pyproxytools/pyproxy.git
cd pyproxy
pip install -r requirements.txt

Install with Docker

docker pull ghcr.io/pyproxytools/pyproxy:latest
docker run -d ghcr.io/pyproxytools/pyproxy:latest

You can use slim images by adding -slim to the end of the tags

Install with Compose

wget https://raw.githubusercontent.com/pyproxytools/pyproxy/main/docker-compose.yml
docker-compose up -d

🚀 Usage

Start the proxy

python3 -m pyproxy

The proxy will be available at: 0.0.0.0:8080. The access log will be available at ./logs/access.log.

📚 Documentation

If you encounter any problems, or if you want to use the program in a particular way, I advise you to read the documentation.

🔧 To do

  • Support content analysis
  • Caching of latest and most searched pages

🏎️ Benchmark

If you're interested in benchmarking the performance of the proxy or comparing request times with and without a proxy, please refer to the Benchmark repository for detailed instructions on how to run the benchmarking tests and generate reports.

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🤝 Contributing

Contributions are welcome and appreciated! If you'd like to improve this project, feel free to fork the repository and submit a pull request. Whether it's fixing bugs, adding new features, improving documentation, or suggesting enhancements, every bit helps. Please make sure to follow the coding standards and test your changes before submitting. Let's build something great together!

📦 Deployment with Ansible

If you want to deploy pyproxy automatically to remote servers (via source or Docker), an official Ansible role is available:

  • 🔧 Install from source or run as a Docker container
  • 📁 Supports customization of ports, versions, and paths
  • 🚀 Easily integrable into your infrastructure or CI/CD pipelines

👉 Check out the pyproxy-ansible repository for more details and usage instructions.

🧩 Python SDK for Administration and Monitoring

A dedicated Python SDK is available to interact programmatically with the pyproxy administration and monitoring interface: pyproxy-sdk-py. This SDK provides a simple and consistent API to manage your proxy configuration remotely — allowing you to add or delete domains, manage URLs, create and remove clients, and perform other administrative tasks. It is designed to integrate easily into automation scripts, dashboards, or backend systems that need to control and monitor pyproxy instances.


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

pyproxytools-0.5.3.tar.gz (35.7 kB view details)

Uploaded Source

Built Distribution

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

pyproxytools-0.5.3-py3-none-any.whl (85.0 kB view details)

Uploaded Python 3

File details

Details for the file pyproxytools-0.5.3.tar.gz.

File metadata

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

File hashes

Hashes for pyproxytools-0.5.3.tar.gz
Algorithm Hash digest
SHA256 65dddda9dea818f955bcf783af000a162f3a809f82f940d974d09dd526d4e588
MD5 aa732fa69eaded09bbf398b55aa020ff
BLAKE2b-256 69abf25e45f6849737d32ec51a1e81a76e2633265c36c22bf491854380237ca0

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyproxytools-0.5.3.tar.gz:

Publisher: main.yml on pyproxytools/pyproxy

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

File details

Details for the file pyproxytools-0.5.3-py3-none-any.whl.

File metadata

  • Download URL: pyproxytools-0.5.3-py3-none-any.whl
  • Upload date:
  • Size: 85.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for pyproxytools-0.5.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ee9cdf3afd99a5935c5f31a42ad1b0099bcbe6ba66007cf4019bb91b1b2e2fa8
MD5 1c57bd95aa02765483aad9e24ab6cee3
BLAKE2b-256 a0b59d3fd9a64ac385fad406c1b2aaed98cdde3aea6ed63360209a554550b27d

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyproxytools-0.5.3-py3-none-any.whl:

Publisher: main.yml on pyproxytools/pyproxy

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