Proxy.py – A lightweight, single file HTTP proxy server in python

(4,138 views)

To facilitate end-to-end testing for such scenarios, I architected a proxy infrastructure; A stripped-down version of which was a Proxy.py - lightweight HTTP proxy server in Python. Blog post: https://abhinavsingh.com/proxy-py-a-lightweight-single-file-http-proxy-server-in-python/ Github page: https://github.com/abhinavsingh/proxy.py Features Fast & Scalable Scales by using all available cores on the system Threadless executions using coroutine Made to handle tens-of-thousands connections / sec # On Macbook Pro 2015 / 2.8 GHz Intel Core i7 ❯ hey -n 10000 -c 100 https://localhost:8899/ Summary: Total: 0.6157 secs Slowest: 0.1049 secs Fastest: 0.0007 secs Average: 0.0055 secs Requests/sec: 16240.5444 Total data: 800000 bytes Size/request: 80 bytes Response time histogram: 0.001 [1] | 0.011 [9565] |■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 0.022 [332] |■ Lightweight Uses only ~5-20MB RAM No external dependency other than standard Python library Programmable Optionally enable builtin Web Server Customize proxy and http routing via plugins Enable plugin using command line option e.g. --plugins proxy.plugin.CacheResponsesPlugin Plugin API is currently in development....

May 21, 2020
Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
© HAKIN9 MEDIA SP. Z O.O. SP. K. 2023
What certifications or qualifications do you hold?
Max. file size: 150 MB.
What level of experience should the ideal candidate have?
What certifications or qualifications are preferred?

Download Free eBook

Step 1 of 4

Name(Required)

We’re committed to your privacy. Hakin9 uses the information you provide to us to contact you about our relevant content, products, and services. You may unsubscribe from these communications at any time. For more information, check out our Privacy Policy.