* Changes for Python 3.11 support
* Updated README.md for versioning info
* Update `httpx==0.27.0` to avoid `cgi` deprecation warning from pytest on Python 3.11
* Make tests work for 3.11
* Declare support for 3.11
* Use 3.11-alpine for Docker images
* Preserve pylint version for `python_version <= 3.10`
* Preserve httpx version for <= 3.10
* `httpx` usage fix in tests for <=3.10
* Adjust pylint and pytest for >= 3.11
* Use 3.11.8, bad-option-value and httpx proxies fix
* tox for 3.11
* Fix for `TOXENV: py`
* -vv for pytest
* Downgrade to `pytest-asyncio==0.21.1`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* remove asyncio_mode=strict
* try with `pytest-cov==4.1.0` for 3.11
* bump coverage for 3.11
* Try `3.11` in GitHub workflow which installs >3.11.8 unavailable via pyenv yet
* Revert back to `-v`
---------
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* isort `proxy.py` main class
* isort init and main
* isort common
* pre-commit fix
* isort dashboard and testing
* isort plugins
* isort core
* Only sort top level http py files
* isort http exception and websocket
* Remove proxy auth plugin from proxy package exports and force discover `PLUGIN_PROXY_AUTH` flags
* isort parser and web server
* no setattr
* isort all
* Enable pre-commit isort hook
* [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>
* Add TLS interception integration tests
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix CI
* unused
* Well 3.9 just worked locally
* Dispatching empty byte to client results in OSError for Python < 3.10
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Uncomment old integration tests
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Hook connection pool lifecycle within threadless
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix test
* Fix spell
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Tie connection pool into Threadless
* Pass upstream conn pool reference to work instances
* Mark upstream conn pool as optional
* spellcheck
* Fix unused import
* Use `Url` class to parse proxy pool entries
* Add support for parsing user:pass from raw url bytes
* Add `httpHeaders.PROXY_AUTHORIZATION` headers for upstream proxies
* Add support for httpHeaders enum
* Send base64 encoded proxy authorization header to upstream proxies
* mypy fixes
* Document proxy pool authentication support usage info
* Bail out of lock earlier
* Avoid calling `get_events` for unfinished work tasks. Use `cached_property` for `HttpParser` optimization
* Add `type: ignore[no-any-return]`, odd scenario
* We dont have to rebuild response packet repeatedly within `WebServerPlugin`
* Parse line and header in one invocation
* Minor optimizations and update benchmark to use `oha` instead of `hey`
* Remove `flask` from benchmark, only benchmark `asgi` or `async` based libraries. Use `uvicorn` and 10 workers for `blacksheep`. Use `oha` instead of `hey`
* Add benchmark for `starlette`
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Add missing dep
* pre-commit
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Use threads for delegation. Now `run_once` lock before `accept` not `select`
* Add support to use master proxy within proxy pool plugin. When used, proxy pool plugin will be a no-op for the master node
* Fix acceptor tests now that mask is being used
* Use `cached_property` for web server routes
* Use `select(timeout=1)` otherwise acceptor wont join if total blocking
* mypy, flake, doc spell fixes
* R0205: Class `cached_property` inherits from object, can be safely removed from bases in python3 (useless-object-inheritance)
* Add `TcpUpstreamConnectionHandler` which can be used as standalone or as mixin
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* `TcpUpstreamConnectionHandler` is now an abstract class
* Fix mypy
* `nitpick_ignore` the `proxy.core.base.tcp_upstream.TcpUpstreamConnectionHandler` class
* Add mypy exception for now
* Fix flake
* Fix docstring
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Remove abstractmethod for proxy plugin base class, remove unused methods from bundled plugins
* Move httpStatusCodes, httpMethods and Url within top-level proxy.http package
* Custom Url parser for our needs
* lint fix
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix proxy_pool plugin as scheme can be None if not present in the Url
* Address the ambiguous ipv6:port scenario along with valid cases
* lint checks
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* docstring
* Abstract into `http.parser` module
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* Fix#398 HTTP/1.0 related issue
* lint checks
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* deprecate server_file_or_404
* Optionally compress static content. Currently only if content length higher than 300
* trailing comma
* Allow `--plugins` flag to be used multiple times
Following are valid invocation:
1) `--plugins A`
2) `--plugins A,B`
3) `--plugins A --plugins B`
4) `--plugins A,B --plugins C`
* mypy
* Flake8
* [pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
* correct type
* Add `HttpParser.is_https_tunnel()` utility method
* mypy
* lint checks
* [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>
* 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