Commit Graph

8 Commits

Author SHA1 Message Date
Abhinav Singh 0744cd8e7f
Go flagless to allow custom user defined flags. (#452)
* Go flagless to allow custom user defined flags. Fixes #301

* Add --cache-dir flag for cache plugin (when used with on-disk store)

* Enable discovery of flags from external plugins, example those that reside outside of proxy.py package and loaded on demand.  This also allows external flags to surface in --help section

* Define --filtered-client-ips flag for FilterByClientIpPlugin
2020-10-14 10:51:56 +05:30
Mike aedf5933f2
Add plugin "FilterByURLRegexPlugin" (#397)
* Initial draft of filter_by_url_regex.py

* Add FilterByURLRegexPlugin

* Fix dictionary key & add logging

* Add proper logging

* Add better logging

* Add logging

* move code to handle_client_request

* development logging

* development

* development

* development

* dev

* dev

* dev

* dev

* dev

* dev

* dev

* dev

* dev

* dev

* dev

* Fix blocked log

* Add to FILTER_LIST, some tidy up

* Update FILTER_LIST

* dev

* remove scheme from url

* Add to FILTER_LIST

* Add to FILTER_LIST

* Update FILTER_LIST

* commenting

* Update FILTER_LIST

* After autopep8

* Fix Anomalous backslash in string (pep8)

* Address code quality checks - flake8 F401 & W605

* Address flake8 errors

* Attempt to fix flake8 errors

* Fix linting issues

* Address flake8 W292

* Attempt to create tests

* Add FilterByURLRegexPlugin

* Rename test

* Work on tests

* Work on tests

* Work on tests

Co-authored-by: Abhinav Singh <mailsforabhinav@gmail.com>
2020-07-13 10:40:34 +05:30
Abhinav Singh 682114e9e0
Decouple SSL wrap logic into connection classes (#394)
* Move wrap functionality within respective connection classes. Also decouple websocket client handshake method

* Add a TCP echo client example that works with TCP echo server example
2020-07-08 13:11:12 +05:30
Abhinav Singh e7aa8a28f7
TLS Interception Cert Generation (#362)
* Use common.pki for interception certificate generation

* Fix tests

* Dont use certificate fields that we dont need, it leads to certificate generation error on Ubuntu

* Prepare for v2.2.0

* npm audit fix
2020-06-09 12:07:00 +05:30
Abhinav Singh 269484df2e
Make HTTP handler constructor free of socket file number (#219)
* Refactor into acceptor module

* Add tunnel doc

* Make fileno free

* Autopep8
2019-12-02 15:55:08 -08:00
Abhinav Singh 6137fd6f82
Refactor (#213)
* Add DEFAULT_HTTP_PORT constant

* Use DEFAULT_HTTP_PORT in tests

* Refactor into exception module

* Refactor into inspector module

* Refactor into server module

* Refactor into proxy module
2019-12-01 22:46:00 -08:00
Abhinav Singh 093e852df5
Make connection queue / recv work with memoryview to avoid copies (#192)
* connection.recv now returns a memoryview

* Make connection.queue also memoryview compliant

* autopep8

* wrap in memoryview as necessary

* Add default timeout for socket_connection and test_embed urllib

* Fix tests

* Skip TestProxyPyEmbedded for now, verifying GitHub actions

* Add timeout for wait_for_server and skip only if GITHUB_ACTIONS env variable is set

* Verify if GitHub Action fails due to wait_for_server spinning forever

* Add test for wait_for_server timeout error exception

* GitHub action hangs irrespective of wait_for_server timeout, disable TestEmbed for GitHub actions
2019-11-26 17:59:26 -08:00
Abhinav Singh e03cae30d2
Initialize Menubar (#188)
* Initialize MacOS Menubar application

* Dashboard plugin at-least needs a shutdown hook to teardown any thread/processes started by dashboard backend plugin

* Add menu bar icon

* Add respective test directories

* Sync test banners

* Move plugin tests under its own package

* Enable daemon for threads, other this wont shutdown cleanly
2019-11-22 15:18:01 -08:00