Commit Graph

719 Commits

Author SHA1 Message Date
Abhinav Singh 77b69e6660
[Devtools] Build as part of GHA workflow (#1015)
* Fix devtools build

* Build devtools as part of GHA workflows
2022-01-20 11:46:27 +05:30
Abhinav Singh 7beef281c6
[Coverage] For newly added components (#1014)
* Add newly added code cov

* Fix spelling
2022-01-20 11:45:29 +05:30
Abhinav Singh b40b91f289
[Doc] Threadless Remote vs Local Execution Mode (#1011) 2022-01-20 09:34:05 +05:30
Abhinav Singh efd1cac3ea
Restrict request handling to `DEFAULT_ALLOWED_URL_SCHEMES` (#1002)
* Raise `HttpProtocolException` if request line scheme do not match `DEFAULT_ALLOWED_URL_SCHEMES`

* ignore WPS329

* Fix tests

* Pin to 4.3.2

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

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

* Test coverage for exception handling

* type ignore

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-19 19:20:19 +05:30
Sowmya Sudha Singh d046cea71c
[Windows] `--threaded` mode integration tests works locally but fails on GHA (#1009)
* Enable remote threadless and threaded integration test for windows

* Run only threaded on windows

* Use powershell for execution of integration script on Windows

* Update test_integration.py

* Update test_integration.py

Co-authored-by: sowmyasudhasingh <sowmyasudhasingh@gmail.com>
Co-authored-by: Abhinav Singh <126065+abhinavsingh@users.noreply.github.com>
2022-01-19 18:51:27 +05:30
Sowmya Sudha Singh f7b9458005
Fix broken `--local-executor` logic for windows ever since it was made default (#1008)
Co-authored-by: sowmyasudhasingh <sowmyasudhasingh@gmail.com>
2022-01-19 15:19:48 +05:30
dependabot[bot] 7206a5d00f
npm: bump ws from 8.4.0 to 8.4.2 in /dashboard (#1007)
Bumps [ws](https://github.com/websockets/ws) from 8.4.0 to 8.4.2.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.4.0...8.4.2)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  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>
2022-01-19 09:36:42 +05:30
dependabot[bot] 2cba03eae0
npm: bump eslint-plugin-import from 2.25.3 to 2.25.4 in /dashboard (#1005)
Bumps [eslint-plugin-import](https://github.com/import-js/eslint-plugin-import) from 2.25.3 to 2.25.4.
- [Release notes](https://github.com/import-js/eslint-plugin-import/releases)
- [Changelog](https://github.com/import-js/eslint-plugin-import/blob/main/CHANGELOG.md)
- [Commits](https://github.com/import-js/eslint-plugin-import/compare/v2.25.3...v2.25.4)

---
updated-dependencies:
- dependency-name: eslint-plugin-import
  dependency-type: direct:development
  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>
2022-01-18 14:55:55 +05:30
Abhinav Singh 21499ad1cb
Bail out early for non-HTTP but HTTP looking protocols (#972)
* Add support in `Url` to parse all types of schemes

* .

* Guard handler against http looking protocol but not web or proxy requests

* Fix condition for web server protocol detection

* doc happy

* Update flags and type check imports only
2022-01-18 00:11:48 +05:30
Abhinav Singh 552fb998df
[Middleware] `HttpClientConnection` preparation (#995)
* Turn usual suspects to warnings, not error

* Add `HttpClientConnection` skeleton

* Fix doc build

* Update references in http tests

* Make `work` core agnostic to work object construction by adding an abstract static method to `Work` interface called `create`

* Make mypy happy

* Fix tests broken due to change in how work objects are now constructed

* Doc ko bhi happy karo
2022-01-16 18:34:33 +05:30
Abhinav Singh c6fceb639a
[Middleware] Capability in the core to allow custom client connection classes (#993)
* Move all TCP server related flags within `tcp_server.py` and also move the encryption functionality within TCP base server

* Templatize `BaseTcpServerHandler` which now expects a client connection object bound to `TcpClientConnection`.  This will allow for custom `HttpClientConnection` object in future to be used by `HttpProtocolHandler`

* Pass necessary flags to allow self-signed certificates

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

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

* fix https integration tests

* Affected by https://github.com/abhinavsingh/proxy.py/issues/994

* Fix docs

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-16 03:22:55 +05:30
Abhinav Singh d17dc9e448
[SshTunnel] WIP (#992)
[SshTunnel] WIP
2022-01-16 00:22:34 +05:30
Abhinav Singh 4222172d01
Expose `sleep_loop` for documentation and demo (#991)
Expose `sleep_loop` for documentation and demo
2022-01-14 20:15:54 +05:30
Abhinav Singh e7e0315ece Expose sleep_loop 2022-01-14 19:50:17 +05:30
Abhinav Singh 14c3ce29c5 Fix README instructions for embedded mode 2022-01-14 19:10:57 +05:30
Abhinav Singh 177689c156
v2.4.0rc6 (#964)
* Remove menubar (#930)

Remove `menubar`

* Use `128 KB` as default value for `DEFAULT_BUFFER_SIZE` (#926)

* Add `TlsInterception` acceptance test

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

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

* Generate CA cert if not available

* Fix lint and tests

* Fix args

* Remove acceptance tests for now

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

* pip prod(deps): bump wheel from 0.37.0 to 0.37.1 (#934)

Bumps [wheel](https://github.com/pypa/wheel) from 0.37.0 to 0.37.1.
- [Release notes](https://github.com/pypa/wheel/releases)
- [Changelog](https://github.com/pypa/wheel/blob/main/docs/news.rst)
- [Commits](https://github.com/pypa/wheel/compare/0.37.0...0.37.1)

---
updated-dependencies:
- dependency-name: wheel
  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>

* npm: bump jasmine from 3.10.0 to 4.0.0 in /dashboard (#933)

Bumps [jasmine](https://github.com/jasmine/jasmine-npm) from 3.10.0 to 4.0.0.
- [Release notes](https://github.com/jasmine/jasmine-npm/releases)
- [Commits](https://github.com/jasmine/jasmine-npm/compare/v3.10.0...v4.0.0)

---
updated-dependencies:
- dependency-name: jasmine
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm: bump ws from 8.3.0 to 8.4.0 in /dashboard (#936)

Bumps [ws](https://github.com/websockets/ws) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.3.0...8.4.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pip prod(deps): bump types-paramiko from 2.8.4 to 2.8.6 (#937)

Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>

* `DescriptorsHandlerMixin` and `Descriptors`, `SelectableEvents` types (#938)

* Add `Descriptors` type

* Add a `DescriptorsHandlerMixin` class used throughout the http framework

* Remove dependency upon `HasFileno` ie `typing_extension` too

* Define `SelectableEvents` type

* Fix doc

* Blank line

* Remove dep on `typing-extensions`

* Discover base plugin class

* await on now async handlers

* Fix doc spell

* Add `--port-file` flag (#942)

* Add `--port-file` flag

* Use `--port-file` flag for integration tests using `get_available_port`

* Use temp dir

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

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

* Fix `base_klass` variable related lint issues

* Fix main tests

* Fix integration

* Use timeout when terminating proc

* Skip integration on win instead of xmark

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

* Expose `UpstreamConnectionPool` to web & proxy plugins (#946)

* Expose conn pool to plugins

* Fix reusable state handling

* Separate `release` and `retain` methods

* Fix conn pool tests

* Fix tests

* npm: bump chrome-devtools-frontend in /dashboard (#949)

Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.952865 to 1.0.956881.
- [Release notes](https://github.com/ChromeDevTools/devtools-frontend/releases)
- [Changelog](https://github.com/ChromeDevTools/devtools-frontend/blob/main/docs/release_management.md)
- [Commits](https://github.com/ChromeDevTools/devtools-frontend/commits)

---
updated-dependencies:
- dependency-name: chrome-devtools-frontend
  dependency-type: direct:development
  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>

* pip prod(deps): bump sphinxcontrib-towncrier from 0.2.0a0 to 0.2.1a0 (#941)

Bumps [sphinxcontrib-towncrier](https://github.com/sphinx-contrib/sphinxcontrib-towncrier) from 0.2.0a0 to 0.2.1a0.
- [Release notes](https://github.com/sphinx-contrib/sphinxcontrib-towncrier/releases)
- [Commits](https://github.com/sphinx-contrib/sphinxcontrib-towncrier/compare/v0.2.0a0...v0.2.1a0)

---
updated-dependencies:
- dependency-name: sphinxcontrib-towncrier
  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>

* `isort` everything except lib (for now) (#952)

* isort the tests folder

* Carry over changes from #672

* Disable pre-commit

* Revert flake8 config change

* isort examples too

* pip prod(deps): bump httpx from 0.20.0 to 0.21.3 (#951)

Bumps [httpx](https://github.com/encode/httpx) from 0.20.0 to 0.21.3.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/httpx/compare/0.20.0...0.21.3)

---
updated-dependencies:
- dependency-name: httpx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>

* Decouple transport framework from dashboard plugin (#953)

* Decouple transport framework from dashboard plugin

* Move `InspectTrafficPlugin` within `http.inspector` module

* Avoid exporting plugins within `__init__.py` files

* Use `/transport/` prefix to avoid #945 conflict issue

* Add todo

* Build containers in parallel and pre-check (#954)

* Build containers in parallel and pre-check

* Fix loop in workflow

* Test container needs build

* Invoke `WebSocketTransportBasePlugin` connected and disconnected callbacks (#956)

* [HttpProtocolHandler] Handle invalid request parsing exceptions (#957)

* Handle invalid request parsing exception when raised, log the bytes for later inspection

* [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>

* npm: bump jasmine-ts from 0.3.0 to 0.4.0 in /dashboard (#958)

Bumps [jasmine-ts](https://github.com/svi3c/jasmine-ts) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/svi3c/jasmine-ts/releases)
- [Changelog](https://github.com/svi3c/jasmine-ts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svi3c/jasmine-ts/commits/v0.4.0)

---
updated-dependencies:
- dependency-name: jasmine-ts
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Ignore `utf-8` decoding errors within event core (#961)

* [WebServer] Refactor routing to allow same path for websocket and web requests (#962)

* Switch to WS

* Refactor

* Ignore utf-8 decode error during logging (#966)

* On-demand `TlsInterception` capability, driven by plugins (#965)

* Add `TlsInterceptionPropertyMixin`

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

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

* Add `do_intercept` hook

* call super init

* No super from mixin as it is followed by abc?

* type ignore

* spell

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

* [WebServer] Fix routing (#968)

* Fix web server routing

* Fix mypy

* pip prod(deps): bump furo from 2021.11.23 to 2022.1.2 (#959)

Bumps [furo](https://github.com/pradyunsg/furo) from 2021.11.23 to 2022.1.2.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2021.11.23...2022.01.02)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>

* pip prod(deps): bump paramiko from 2.9.1 to 2.9.2 (#970)

Bumps [paramiko](https://github.com/paramiko/paramiko) from 2.9.1 to 2.9.2.
- [Release notes](https://github.com/paramiko/paramiko/releases)
- [Changelog](https://github.com/paramiko/paramiko/blob/main/NEWS)
- [Commits](https://github.com/paramiko/paramiko/compare/2.9.1...2.9.2)

---
updated-dependencies:
- dependency-name: paramiko
  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>

* Test submodule and refactor (#971)

* Refactor tests into submodules

* isort tests

* Add malicious request headers test

* [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>

* Handle `OSError` on shutdown & `TimeoutError` on recv (#974)

* Expect `TimeoutError` during `recv`

* Expect `OSError` during socket shutdown, can happen if other end has already closed the socket

* pip prod(deps): bump mypy from 0.920 to 0.931 (#976)

Bumps [mypy](https://github.com/python/mypy) from 0.920 to 0.931.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.920...v0.931)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* npm: bump @types/jquery from 3.5.4 to 3.5.13 in /dashboard (#975)

Bumps [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) from 3.5.4 to 3.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

---
updated-dependencies:
- dependency-name: "@types/jquery"
  dependency-type: direct:development
  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>

* Refactor into separate `Work` module (#977)

* work module

* Fix imports

* String based typing for multiprocessing.synchronize

* Fix `test_accepts_client_from_server_socket`

* Move staticmethod outside of threadless pool class

* Fix doc build

* Fix test mock

* mp grouped together

* pylint happy

* import only for type checking

* doc build

* wrong import order

* Type fixes (#979)

* Type fixes

* Type fix

* Py class role

* unused any import

* [TlsInterception] GHA integration tests (#981)

* Add TLS interception integration tests

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

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

* Fixture to gen certificate once for the `test_integration` module

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

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

* Use https endpoints in tls interception tests

* Fix modify post data integration test

* Only start 3 acceptor & 3 workers during integration run

* disable chunk response

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

* npm: bump typescript from 3.9.7 to 4.5.4 in /dashboard (#982)

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* pip prod(deps): bump types-paramiko from 2.8.6 to 2.8.9 (#983)

Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.6 to 2.8.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>

* Pass separate `--ca-cert-dir` flag for parallel TLS interception tests (#984)

* Pass separate `--ca-cert-dir` flag for parallel TLS interception tests

* Temp disable `test_modify_post_response_integration`

* mock ca cert dir

* Is threaded an issue with TLS interception?

* Disable modify chunk response for python < 3.10

* Disable modify chunk response for python < 3.10

* [TlsInterception] Fix broken `ChunkedResponsePlugin` for `Python < 3.10` (#986)

* 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>

* Add `# pragma: no cover` for unnecessary code (#987)

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 15:32:44 +05:30
Abhinav Singh 38eab69baf
Add `# pragma: no cover` for unnecessary code (#987) 2022-01-14 15:13:14 +05:30
Abhinav Singh 0ffa7ca9fb
[TlsInterception] Fix broken `ChunkedResponsePlugin` for `Python < 3.10` (#986)
* 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>
2022-01-14 14:35:28 +05:30
Abhinav Singh 2714d3d22a
Pass separate `--ca-cert-dir` flag for parallel TLS interception tests (#984)
* Pass separate `--ca-cert-dir` flag for parallel TLS interception tests

* Temp disable `test_modify_post_response_integration`

* mock ca cert dir

* Is threaded an issue with TLS interception?

* Disable modify chunk response for python < 3.10

* Disable modify chunk response for python < 3.10
2022-01-14 12:02:17 +05:30
dependabot[bot] 8f51ce304b
pip prod(deps): bump types-paramiko from 2.8.6 to 2.8.9 (#983)
Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.6 to 2.8.9.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>
2022-01-14 10:51:00 +05:30
dependabot[bot] 06e1ffc1f3
npm: bump typescript from 3.9.7 to 4.5.4 in /dashboard (#982)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 3.9.7 to 4.5.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v3.9.7...v4.5.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-major
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-14 10:46:54 +05:30
Abhinav Singh 8a28910224
[TlsInterception] GHA integration tests (#981)
* Add TLS interception integration tests

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

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

* Fixture to gen certificate once for the `test_integration` module

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

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

* Use https endpoints in tls interception tests

* Fix modify post data integration test

* Only start 3 acceptor & 3 workers during integration run

* disable chunk response

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-14 00:08:12 +05:30
Abhinav Singh 41ba50443d
Type fixes (#979)
* Type fixes

* Type fix

* Py class role

* unused any import
2022-01-13 18:55:07 +05:30
Abhinav Singh dd2476f02a
Refactor into separate `Work` module (#977)
* work module

* Fix imports

* String based typing for multiprocessing.synchronize

* Fix `test_accepts_client_from_server_socket`

* Move staticmethod outside of threadless pool class

* Fix doc build

* Fix test mock

* mp grouped together

* pylint happy

* import only for type checking

* doc build

* wrong import order
2022-01-13 16:07:51 +05:30
dependabot[bot] f0d39eb00d
npm: bump @types/jquery from 3.5.4 to 3.5.13 in /dashboard (#975)
Bumps [@types/jquery](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/jquery) from 3.5.4 to 3.5.13.
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/jquery)

---
updated-dependencies:
- dependency-name: "@types/jquery"
  dependency-type: direct:development
  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>
2022-01-13 12:55:47 +05:30
dependabot[bot] fcdcf89932
pip prod(deps): bump mypy from 0.920 to 0.931 (#976)
Bumps [mypy](https://github.com/python/mypy) from 0.920 to 0.931.
- [Release notes](https://github.com/python/mypy/releases)
- [Commits](https://github.com/python/mypy/compare/v0.920...v0.931)

---
updated-dependencies:
- dependency-name: mypy
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-13 12:55:23 +05:30
Abhinav Singh afd8c33a85
Handle `OSError` on shutdown & `TimeoutError` on recv (#974)
* Expect `TimeoutError` during `recv`

* Expect `OSError` during socket shutdown, can happen if other end has already closed the socket
2022-01-13 02:40:55 +05:30
Abhinav Singh 05a8ff9fe7
Test submodule and refactor (#971)
* Refactor tests into submodules

* isort tests

* Add malicious request headers test

* [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>
2022-01-13 00:36:37 +05:30
dependabot[bot] dea4b586e8
pip prod(deps): bump paramiko from 2.9.1 to 2.9.2 (#970)
Bumps [paramiko](https://github.com/paramiko/paramiko) from 2.9.1 to 2.9.2.
- [Release notes](https://github.com/paramiko/paramiko/releases)
- [Changelog](https://github.com/paramiko/paramiko/blob/main/NEWS)
- [Commits](https://github.com/paramiko/paramiko/compare/2.9.1...2.9.2)

---
updated-dependencies:
- dependency-name: paramiko
  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>
2022-01-12 22:30:41 +05:30
dependabot[bot] 2d0e591451
pip prod(deps): bump furo from 2021.11.23 to 2022.1.2 (#959)
Bumps [furo](https://github.com/pradyunsg/furo) from 2021.11.23 to 2022.1.2.
- [Release notes](https://github.com/pradyunsg/furo/releases)
- [Changelog](https://github.com/pradyunsg/furo/blob/main/docs/changelog.md)
- [Commits](https://github.com/pradyunsg/furo/compare/2021.11.23...2022.01.02)

---
updated-dependencies:
- dependency-name: furo
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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>
2022-01-12 21:55:12 +05:30
Abhinav Singh f53636d4e3
[WebServer] Fix routing (#968)
* Fix web server routing

* Fix mypy
2022-01-12 12:45:04 +05:30
Abhinav Singh 010e8f840d
On-demand `TlsInterception` capability, driven by plugins (#965)
* Add `TlsInterceptionPropertyMixin`

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

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

* Add `do_intercept` hook

* call super init

* No super from mixin as it is followed by abc?

* type ignore

* spell

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-12 11:19:35 +05:30
Abhinav Singh 7199459c69
Ignore utf-8 decode error during logging (#966) 2022-01-12 01:56:08 +05:30
Abhinav Singh a84ababb94
[WebServer] Refactor routing to allow same path for websocket and web requests (#962)
* Switch to WS

* Refactor
2022-01-12 00:05:55 +05:30
Abhinav Singh 474cce147a
Ignore `utf-8` decoding errors within event core (#961) 2022-01-11 23:05:19 +05:30
dependabot[bot] 67bf0493fb
npm: bump jasmine-ts from 0.3.0 to 0.4.0 in /dashboard (#958)
Bumps [jasmine-ts](https://github.com/svi3c/jasmine-ts) from 0.3.0 to 0.4.0.
- [Release notes](https://github.com/svi3c/jasmine-ts/releases)
- [Changelog](https://github.com/svi3c/jasmine-ts/blob/master/CHANGELOG.md)
- [Commits](https://github.com/svi3c/jasmine-ts/commits/v0.4.0)

---
updated-dependencies:
- dependency-name: jasmine-ts
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-11 14:16:37 +05:30
Abhinav Singh 01bfc7dc30
[HttpProtocolHandler] Handle invalid request parsing exceptions (#957)
* Handle invalid request parsing exception when raised, log the bytes for later inspection

* [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>
2022-01-11 02:27:19 +05:30
Abhinav Singh 1dba7f053c
Invoke `WebSocketTransportBasePlugin` connected and disconnected callbacks (#956) 2022-01-10 22:00:08 +05:30
Abhinav Singh 7d20e437b3
Build containers in parallel and pre-check (#954)
* Build containers in parallel and pre-check

* Fix loop in workflow

* Test container needs build
2022-01-10 20:41:09 +05:30
Abhinav Singh 32acdcb9fe
Decouple transport framework from dashboard plugin (#953)
* Decouple transport framework from dashboard plugin

* Move `InspectTrafficPlugin` within `http.inspector` module

* Avoid exporting plugins within `__init__.py` files

* Use `/transport/` prefix to avoid #945 conflict issue

* Add todo
2022-01-10 19:48:17 +05:30
dependabot[bot] 372a9edb44
pip prod(deps): bump httpx from 0.20.0 to 0.21.3 (#951)
Bumps [httpx](https://github.com/encode/httpx) from 0.20.0 to 0.21.3.
- [Release notes](https://github.com/encode/httpx/releases)
- [Changelog](https://github.com/encode/httpx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/encode/httpx/compare/0.20.0...0.21.3)

---
updated-dependencies:
- dependency-name: httpx
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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>
2022-01-10 14:01:43 +05:30
Abhinav Singh 35e9c57af7
`isort` everything except lib (for now) (#952)
* isort the tests folder

* Carry over changes from #672

* Disable pre-commit

* Revert flake8 config change

* isort examples too
2022-01-10 13:28:22 +05:30
dependabot[bot] 9344a54fbe
pip prod(deps): bump sphinxcontrib-towncrier from 0.2.0a0 to 0.2.1a0 (#941)
Bumps [sphinxcontrib-towncrier](https://github.com/sphinx-contrib/sphinxcontrib-towncrier) from 0.2.0a0 to 0.2.1a0.
- [Release notes](https://github.com/sphinx-contrib/sphinxcontrib-towncrier/releases)
- [Commits](https://github.com/sphinx-contrib/sphinxcontrib-towncrier/compare/v0.2.0a0...v0.2.1a0)

---
updated-dependencies:
- dependency-name: sphinxcontrib-towncrier
  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>
2022-01-10 12:56:16 +05:30
dependabot[bot] 8b1b619e6c
npm: bump chrome-devtools-frontend in /dashboard (#949)
Bumps [chrome-devtools-frontend](https://github.com/ChromeDevTools/devtools-frontend) from 1.0.952865 to 1.0.956881.
- [Release notes](https://github.com/ChromeDevTools/devtools-frontend/releases)
- [Changelog](https://github.com/ChromeDevTools/devtools-frontend/blob/main/docs/release_management.md)
- [Commits](https://github.com/ChromeDevTools/devtools-frontend/commits)

---
updated-dependencies:
- dependency-name: chrome-devtools-frontend
  dependency-type: direct:development
  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>
2022-01-10 12:38:03 +05:30
Abhinav Singh 9b2e7bba7d
Expose `UpstreamConnectionPool` to web & proxy plugins (#946)
* Expose conn pool to plugins

* Fix reusable state handling

* Separate `release` and `retain` methods

* Fix conn pool tests

* Fix tests
2022-01-08 23:18:19 +05:30
Abhinav Singh a2e1fc68a0
Add `--port-file` flag (#942)
* Add `--port-file` flag

* Use `--port-file` flag for integration tests using `get_available_port`

* Use temp dir

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

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

* Fix `base_klass` variable related lint issues

* Fix main tests

* Fix integration

* Use timeout when terminating proc

* Skip integration on win instead of xmark

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2022-01-06 02:08:23 +05:30
Abhinav Singh 4672dd9943 Fix doc spell 2022-01-05 00:40:15 +05:30
Abhinav Singh 0d1fe198d3
`DescriptorsHandlerMixin` and `Descriptors`, `SelectableEvents` types (#938)
* Add `Descriptors` type

* Add a `DescriptorsHandlerMixin` class used throughout the http framework

* Remove dependency upon `HasFileno` ie `typing_extension` too

* Define `SelectableEvents` type

* Fix doc

* Blank line

* Remove dep on `typing-extensions`

* Discover base plugin class

* await on now async handlers
2022-01-05 00:32:16 +05:30
dependabot[bot] 7d3eee0012
pip prod(deps): bump types-paramiko from 2.8.4 to 2.8.6 (#937)
Bumps [types-paramiko](https://github.com/python/typeshed) from 2.8.4 to 2.8.6.
- [Release notes](https://github.com/python/typeshed/releases)
- [Commits](https://github.com/python/typeshed/commits)

---
updated-dependencies:
- dependency-name: types-paramiko
  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>
2022-01-04 11:32:08 +05:30
dependabot[bot] 20ae6b02a5
npm: bump ws from 8.3.0 to 8.4.0 in /dashboard (#936)
Bumps [ws](https://github.com/websockets/ws) from 8.3.0 to 8.4.0.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.3.0...8.4.0)

---
updated-dependencies:
- dependency-name: ws
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-01-04 11:31:50 +05:30