GithubHelp home page GithubHelp logo

bbhunter / unicornbottle-httpproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benteveo-kiwi/unicornbottle-httpproxy

0.0 0.0 0.0 398 KB

httpproxy is a tool that presents as a HTTP proxy, and forwards the messages to a queue, where they are picked up by worker threads.

Python 96.35% Shell 3.65%

unicornbottle-httpproxy's Introduction

HTTP Proxy

This is an HTTP proxy that distributes requests over a number of workers. These workers are also stored within this repository, and are run with the rpc_server.py command. See below for info. This is achieved by sending the HTTP requests to a RabbitMQ queue, where it is picked up by a number of workers.

Architecture Overview

The solution is comprised of two main components, the worker and the proxy. Here are the main files to look at to get a quick overview:

Cloning.

This module uses git submodules to share code with other repositories. In order to clone those as well use the following command:

git clone --recurse-submodules <URL>

Installation & Python dependencies.

We use poetry for managing dependencies. Please see unicornbottle-dev/README.md for more info.

To run:

sudo -u httpproxy mitmdump --set confdir=/opt/mitmdump --no-http2 -s rpc_addon.py

I disable HTTP2 because I don't need that kind of functionality and it could be error prone if implemented incorrectly. Most people wouldn't expect an HTTP proxy to support HTTP2 in any case so it shoud work OK. See ./start-mitmproxy.sh for more details.

To run the worker thread, run as follows:

sudo -u httpproxy python3 rpc_server.py 1337 # 1337 is a log file number.

Run unit tests:

pytest

To run an individual test:

pytest -s -k "test_db_write"

unicornbottle-httpproxy's People

Contributors

samjoan avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.