* Expose within __all__
* Enable `--numprocesses=auto` for `pytest.ini`
* make lib-lint
* Also consider `--plugins` flag when bootstrapping plugins
* Add `from .dashboard import ProxyDashboard` in top-level `__init__.py` to make `ProxyDashboard` flags auto discoverable
* Move `--enable-dashboard` to top-level
* Move logging utility within `Logger` class
* Consider comma separated --plugin and --plugins during discover_plugins
* Refactor plugin related utilities in Plugins module
* mypy and lint
* Fix unused import
* Safe to use tempdir on Github actions to avoid race conditions???
* pki (generically disk based file) based tests are flaky on macOS under parallel execution
* Add a `--unix-socket-path` flag.
When available `--hostname` and `--port` flags are ignored.
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* `print` statement is allowed only in `flags.py` and `version-check.py`. All other places must use a `logger` instance
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add guard for `AF_UNIX` on Windows
* Comment out assertion on Windows for now
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Move Proxy.initialize within FlagParser.initialize. Also move other staticmethods from within proxy class into utils
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove unused imports
* Fix `import-outside-toplevel` error
* add `make lib-flake8` and `make lib-mypy` targets
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Refactor pool
* mypy fixes
* Fix import (relative)
* Add WebScraper example skeleton & ConnectionPool skeleton
* Add ConnectionPool class
* Integrate ConnectionPool with proxy server (experimental)
* Lint fixes
* Remove unused imports. TODO: Put pool behind a flag. Default to false for now
* Make ConnectionPool multiprocess safe. Later we want to make it safe but without using locks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Remove unused imports
* Return created flag from acquire
* Guard connection pool behind --enable-conn-pool flag
* Flag belongs within connection pool class
* spelling
* self.upstream = None only for pool config
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add FAQ: OSError when wrapping client for TLS Interception
* Silence exception log for several valid "cert verification failed" by client during tls interception
* Lint checks
* Move exception handling within wrap_server/wrap_client methods
* Lint fixes
* Use certifi/cacert.pem as default --ca-file flag value
* Address tests after DEFAULT_CA_FILE change
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Responses can have None body, remove assertions, update modify chunk plugin to not modify chunks for responses with no content
* Address mypy warning after removing assertion
* Reusable get_body_or_chunks
* Order methods by public/private, mark private ones with _ prefix
* HttpParser.url deprecation notice (renamed to _url). Add zero-copy todo
* Use suggested fix in #683 to remove pytest ignore
* Handle should not flush now which can block, instead let base tcp handler do its magic
* test speed up, doc string, logging enhancements
* Move macOS to the end of workflows
* Fix mypy warnings
* Rename .server to .upstream
* Lint fixes
* Mark internal methods with _ prefix
* Fix broken test
* lint changes
* Wah, double client :D
* Avoid selector initialization for threadless mode
* remove unused imports
* Now HttpProtocolHandler implements BaseTcpServerHandler
* Consistent return and guard againt upstream.closed
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* AcceptorPool as context manager
* Group multiprocessing imports together
* Use com.jaxl bundle identifier as proxy.py will eventually move under jaxl org
* revisit devtools integration :)
* Emit all necessary events for devtools integration
* Lint fixes
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Rename is_py3 to is_py2 for more logical guard
* Add stubs for missing tests, add few more tests for core modules
* Lint fixes
* Line too long fix
* Remove unnecessary KeyboardInterrupt
* Consistent workflow names
* Update homebrew formulae. Doesnt seems to work now
* test_enable_dashboard and test_enable_events
* test_enable_dashboard and test_enable_events
* Fix problem where empty plugin string was passed as plugin module
* test_enable_devtools and remove redundant guards for None and "" which was there due to a bug
* Remove autopep8, is redundant now after recent CI changes
* Add pyenv .python-version to .gitignore
* Update year
* Add lib-pytest target so that pytest can run in isolation
* Add git-push hook which will also run the lint.
By default now git-pre-commit hook will only run pytest.
* Update outdated sections of README
* Update requirement to match setup.cfg install_requires
* Deprecate proxy.start and TestCase.PROXY_PORT
Proxy port during test is now available as self.PROXY.pool.flags.port.
Also now TestCase utilize ephemeral port strategy instead of
calling get_available_port utility method.
* Rename to git-pre-push
* Ideally public repo dont require CODECOV_TOKEN but codecov integration is broken since introduction of codecov-action@v2 (instead of codecov binary invocation)
* Issue is possibly with codecov@v2 action, fallback to codecov. See https://github.com/abhinavsingh/proxy.py/runs/4110423084\?check_suite_focus\=true and https://github.com/codecov/uploader/issues/223
* Revert back to v2
* Async proxy pool
* Async proxy pool
* Late upstream initialization and exception guards
* Close upstream proxy connection on client connection close
* Refactor into EventManager
* Fix tests accounting in the event manager
* Ensure each process initializes logger
* pragma no cover
* Teardown connection when proxy pool upstream proxy closes
* Add ability to customize access log format and add additional context to it
* Maintain total size for response bytes in access logs
* Fix tests broken due to new plugin methods missing mock
* Update pubsub_eventing to use EventManager to avoid entire bootstrapping step
* Build docker from 3.10-alpine
* Bump version to 3.4.0
* Add instructions for how to run dashboard
* Order of menu
* Override dashboard png path until submitted
* Add some doc string for top-level Proxy class. Also some TODOs and warnings regarding PID file overwrite
* Allow HttpProxyBasePlugin implementations to register custom descriptors for read/write events
* Remove hardcoded adblock regex into json config. Update upstream filter to block facebook, not google
* ProxyPoolPlugin and ReverseProxyPlugin must now be updated to use get/read/write descriptor APIs
* Add get/read/write descriptor API for HttpWebServerBasePlugin too
* Surface actual listening port via flags.port
* 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
* Allow plugins to add custom command line flags. Addresses #301
* Reduce dependency over Flags class. This will be deprecated so that adhoc flags can be added without any additional manual configuration
* Fix: Argument 1 to "mock_default_args" of "TestMain" has incompatible type "Namespace"; expected "Mock"
* Reduce Flags class to just the initializer.
* Store list of action dest in FlagParser
* 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>
* 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
* Better document acceptor module and add a TCP Echo Server example
* autopep8 formating
* Rename ThreadlessWork --> Work class
* Make initialize, is_inactive and shutdown as optional interface methods.
Also introduce Readables & Writables custom types.
* Move websocket code into its own module
* Add websocket client example
* Cleanup websocket client
* Update to latest code signing recommendations
* Move HttpProtocolHandlerPlugin into separate file
* Dont add subject attributes if not provided by upstream. Also handle subprocess.TimeoutExpired raised during certificate generation. Instead of retries, we simply close the connection on timeout
* Remove plugin specific flag initialization methods for now
* 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
* Add tests for public/private/csr generation
* Add integration testing skeleton for mac and ubuntu
* Merge integration within lib test to avoid too many workflows
* Disable integration testing on windows for now
* Use sudo to start integration test script as lsof fails on MacOS.
lsof: WARNING: can't stat() vmhgfs file system
* Add basic integration testing for now to assert proxy works as expected when started out of develop branch
* Add a call to inbuilt http server to verify it works
* wait for server to accept requests
* Stash current changes
* Refactor into connection module
* Response parser state complete when no body expect
* Raise NotImplementedError if invalid state reached within parser
* 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
* Add homebrew formula
* Build PyPi package and Homebrew installation verification
* Check develop
* bdist_wheel reported as error: invalid command "bdist_wheel"
* Move under stable/develop folders to keep Proxy class name same
* uff
* develop installs proxy not proxy.py binary
* Prepend site-packages
* Install typing-extensions explicitly with brew
* Use find_packages
* Most likely failing due to lack of find_packages in current develop branch
* Fix windows setup.py build
* test_static_web_server_serves seems flaky on Ubuntu python 3.8
* Add instructions to install using homebrew
* Disable test_static_web_server_serves on GitHub actions, seems flaky
* Update shortlink gif name
* Conditionally run workflows as necessary
* Use pytest
* It works but github workflow is not reporting any status :(
* Separate out badges
* Add python_requires to setup.py