Skip to content

g1r0/habr-proxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About

Habr-proxy project has been done for the test challenge #1.

Assumptions

  • Service will be run locally. No remotes.
  • Proxy is available at http://127.0.0.1:8080.
  • Demo can be run with local environment or docker image.

What was used

  • Python 3.6
  • Mitmproxy
  • Docker
  • Pytest

How to run demo

Docker

Instructions for docker-powered demo can be found at docker/README.rst.

Local python environment

  1. Setup Python 3.6 environment and install dependencies for requirements/prod.txt:
pip install -r requirements/prod.txt
  1. Set environment variable PROXY_CONFIG_DIR pointing to directory with config.yaml.
export PROXY_CONFIG_DIR=/path/to/config_dir
  1. Run server with command:
python src/server.py

Proxy is now available at http://127.0.0.1:8080.

How to run tests

  1. Setup Python 3.6 environment and install dependencies for requirements/prod.txt:
pip install -r requirements/prod.txt
  1. Run Pytest with command:
pytest

About

Mitmproxy-based custom reverse proxy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published