-
-
Notifications
You must be signed in to change notification settings - Fork 591
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* TLS intercept conditionally * Lint fixes * Fix test assertions * Fix tests * Bump `sphinxcontrib-spelling == 8.0.0` due to deprecated pypi XML APIs, ref pypi/warehouse#16642 * Disable spellcheck-docs for now until we have a clear path forward
- Loading branch information
1 parent
a51ddaa
commit f5f18e4
Showing
5 changed files
with
43 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# -*- coding: utf-8 -*- | ||
""" | ||
proxy.py | ||
~~~~~~~~ | ||
⚡⚡⚡ Fast, Lightweight, Pluggable, TLS interception capable proxy server focused on | ||
Network monitoring, controls & Application development, testing, debugging. | ||
:copyright: (c) 2013-present by Abhinav Singh and contributors. | ||
:license: BSD, see LICENSE for more details. | ||
""" | ||
from ..http.proxy import HttpProxyBasePlugin | ||
from ..http.parser import HttpParser | ||
|
||
|
||
class TlsInterceptConditionallyPlugin(HttpProxyBasePlugin): | ||
"""TLS intercept conditionally.""" | ||
|
||
def do_intercept(self, request: HttpParser) -> bool: | ||
if request.host == b'httpbin.org': | ||
return False | ||
return super().do_intercept(request) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters