Skip to content

Conversation

@abhinavsingh
Copy link
Owner

@abhinavsingh abhinavsingh commented Jan 1, 2022

  1. Added workflows to automatically publish containers to GHCR and DockerHub
  2. Separate container releases for only proxy.py and proxy.py with openssl. Later is necessary when using TLS interception with containers
  3. --local-executor is now enabled by default. To disable it, use --local-executor 0
  4. Work now define a generic work interface. Previously tied to TcpClientConnection based work.
  5. Added a proxy.http.responses utility. See methods now used throughout proxy.py for HTTP response packet generation. It also provides automatic compression based upon --min-compression-length flag.
  6. Added TlsParser implementation. Will be used by UpstreamConnectionPool and elsewhere for SSL/TLS customizations/modifications
  7. proxy.py now default listens on 127.0.0.1, not ::1. That is IPv4 is made default again. Issue is most linux system clients still fail with IPv6 out-of-box.
  8. Added UpstreamConnectionPool lifecycle support within Work. Now every work has access to UpstreamConnectionPool which can be used to efficiently manage connections to upstream servers. UpstreamConnectionPool are currently managed one-per-cpu-core and not shared among all proxy.py acceptors.
  9. Added message to HttpProtocolException based classes for helpful information without entire stacktrace.
  10. Optimize HttpProtocolHandler pick of plugin for processing an incoming HTTP protocol based work. Underlying work implementations can then easily handle WEB_SERVER, HTTP_PROXY, SOCKS_PROXY sub-protocols. Previously, core used to iterate over all sub-protocol plugins and depend upon them to bail out if request doesn't match their sub-protocol specifications.
  11. If no matching sub-protocol implementation exists, now HttpProtocolHandler returns BAD_REQUEST_RESPONSE. Previously in such scenario client connections would hang until timeout occurs.
  12. Fixed a bug with PACFilePlugin when custom --pac-file-url-path was specified
  13. Url class can now also parse authentication information from the raw urls.
  14. Added ProgramNamePlugin
  15. proxy.py now registers for SIGINT, SIGTERM signals and performs a clean shutdown. Previously, proxy.py acceptors could have been left running, even after the parent process terminates.

abhinavsingh and others added 22 commits December 21, 2021 22:32
Avoid registering invalid FD with selectors
…#897)

* 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
* Add `conn_close` kwarg to packet builder utilities, passing True will automatically add `Connection: close` header

* Add `conn_close` to `HttpRequestRejected` responses
* Raise `HttpProtocolException` instead of `ValueError` for clean teardown of the offending connection

* Fix circular import errors

* Fix tests

* fix lint errors

* Avoid containerizing until check has passed
* Add response pkt utility

* Unused import

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix tests as some content is now by default gzipped based upon min compression config

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove unused

* Update necessary tests to use `okResponse` utility

* Add option to explicitly disable compression

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* Add `ProgramNamePlugin`

* Update readme

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Remove `_compat.py`

* Add suggestions coming from #659

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* do it

* Change defaults

* integrate with ci/cd updates

* Fix ci

* Add dockerfile `SKIP_OPENSSL` option which will allow us to build container without openssl

* Skip openssl for latest tag, add another openssl tag for images with openssl support

* Push separate openssl image to GHCR for every PR
…on` (#906)

* Work can also be TcpServerConnection, not just TcpClientConnection.  More over, it can be any generic work type

* Add py_class_role and py_obj

* Port internal integration tests into public repo

* Fix proxy py addr

* Use cross-platform compat shasum
* Convert `--local-executor` in an integer flag, defaults to 1 i.e. enabled, use 0 to disable

* Consider any value other than 1 as remote mode

* Use integer to disable local executor mode in integration tests

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Fix mypy errors

* Update flags in readme

* Check for type

* Remove pid file check for now

* Update `--local-executor` flag usage

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
* sys.exit on SIGINT, SIGHUP, SIGTERM

* Add todo for pending signal actions

* SIGHUP is win only

* Remove frametype signature as it causes lint issues and we are not using it anyways

* SIGQUIT is not on Win
* Fix `HttpWebServerPacFilePlugin` broken routes logic

* lint
* Tie connection pool into Threadless

* Pass upstream conn pool reference to work instances

* Mark upstream conn pool as optional

* spellcheck

* Fix unused import
* Define work lifecycle events for pool

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Use isinstance

* Use mocker fixture to pass CI on 3.6 and 3.7

* [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>
* 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>
Bumps [sphinx](https://github.com/sphinx-doc/sphinx) from 4.3.1 to 4.3.2.
- [Release notes](https://github.com/sphinx-doc/sphinx/releases)
- [Changelog](https://github.com/sphinx-doc/sphinx/blob/4.x/CHANGES)
- [Commits](sphinx-doc/sphinx@v4.3.1...v4.3.2)

---
updated-dependencies:
- dependency-name: sphinx
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
* Add `protocols` abstract static method to `HttpProtocolHandlerBase` which defines which HTTP specification is followed by the core plugin

* lint

* Fix tests

* Lint fixes

* [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>
* Refactored TlsParser based upon work done in #748

* Add missing `tls_server_hello.data`, thanks to @JerryKwan

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Pass `check.py`

* Run check.py locally

* Fix lint errors

* Fix indentation issue

* Ignore linkcheck for cloudflare links, GHA is getting a 403 reply, while the link actually works

* Fix lint

* codespell skip

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Bumps [tox](https://github.com/tox-dev/tox) from 3.24.4 to 3.24.5.
- [Release notes](https://github.com/tox-dev/tox/releases)
- [Changelog](https://github.com/tox-dev/tox/blob/master/docs/changelog.rst)
- [Commits](tox-dev/tox@3.24.4...3.24.5)

---
updated-dependencies:
- dependency-name: tox
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
Bumps [twine](https://github.com/pypa/twine) from 3.7.0 to 3.7.1.
- [Release notes](https://github.com/pypa/twine/releases)
- [Changelog](https://github.com/pypa/twine/blob/main/docs/changelog.rst)
- [Commits](pypa/twine@3.7.0...3.7.1)

---
updated-dependencies:
- dependency-name: twine
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
@abhinavsingh abhinavsingh added the bot:chronographer:skip PR using this label is exempted from CHANGELOG management label Jan 1, 2022
@codecov
Copy link

codecov bot commented Jan 1, 2022

Codecov Report

Merging #929 (4b915c9) into master (2784cfb) will decrease coverage by 0.76%.
The diff coverage is 75.49%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #929      +/-   ##
==========================================
- Coverage   87.03%   86.27%   -0.77%     
==========================================
  Files         129      142      +13     
  Lines        5787     6353     +566     
  Branches      580      636      +56     
==========================================
+ Hits         5037     5481     +444     
- Misses        645      755     +110     
- Partials      105      117      +12     
Flag Coverage Δ
pytest 86.11% <75.37%> (-0.77%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
proxy/common/types.py 100.00% <ø> (ø)
proxy/core/acceptor/executors.py 90.00% <ø> (ø)
proxy/core/event/dispatcher.py 66.00% <0.00%> (+4.88%) ⬆️
proxy/core/event/subscriber.py 74.41% <0.00%> (+1.69%) ⬆️
proxy/plugin/filter_by_client_ip.py 71.42% <ø> (ø)
proxy/plugin/filter_by_upstream.py 85.71% <ø> (ø)
proxy/plugin/filter_by_url_regex.py 74.28% <0.00%> (+0.60%) ⬆️
proxy/plugin/reverse_proxy.py 46.66% <0.00%> (+1.01%) ⬆️
tests/core/test_acceptor.py 100.00% <ø> (ø)
...ests/http/exceptions/test_http_request_rejected.py 100.00% <ø> (ø)
... and 69 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 2784cfb...4b915c9. Read the comment docs.

@abhinavsingh abhinavsingh merged commit 111ec38 into master Jan 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:skip PR using this label is exempted from CHANGELOG management

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants