Skip to content
This repository has been archived by the owner on Jan 30, 2024. It is now read-only.

teonite/asyncproxy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TEONITE Build: Circle CI codecov.io

Async HTTP proxy

Simple asynchronous HTTP proxy with range query parameter support.

Running using Docker

docker-compose pull
docker-compose up -d

To run the proxy on different port or address edit the environment section in docker-compose.yml.

Usage

Basic usage

curl -x http://<proxy_host>:<proxy_port> http://cdn3.sbnation.com/assets/3786371/DOGE-12.jpg -o doge.jpg

Setting range query parameter

curl -x http://<proxy_host>:<proxy_port> http://cdn3.sbnation.com/assets/3786371/DOGE-12.jpg?range=bytes=0-9999 -o doge.jpg

Statistics

Statistics are presented as an HTML view. The view can be found at:

http://<proxy_host>:<proxy_port>/stats

Local development

Install python requirements

Install package requirements using pip:

pip install -r requirements.txt

Run locally

To start the proxy locally on default 8000 port run the following command:

python asyncproxy/asyncproxy.py

Run tests

To run tests execute the following command (libcurl required, minimum version 7.21.1):

python -m tornado.testing asyncproxy/tests.py

Generate coverage report

coverage run -m tornado.testing asyncproxy/tests.py

About

Simple Async Proxy in Tornado

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published