[isort] Lib modules (#1016)
* 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>
This commit is contained in:
parent
77b69e6660
commit
54e74a911f
|
@ -7,12 +7,12 @@ repos:
|
|||
args:
|
||||
- --py36-plus
|
||||
|
||||
# - repo: https://github.com/timothycrosley/isort.git
|
||||
# rev: 5.10.0
|
||||
# hooks:
|
||||
# - id: isort
|
||||
# args:
|
||||
# - --honor-noqa
|
||||
- repo: https://github.com/timothycrosley/isort.git
|
||||
rev: 5.10.0
|
||||
hooks:
|
||||
- id: isort
|
||||
args:
|
||||
- --honor-noqa
|
||||
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks.git
|
||||
rev: v1.1.7
|
||||
|
@ -24,8 +24,7 @@ repos:
|
|||
helper/proxy\.pac|
|
||||
Makefile|
|
||||
proxy/common/pki\.py|
|
||||
README\.md|
|
||||
.+\.(plist|pbxproj)
|
||||
README\.md
|
||||
$
|
||||
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks.git
|
||||
|
@ -36,7 +35,6 @@ repos:
|
|||
exclude: |
|
||||
(?x)
|
||||
^
|
||||
\.github/workflows/codeql-analysis\.yml|
|
||||
dashboard/src/core/plugins/inspect_traffic\.json
|
||||
$
|
||||
- id: check-merge-conflict
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import uvicorn
|
||||
|
||||
from blacksheep.server import Application
|
||||
from blacksheep.server.responses import text
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"""
|
||||
import time
|
||||
import ipaddress
|
||||
|
||||
import proxy
|
||||
|
||||
|
||||
|
|
|
@ -9,10 +9,9 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import uvicorn
|
||||
|
||||
from starlette.applications import Starlette
|
||||
from starlette.responses import Response
|
||||
from starlette.routing import Route
|
||||
from starlette.responses import Response
|
||||
from starlette.applications import Starlette
|
||||
|
||||
|
||||
async def homepage(request): # type: ignore[no-untyped-def]
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import tornado.ioloop
|
||||
import tornado.web
|
||||
import tornado.ioloop
|
||||
|
||||
|
||||
# pylint: disable=W0223
|
||||
|
|
|
@ -2,9 +2,9 @@
|
|||
|
||||
from typing import List
|
||||
|
||||
from sphinx.util.nodes import nodes
|
||||
from sphinx.application import Sphinx
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
from sphinx.util.nodes import nodes
|
||||
|
||||
|
||||
class SpellingNoOpDirective(SphinxDirective):
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
"""Configuration for the Sphinx documentation generator."""
|
||||
|
||||
import sys
|
||||
from functools import partial
|
||||
from pathlib import Path
|
||||
from functools import partial
|
||||
|
||||
from setuptools_scm import get_version
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
import time
|
||||
|
||||
from proxy import Proxy
|
||||
from proxy.common.types import Readables, Writables, SelectableEvents
|
||||
from proxy.core.work import Work
|
||||
from proxy.common.types import Readables, Writables, SelectableEvents
|
||||
from proxy.core.connection import TcpClientConnection
|
||||
|
||||
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from .proxy import entry_point, main, Proxy, sleep_loop
|
||||
from .proxy import Proxy, main, sleep_loop, entry_point
|
||||
from .testing import TestCase
|
||||
|
||||
|
||||
__all__ = [
|
||||
# PyPi package entry_point. See
|
||||
# https://github.com/abhinavsingh/proxy.py#from-command-line-when-installed-using-pip
|
||||
|
|
|
@ -10,5 +10,6 @@
|
|||
"""
|
||||
from .proxy import entry_point
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
entry_point()
|
||||
|
|
|
@ -2,5 +2,6 @@
|
|||
# autogenerated on build and absent on mypy checks time
|
||||
from typing import Tuple, Union
|
||||
|
||||
|
||||
version: str
|
||||
version_tuple: Tuple[Union[int, str], ...]
|
||||
|
|
|
@ -12,9 +12,11 @@
|
|||
"""
|
||||
from typing import Tuple, Union
|
||||
|
||||
|
||||
try:
|
||||
# pylint: disable=unused-import
|
||||
from ._scm_version import version as __version__, version_tuple as _ver_tup # noqa: WPS433, WPS436
|
||||
from ._scm_version import version as __version__ # noqa: WPS433, WPS436
|
||||
from ._scm_version import version_tuple as _ver_tup # noqa: WPS433, WPS436
|
||||
except ImportError: # pragma: no cover
|
||||
from pkg_resources import get_distribution as _get_dist # noqa: WPS433
|
||||
__version__ = _get_dist('proxy.py').version # noqa: WPS440
|
||||
|
|
|
@ -10,9 +10,8 @@
|
|||
"""
|
||||
import time
|
||||
import threading
|
||||
|
||||
from typing import Any, Deque
|
||||
from queue import Empty
|
||||
from typing import Any, Deque
|
||||
from collections import deque
|
||||
|
||||
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
import os
|
||||
import sys
|
||||
import time
|
||||
import secrets
|
||||
import pathlib
|
||||
import secrets
|
||||
import platform
|
||||
import sysconfig
|
||||
import ipaddress
|
||||
|
||||
import sysconfig
|
||||
from typing import Any, List
|
||||
|
||||
from .version import __version__
|
||||
|
||||
|
||||
SYS_PLATFORM = platform.system()
|
||||
IS_WINDOWS = SYS_PLATFORM == 'Windows'
|
||||
|
||||
|
@ -150,9 +150,9 @@ DEFAULT_ABC_PLUGINS = [
|
|||
'HttpWebServerBasePlugin',
|
||||
'WebSocketTransportBasePlugin',
|
||||
]
|
||||
PLUGIN_PROXY_AUTH = 'proxy.http.proxy.AuthPlugin'
|
||||
PLUGIN_DASHBOARD = 'proxy.dashboard.ProxyDashboard'
|
||||
PLUGIN_HTTP_PROXY = 'proxy.http.proxy.HttpProxyPlugin'
|
||||
PLUGIN_PROXY_AUTH = 'proxy.http.proxy.auth.AuthPlugin'
|
||||
PLUGIN_WEB_SERVER = 'proxy.http.server.HttpWebServerPlugin'
|
||||
PLUGIN_PAC_FILE = 'proxy.http.server.HttpWebServerPacFilePlugin'
|
||||
PLUGIN_DEVTOOLS_PROTOCOL = 'proxy.http.inspector.devtools.DevtoolsProtocolPlugin'
|
||||
|
|
|
@ -16,20 +16,22 @@ import argparse
|
|||
import ipaddress
|
||||
import collections
|
||||
import multiprocessing
|
||||
from typing import Any, List, Optional, cast
|
||||
|
||||
from typing import Optional, List, Any, cast
|
||||
|
||||
from .plugins import Plugins
|
||||
from .types import IpAddress
|
||||
from .utils import bytes_, is_py2, is_threadless, set_open_file_limit
|
||||
from .constants import COMMA, DEFAULT_DATA_DIRECTORY_PATH, DEFAULT_NUM_ACCEPTORS, DEFAULT_NUM_WORKERS
|
||||
from .constants import DEFAULT_DEVTOOLS_WS_PATH, DEFAULT_DISABLE_HEADERS, PY2_DEPRECATION_MESSAGE
|
||||
from .constants import PLUGIN_DASHBOARD, PLUGIN_DEVTOOLS_PROTOCOL, DEFAULT_MIN_COMPRESSION_LIMIT
|
||||
from .constants import PLUGIN_HTTP_PROXY, PLUGIN_INSPECT_TRAFFIC, PLUGIN_PAC_FILE
|
||||
from .constants import PLUGIN_WEB_SERVER, PLUGIN_PROXY_AUTH, IS_WINDOWS, PLUGIN_WEBSOCKET_TRANSPORT
|
||||
from .logger import Logger
|
||||
|
||||
from .plugins import Plugins
|
||||
from .version import __version__
|
||||
from .constants import (
|
||||
COMMA, IS_WINDOWS, PLUGIN_PAC_FILE, PLUGIN_DASHBOARD, PLUGIN_HTTP_PROXY,
|
||||
PLUGIN_PROXY_AUTH, PLUGIN_WEB_SERVER, DEFAULT_NUM_WORKERS,
|
||||
DEFAULT_NUM_ACCEPTORS, PLUGIN_INSPECT_TRAFFIC, DEFAULT_DISABLE_HEADERS,
|
||||
PY2_DEPRECATION_MESSAGE, DEFAULT_DEVTOOLS_WS_PATH,
|
||||
PLUGIN_DEVTOOLS_PROTOCOL, PLUGIN_WEBSOCKET_TRANSPORT,
|
||||
DEFAULT_DATA_DIRECTORY_PATH, DEFAULT_MIN_COMPRESSION_LIMIT,
|
||||
)
|
||||
|
||||
|
||||
__homepage__ = 'https://github.com/abhinavsingh/proxy.py'
|
||||
|
||||
|
@ -96,13 +98,17 @@ class FlagParser:
|
|||
print(PY2_DEPRECATION_MESSAGE)
|
||||
sys.exit(1)
|
||||
|
||||
# Dirty hack to always discover --basic-auth flag
|
||||
# defined by proxy auth plugin.
|
||||
in_args = input_args + ['--plugin', PLUGIN_PROXY_AUTH]
|
||||
|
||||
# Discover flags from requested plugin.
|
||||
# This will also surface external plugin flags
|
||||
# under --help.
|
||||
Plugins.discover(input_args)
|
||||
Plugins.discover(in_args)
|
||||
|
||||
# Parse flags
|
||||
args = flags.parse_args(input_args)
|
||||
args = flags.parse_args(in_args)
|
||||
|
||||
# Print version and exit
|
||||
if args.version:
|
||||
|
@ -135,9 +141,11 @@ class FlagParser:
|
|||
if isinstance(work_klass, str) \
|
||||
else work_klass
|
||||
|
||||
# TODO: Plugin flag initialization logic must be moved within plugins.
|
||||
#
|
||||
# Generate auth_code required for basic authentication if enabled
|
||||
auth_code = None
|
||||
basic_auth = opts.get('basic_auth', args.basic_auth)
|
||||
basic_auth = opts.get('basic_auth', getattr(args, 'basic_auth', None))
|
||||
# Destroy passed credentials via flags or options
|
||||
args.basic_auth = None
|
||||
if 'basic_auth' in opts:
|
||||
|
|
|
@ -9,10 +9,10 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import logging
|
||||
from typing import Any, Optional
|
||||
|
||||
from typing import Optional, Any
|
||||
from .constants import DEFAULT_LOG_FILE, DEFAULT_LOG_LEVEL, DEFAULT_LOG_FORMAT
|
||||
|
||||
from .constants import DEFAULT_LOG_FILE, DEFAULT_LOG_FORMAT, DEFAULT_LOG_LEVEL
|
||||
|
||||
SINGLE_CHAR_TO_LEVEL = {
|
||||
'D': 'DEBUG',
|
||||
|
|
|
@ -14,19 +14,18 @@
|
|||
"""
|
||||
import os
|
||||
import sys
|
||||
import uuid
|
||||
import time
|
||||
import uuid
|
||||
import logging
|
||||
import tempfile
|
||||
import argparse
|
||||
import tempfile
|
||||
import contextlib
|
||||
import subprocess
|
||||
|
||||
from typing import List, Generator, Optional, Tuple
|
||||
from typing import List, Tuple, Optional, Generator
|
||||
|
||||
from .utils import bytes_
|
||||
from .constants import COMMA
|
||||
from .version import __version__
|
||||
from .constants import COMMA
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -9,15 +9,15 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import os
|
||||
import logging
|
||||
import inspect
|
||||
import itertools
|
||||
import logging
|
||||
import importlib
|
||||
import itertools
|
||||
from typing import Any, Dict, List, Tuple, Union, Optional
|
||||
|
||||
from typing import Any, List, Dict, Optional, Tuple, Union
|
||||
from .utils import text_, bytes_
|
||||
from .constants import DOT, COMMA, DEFAULT_ABC_PLUGINS
|
||||
|
||||
from .utils import bytes_, text_
|
||||
from .constants import DOT, DEFAULT_ABC_PLUGINS, COMMA
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,8 +10,7 @@
|
|||
"""
|
||||
import queue
|
||||
import ipaddress
|
||||
|
||||
from typing import TYPE_CHECKING, Dict, Any, List, Tuple, Union
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Union
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
|
|
|
@ -12,22 +12,22 @@
|
|||
|
||||
utils
|
||||
"""
|
||||
import sys
|
||||
import ssl
|
||||
import sys
|
||||
import socket
|
||||
import logging
|
||||
import functools
|
||||
import ipaddress
|
||||
import contextlib
|
||||
|
||||
from types import TracebackType
|
||||
from typing import Optional, Dict, Any, List, Tuple, Type, Callable
|
||||
from typing import Any, Dict, List, Type, Tuple, Callable, Optional
|
||||
|
||||
from .constants import (
|
||||
HTTP_1_1, COLON, WHITESPACE, CRLF,
|
||||
DEFAULT_TIMEOUT, DEFAULT_THREADLESS, IS_WINDOWS,
|
||||
CRLF, COLON, HTTP_1_1, IS_WINDOWS, WHITESPACE, DEFAULT_TIMEOUT,
|
||||
DEFAULT_THREADLESS,
|
||||
)
|
||||
|
||||
|
||||
if not IS_WINDOWS: # pragma: no cover
|
||||
import resource
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from ._version import __version__, VERSION # noqa: WPS436
|
||||
from ._version import VERSION, __version__ # noqa: WPS436
|
||||
|
||||
|
||||
__all__ = '__version__', 'VERSION'
|
||||
|
|
|
@ -12,9 +12,10 @@
|
|||
|
||||
pre
|
||||
"""
|
||||
from .listener import Listener
|
||||
from .acceptor import Acceptor
|
||||
from .pool import AcceptorPool
|
||||
from .acceptor import Acceptor
|
||||
from .listener import Listener
|
||||
|
||||
|
||||
__all__ = [
|
||||
'Listener',
|
||||
|
|
|
@ -19,20 +19,17 @@ import selectors
|
|||
import threading
|
||||
import multiprocessing
|
||||
import multiprocessing.synchronize
|
||||
|
||||
from typing import List, Tuple, Optional
|
||||
from multiprocessing import connection
|
||||
from multiprocessing.reduction import recv_handle
|
||||
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
from ..work import LocalExecutor, start_threaded_work, delegate_work_to_pool
|
||||
from ..event import EventQueue
|
||||
from ...common.flag import flags
|
||||
from ...common.logger import Logger
|
||||
from ...common.backports import NonBlockingQueue
|
||||
from ...common.constants import DEFAULT_LOCAL_EXECUTOR
|
||||
|
||||
from ..event import EventQueue
|
||||
|
||||
from ..work import LocalExecutor, delegate_work_to_pool, start_threaded_work
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -16,11 +16,12 @@ import os
|
|||
import socket
|
||||
import logging
|
||||
import argparse
|
||||
|
||||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_BACKLOG, DEFAULT_IPV4_HOSTNAME, DEFAULT_PORT, DEFAULT_PORT_FILE
|
||||
from ...common.constants import (
|
||||
DEFAULT_PORT, DEFAULT_BACKLOG, DEFAULT_PORT_FILE, DEFAULT_IPV4_HOSTNAME,
|
||||
)
|
||||
|
||||
|
||||
flags.add_argument(
|
||||
|
|
|
@ -17,18 +17,16 @@
|
|||
import logging
|
||||
import argparse
|
||||
import multiprocessing
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from multiprocessing import connection
|
||||
from multiprocessing.reduction import send_handle
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
|
||||
from .listener import Listener
|
||||
from .acceptor import Acceptor
|
||||
|
||||
from .listener import Listener
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_NUM_ACCEPTORS
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..event import EventQueue
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ from .tcp_server import BaseTcpServerHandler
|
|||
from .tcp_tunnel import BaseTcpTunnelHandler
|
||||
from .tcp_upstream import TcpUpstreamConnectionHandler
|
||||
|
||||
|
||||
__all__ = [
|
||||
'BaseTcpServerHandler',
|
||||
'BaseTcpTunnelHandler',
|
||||
|
|
|
@ -16,18 +16,19 @@ import ssl
|
|||
import socket
|
||||
import logging
|
||||
import selectors
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Any, Optional, TypeVar, Union
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.utils import wrap_socket
|
||||
from ...common.types import Readables, SelectableEvents, Writables
|
||||
from ...common.constants import DEFAULT_CERT_FILE, DEFAULT_CLIENT_RECVBUF_SIZE
|
||||
from ...common.constants import DEFAULT_KEY_FILE, DEFAULT_SERVER_RECVBUF_SIZE, DEFAULT_TIMEOUT
|
||||
from typing import Any, Union, TypeVar, Optional
|
||||
|
||||
from ...core.work import Work
|
||||
from ...common.flag import flags
|
||||
from ...common.types import Readables, Writables, SelectableEvents
|
||||
from ...common.utils import wrap_socket
|
||||
from ...core.connection import TcpClientConnection
|
||||
from ...common.constants import (
|
||||
DEFAULT_TIMEOUT, DEFAULT_KEY_FILE, DEFAULT_CERT_FILE,
|
||||
DEFAULT_CLIENT_RECVBUF_SIZE, DEFAULT_SERVER_RECVBUF_SIZE,
|
||||
)
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,16 +10,15 @@
|
|||
"""
|
||||
import logging
|
||||
import selectors
|
||||
|
||||
from abc import abstractmethod
|
||||
from typing import Any, Optional
|
||||
|
||||
from .tcp_server import BaseTcpServerHandler
|
||||
from ..connection import TcpClientConnection, TcpServerConnection
|
||||
from ...http.parser import HttpParser, httpParserTypes
|
||||
from ...common.types import Readables, SelectableEvents, Writables
|
||||
from ...common.types import Readables, Writables, SelectableEvents
|
||||
from ...common.utils import text_
|
||||
|
||||
from ..connection import TcpServerConnection, TcpClientConnection
|
||||
from .tcp_server import BaseTcpServerHandler
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
"""
|
||||
import ssl
|
||||
import logging
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from ...common.types import Readables, Writables, Descriptors
|
||||
from ...core.connection import TcpServerConnection
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -13,11 +13,12 @@
|
|||
reusability
|
||||
Submodules
|
||||
"""
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
from .client import TcpClientConnection
|
||||
from .server import TcpServerConnection
|
||||
from .pool import UpstreamConnectionPool
|
||||
from .types import tcpConnectionTypes
|
||||
from .client import TcpClientConnection
|
||||
from .server import TcpServerConnection
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
|
||||
|
||||
__all__ = [
|
||||
'TcpConnection',
|
||||
|
|
|
@ -10,11 +10,10 @@
|
|||
"""
|
||||
import ssl
|
||||
import socket
|
||||
from typing import Tuple, Union, Optional
|
||||
|
||||
from typing import Union, Tuple, Optional
|
||||
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
from .types import tcpConnectionTypes
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
|
||||
|
||||
class TcpClientConnection(TcpConnection):
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
import ssl
|
||||
import socket
|
||||
import logging
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional, Union, List
|
||||
|
||||
from ...common.constants import DEFAULT_BUFFER_SIZE, DEFAULT_MAX_SEND_SIZE
|
||||
from typing import List, Union, Optional
|
||||
|
||||
from .types import tcpConnectionTypes
|
||||
from ...common.constants import DEFAULT_BUFFER_SIZE, DEFAULT_MAX_SEND_SIZE
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,15 +15,13 @@
|
|||
import socket
|
||||
import logging
|
||||
import selectors
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Set, Dict, Tuple
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.types import Readables, SelectableEvents, Writables
|
||||
|
||||
from ..work import Work
|
||||
|
||||
from .server import TcpServerConnection
|
||||
from ...common.flag import flags
|
||||
from ...common.types import Readables, Writables, SelectableEvents
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,13 +10,11 @@
|
|||
"""
|
||||
import ssl
|
||||
import socket
|
||||
from typing import Tuple, Union, Optional
|
||||
|
||||
from typing import Optional, Union, Tuple
|
||||
|
||||
from ...common.utils import new_socket_connection
|
||||
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
from .types import tcpConnectionTypes
|
||||
from .connection import TcpConnection, TcpConnectionUninitializedException
|
||||
from ...common.utils import new_socket_connection
|
||||
|
||||
|
||||
class TcpServerConnection(TcpConnection):
|
||||
|
|
|
@ -8,11 +8,12 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from .queue import EventQueue
|
||||
from .names import EventNames, eventNames
|
||||
from .queue import EventQueue
|
||||
from .manager import EventManager
|
||||
from .dispatcher import EventDispatcher
|
||||
from .subscriber import EventSubscriber
|
||||
from .manager import EventManager
|
||||
|
||||
|
||||
__all__ = [
|
||||
'eventNames',
|
||||
|
|
|
@ -11,13 +11,12 @@
|
|||
import queue
|
||||
import logging
|
||||
import threading
|
||||
|
||||
from typing import Any, Dict, List
|
||||
from multiprocessing import connection
|
||||
|
||||
from typing import Dict, Any, List
|
||||
|
||||
from .queue import EventQueue
|
||||
from .names import eventNames
|
||||
from .queue import EventQueue
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,15 +15,14 @@
|
|||
import logging
|
||||
import threading
|
||||
import multiprocessing
|
||||
|
||||
from typing import Any, Optional
|
||||
|
||||
from .queue import EventQueue
|
||||
from .dispatcher import EventDispatcher
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_ENABLE_EVENTS
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"""
|
||||
from typing import NamedTuple
|
||||
|
||||
|
||||
# Name of the events that eventing framework supports.
|
||||
#
|
||||
# Ideally this must be configurable via command line or
|
||||
|
|
|
@ -11,14 +11,11 @@
|
|||
import os
|
||||
import time
|
||||
import threading
|
||||
|
||||
from typing import Any, Dict, Optional
|
||||
from multiprocessing import connection
|
||||
|
||||
from typing import Dict, Optional, Any
|
||||
|
||||
from ...common.types import DictQueueType
|
||||
|
||||
from .names import eventNames
|
||||
from ...common.types import DictQueueType
|
||||
|
||||
|
||||
class EventQueue:
|
||||
|
|
|
@ -13,13 +13,12 @@ import queue
|
|||
import logging
|
||||
import threading
|
||||
import multiprocessing
|
||||
|
||||
from typing import Any, Dict, Callable, Optional
|
||||
from multiprocessing import connection
|
||||
|
||||
from typing import Dict, Optional, Any, Callable
|
||||
|
||||
from .queue import EventQueue
|
||||
from .names import eventNames
|
||||
from .queue import EventQueue
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
from .handler import SshHttpProtocolHandler
|
||||
from .listener import SshTunnelListener
|
||||
|
||||
|
||||
__all__ = [
|
||||
'SshHttpProtocolHandler',
|
||||
'SshTunnelListener',
|
||||
|
|
|
@ -9,9 +9,9 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import argparse
|
||||
|
||||
from typing import TYPE_CHECKING, Tuple
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
try:
|
||||
from paramiko.channel import Channel
|
||||
|
|
|
@ -8,10 +8,10 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import argparse
|
||||
import logging
|
||||
import argparse
|
||||
from typing import TYPE_CHECKING, Any, Set, Tuple, Callable, Optional
|
||||
|
||||
from typing import TYPE_CHECKING, Any, Callable, Optional, Set, Tuple
|
||||
|
||||
try:
|
||||
from paramiko import SSHClient, AutoAddPolicy
|
||||
|
@ -23,6 +23,7 @@ except ImportError: # pragma: no cover
|
|||
|
||||
from ...common.flag import flags
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -12,13 +12,14 @@
|
|||
|
||||
pre
|
||||
"""
|
||||
from .work import Work
|
||||
from .threadless import Threadless
|
||||
from .remote import RemoteExecutor
|
||||
from .local import LocalExecutor
|
||||
from .pool import ThreadlessPool
|
||||
from .work import Work
|
||||
from .local import LocalExecutor
|
||||
from .remote import RemoteExecutor
|
||||
from .delegate import delegate_work_to_pool
|
||||
from .threaded import start_threaded_work
|
||||
from .threadless import Threadless
|
||||
|
||||
|
||||
__all__ = [
|
||||
'Work',
|
||||
|
|
|
@ -8,9 +8,10 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import TYPE_CHECKING, Optional, Tuple
|
||||
from typing import TYPE_CHECKING, Tuple, Optional
|
||||
from multiprocessing.reduction import send_handle
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
import socket
|
||||
import multiprocessing
|
||||
|
|
|
@ -9,16 +9,16 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import queue
|
||||
import logging
|
||||
import asyncio
|
||||
import logging
|
||||
import contextlib
|
||||
|
||||
from typing import Optional
|
||||
from typing import Any
|
||||
|
||||
from ...common.backports import NonBlockingQueue # noqa: W0611, F401 pylint: disable=unused-import
|
||||
from typing import Any, Optional
|
||||
|
||||
from .threadless import Threadless
|
||||
from ...common.backports import ( # noqa: W0611, F401 pylint: disable=unused-import
|
||||
NonBlockingQueue,
|
||||
)
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -11,14 +11,13 @@
|
|||
import logging
|
||||
import argparse
|
||||
import multiprocessing
|
||||
|
||||
from typing import TYPE_CHECKING, Any, List, Optional
|
||||
from multiprocessing import connection
|
||||
from typing import TYPE_CHECKING, Any, Optional, List
|
||||
|
||||
from .remote import RemoteExecutor
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_NUM_WORKERS, DEFAULT_THREADLESS
|
||||
from ...common.constants import DEFAULT_THREADLESS, DEFAULT_NUM_WORKERS
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..event import EventQueue
|
||||
|
|
|
@ -10,13 +10,13 @@
|
|||
"""
|
||||
import asyncio
|
||||
import logging
|
||||
|
||||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
from multiprocessing import connection
|
||||
from multiprocessing.reduction import recv_handle
|
||||
|
||||
from .threadless import Threadless
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
import socket
|
||||
import argparse
|
||||
import threading
|
||||
|
||||
from typing import TYPE_CHECKING, Optional, Tuple, TypeVar
|
||||
from typing import TYPE_CHECKING, Tuple, TypeVar, Optional
|
||||
|
||||
from ..event import EventQueue, eventNames
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from .work import Work
|
||||
|
||||
|
|
|
@ -11,27 +11,30 @@
|
|||
import os
|
||||
import ssl
|
||||
import socket
|
||||
import logging
|
||||
import asyncio
|
||||
import logging
|
||||
import argparse
|
||||
import selectors
|
||||
import multiprocessing
|
||||
|
||||
from abc import abstractmethod, ABC
|
||||
from typing import TYPE_CHECKING, Dict, Optional, Tuple, List, Set, Generic, TypeVar, Union
|
||||
|
||||
from ...common.logger import Logger
|
||||
from ...common.types import Readables, SelectableEvents, Writables
|
||||
from ...common.constants import DEFAULT_INACTIVE_CONN_CLEANUP_TIMEOUT, DEFAULT_SELECTOR_SELECT_TIMEOUT
|
||||
from ...common.constants import DEFAULT_WAIT_FOR_TASKS_TIMEOUT
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import (
|
||||
TYPE_CHECKING, Set, Dict, List, Tuple, Union, Generic, TypeVar, Optional,
|
||||
)
|
||||
|
||||
from ..event import eventNames
|
||||
from ...common.types import Readables, Writables, SelectableEvents
|
||||
from ...common.logger import Logger
|
||||
from ...common.constants import (
|
||||
DEFAULT_WAIT_FOR_TASKS_TIMEOUT, DEFAULT_SELECTOR_SELECT_TIMEOUT,
|
||||
DEFAULT_INACTIVE_CONN_CLEANUP_TIMEOUT,
|
||||
)
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from typing import Any
|
||||
|
||||
from ..event import EventQueue
|
||||
from .work import Work
|
||||
from ..event import EventQueue
|
||||
|
||||
T = TypeVar('T')
|
||||
|
||||
|
@ -92,7 +95,9 @@ class Threadless(ABC, Generic[T]):
|
|||
self._total: int = 0
|
||||
# When put at the top, causes circular import error
|
||||
# since integrated ssh tunnel was introduced.
|
||||
from ..connection import UpstreamConnectionPool # pylint: disable=C0415
|
||||
from ..connection import ( # pylint: disable=C0415
|
||||
UpstreamConnectionPool,
|
||||
)
|
||||
self._upstream_conn_pool: Optional['UpstreamConnectionPool'] = None
|
||||
self._upstream_conn_filenos: Set[int] = set()
|
||||
if self.flags.enable_conn_pool:
|
||||
|
|
|
@ -13,13 +13,13 @@
|
|||
acceptor
|
||||
"""
|
||||
import argparse
|
||||
|
||||
from uuid import uuid4
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Optional, Dict, Any, TypeVar, Generic, TYPE_CHECKING
|
||||
from uuid import uuid4
|
||||
from typing import TYPE_CHECKING, Any, Dict, Generic, TypeVar, Optional
|
||||
|
||||
from ..event import EventQueue, eventNames
|
||||
from ...common.types import Readables, Writables, SelectableEvents
|
||||
|
||||
from ..event import eventNames, EventQueue
|
||||
from ...common.types import Readables, SelectableEvents, Writables
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..connection import UpstreamConnectionPool
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"""
|
||||
from .dashboard import ProxyDashboard
|
||||
|
||||
|
||||
__all__ = [
|
||||
'ProxyDashboard',
|
||||
]
|
||||
|
|
|
@ -12,9 +12,12 @@ import os
|
|||
import logging
|
||||
from typing import List, Tuple
|
||||
|
||||
from ..http.responses import permanentRedirectResponse
|
||||
from ..http.parser import HttpParser
|
||||
from ..http.server import HttpWebServerPlugin, HttpWebServerBasePlugin, httpProtocolTypes
|
||||
from ..http.server import (
|
||||
HttpWebServerPlugin, HttpWebServerBasePlugin, httpProtocolTypes,
|
||||
)
|
||||
from ..http.responses import permanentRedirectResponse
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -8,13 +8,14 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from .handler import HttpProtocolHandler
|
||||
from .connection import HttpClientConnection
|
||||
from .plugin import HttpProtocolHandlerPlugin
|
||||
from .codes import httpStatusCodes
|
||||
from .methods import httpMethods
|
||||
from .headers import httpHeaders
|
||||
from .url import Url
|
||||
from .codes import httpStatusCodes
|
||||
from .plugin import HttpProtocolHandlerPlugin
|
||||
from .handler import HttpProtocolHandler
|
||||
from .headers import httpHeaders
|
||||
from .methods import httpMethods
|
||||
from .connection import HttpClientConnection
|
||||
|
||||
|
||||
__all__ = [
|
||||
'HttpProtocolHandler',
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Any
|
||||
|
||||
from ..common.types import Readables, Writables, Descriptors
|
||||
|
||||
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from .base import HttpProtocolException
|
||||
from .http_request_rejected import HttpRequestRejected
|
||||
from .proxy_auth_failed import ProxyAuthenticationFailed
|
||||
from .proxy_conn_failed import ProxyConnectionFailed
|
||||
from .http_request_rejected import HttpRequestRejected
|
||||
|
||||
|
||||
__all__ = [
|
||||
'HttpProtocolException',
|
||||
|
|
|
@ -12,7 +12,8 @@
|
|||
|
||||
http
|
||||
"""
|
||||
from typing import Any, Optional, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any, Optional
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..parser import HttpParser
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Any, Optional, Dict, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any, Dict, Optional
|
||||
|
||||
from .base import HttpProtocolException
|
||||
|
||||
from ...common.utils import build_http_response
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..parser import HttpParser
|
||||
|
||||
|
|
|
@ -16,9 +16,9 @@
|
|||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import HttpProtocolException
|
||||
|
||||
from ..responses import PROXY_AUTH_FAILED_RESPONSE_PKT
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..parser import HttpParser
|
||||
|
||||
|
|
|
@ -15,9 +15,9 @@
|
|||
from typing import TYPE_CHECKING, Any
|
||||
|
||||
from .base import HttpProtocolException
|
||||
|
||||
from ..responses import BAD_GATEWAY_RESPONSE_PKT
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..parser import HttpParser
|
||||
|
||||
|
|
|
@ -15,19 +15,17 @@ import socket
|
|||
import asyncio
|
||||
import logging
|
||||
import selectors
|
||||
from typing import Any, List, Type, Tuple, Optional
|
||||
|
||||
from typing import Tuple, List, Type, Optional, Any
|
||||
|
||||
from ..core.base import BaseTcpServerHandler
|
||||
from ..common.types import Readables, SelectableEvents, Writables
|
||||
from ..common.constants import DEFAULT_SELECTOR_SELECT_TIMEOUT
|
||||
|
||||
from .protocols import httpProtocols
|
||||
from .connection import HttpClientConnection
|
||||
from .exception import HttpProtocolException
|
||||
from .parser import HttpParser, httpParserTypes, httpParserStates
|
||||
from .plugin import HttpProtocolHandlerPlugin
|
||||
from .exception import HttpProtocolException
|
||||
from .protocols import httpProtocols
|
||||
from .responses import BAD_REQUEST_RESPONSE_PKT
|
||||
from .parser import HttpParser, httpParserStates, httpParserTypes
|
||||
from ..core.base import BaseTcpServerHandler
|
||||
from .connection import HttpClientConnection
|
||||
from ..common.types import Readables, Writables, SelectableEvents
|
||||
from ..common.constants import DEFAULT_SELECTOR_SELECT_TIMEOUT
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
|
@ -14,18 +14,20 @@
|
|||
"""
|
||||
import json
|
||||
import logging
|
||||
from typing import List, Tuple, Any, Dict
|
||||
from typing import Any, Dict, List, Tuple
|
||||
|
||||
from .transformer import CoreEventsToDevtoolsProtocol
|
||||
from ..parser import HttpParser
|
||||
from ..websocket import WebsocketFrame, websocketOpcodes
|
||||
from ..server import HttpWebServerBasePlugin, httpProtocolTypes
|
||||
|
||||
from ...common.utils import bytes_, text_
|
||||
from ..websocket import WebsocketFrame, websocketOpcodes
|
||||
from .transformer import CoreEventsToDevtoolsProtocol
|
||||
from ...core.event import EventSubscriber
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_DEVTOOLS_WS_PATH, DEFAULT_DEVTOOLS_DOC_URL
|
||||
from ...common.constants import DEFAULT_ENABLE_DEVTOOLS
|
||||
from ...common.utils import text_, bytes_
|
||||
from ...common.constants import (
|
||||
DEFAULT_ENABLE_DEVTOOLS, DEFAULT_DEVTOOLS_DOC_URL,
|
||||
DEFAULT_DEVTOOLS_WS_PATH,
|
||||
)
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -9,12 +9,12 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import json
|
||||
from typing import TYPE_CHECKING, List, Dict, Any
|
||||
|
||||
from ...common.utils import bytes_
|
||||
from ...core.event import EventSubscriber
|
||||
from typing import TYPE_CHECKING, Any, Dict, List
|
||||
|
||||
from ..websocket import WebsocketFrame, WebSocketTransportBasePlugin
|
||||
from ...core.event import EventSubscriber
|
||||
from ...common.utils import bytes_
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..connection import HttpClientConnection
|
||||
|
|
|
@ -12,12 +12,14 @@ import json
|
|||
import time
|
||||
from typing import TYPE_CHECKING, Any, Dict
|
||||
|
||||
from ...common.constants import PROXY_PY_START_TIME, DEFAULT_DEVTOOLS_DOC_URL
|
||||
from ...common.constants import DEFAULT_DEVTOOLS_FRAME_ID, DEFAULT_DEVTOOLS_LOADER_ID
|
||||
from ...common.utils import bytes_
|
||||
from ...core.event import eventNames
|
||||
|
||||
from ..websocket import WebsocketFrame
|
||||
from ...core.event import eventNames
|
||||
from ...common.utils import bytes_
|
||||
from ...common.constants import (
|
||||
PROXY_PY_START_TIME, DEFAULT_DEVTOOLS_DOC_URL, DEFAULT_DEVTOOLS_FRAME_ID,
|
||||
DEFAULT_DEVTOOLS_LOADER_ID,
|
||||
)
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..connection import HttpClientConnection
|
||||
|
|
|
@ -13,10 +13,11 @@
|
|||
http
|
||||
Submodules
|
||||
"""
|
||||
from .parser import HttpParser
|
||||
from .chunk import ChunkParser, chunkParserStates
|
||||
from .types import httpParserStates, httpParserTypes
|
||||
from .protocol import ProxyProtocol, PROXY_PROTOCOL_V2_SIGNATURE
|
||||
from .types import httpParserTypes, httpParserStates
|
||||
from .parser import HttpParser
|
||||
from .protocol import PROXY_PROTOCOL_V2_SIGNATURE, ProxyProtocol
|
||||
|
||||
|
||||
__all__ = [
|
||||
'HttpParser',
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import NamedTuple, Tuple, List, Optional
|
||||
from typing import List, Tuple, Optional, NamedTuple
|
||||
|
||||
from ...common.utils import bytes_, find_http_line
|
||||
from ...common.constants import CRLF, DEFAULT_BUFFER_SIZE
|
||||
|
|
|
@ -12,22 +12,22 @@
|
|||
|
||||
http
|
||||
"""
|
||||
from typing import TypeVar, Optional, Dict, Type, Tuple, List
|
||||
|
||||
from ...common.constants import DEFAULT_DISABLE_HEADERS, COLON, DEFAULT_ENABLE_PROXY_PROTOCOL, HTTP_1_0
|
||||
from ...common.constants import HTTP_1_1, SLASH, CRLF
|
||||
from ...common.constants import WHITESPACE, DEFAULT_HTTP_PORT
|
||||
from ...common.utils import build_http_request, build_http_response, text_
|
||||
from ...common.flag import flags
|
||||
from typing import Dict, List, Type, Tuple, TypeVar, Optional
|
||||
|
||||
from ..url import Url
|
||||
from ..methods import httpMethods
|
||||
from ..protocols import httpProtocols
|
||||
from ..exception import HttpProtocolException
|
||||
|
||||
from .protocol import ProxyProtocol
|
||||
from .chunk import ChunkParser, chunkParserStates
|
||||
from .types import httpParserTypes, httpParserStates
|
||||
from ..methods import httpMethods
|
||||
from .protocol import ProxyProtocol
|
||||
from ..exception import HttpProtocolException
|
||||
from ..protocols import httpProtocols
|
||||
from ...common.flag import flags
|
||||
from ...common.utils import text_, build_http_request, build_http_response
|
||||
from ...common.constants import (
|
||||
CRLF, COLON, SLASH, HTTP_1_0, HTTP_1_1, WHITESPACE, DEFAULT_HTTP_PORT,
|
||||
DEFAULT_DISABLE_HEADERS, DEFAULT_ENABLE_PROXY_PROTOCOL,
|
||||
)
|
||||
|
||||
|
||||
flags.add_argument(
|
||||
'--enable-proxy-protocol',
|
||||
|
|
|
@ -8,12 +8,12 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from ..exception import HttpProtocolException
|
||||
|
||||
from ...common.constants import WHITESPACE
|
||||
|
||||
|
||||
PROXY_PROTOCOL_V2_SIGNATURE = b'\x0D\x0A\x0D\x0A\x00\x0D\x0A\x51\x55\x49\x54\x0A'
|
||||
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
from .tls import TlsParser
|
||||
from .types import tlsContentType, tlsHandshakeType
|
||||
|
||||
|
||||
__all__ = [
|
||||
'TlsParser',
|
||||
'tlsContentType',
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
|
||||
class TlsCertificate:
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
|
||||
class TlsFinished:
|
||||
|
|
|
@ -10,14 +10,18 @@
|
|||
"""
|
||||
import struct
|
||||
import logging
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from typing import Optional, Tuple
|
||||
|
||||
from .hello import (
|
||||
TlsClientHello, TlsServerHello, TlsHelloRequest, TlsServerHelloDone,
|
||||
)
|
||||
from .types import tlsHandshakeType
|
||||
from .hello import TlsHelloRequest, TlsClientHello, TlsServerHello, TlsServerHelloDone
|
||||
from .certificate import TlsCertificate, TlsCertificateRequest, TlsCertificateVerify
|
||||
from .key_exchange import TlsClientKeyExchange, TlsServerKeyExchange
|
||||
from .finished import TlsFinished
|
||||
from .certificate import (
|
||||
TlsCertificate, TlsCertificateVerify, TlsCertificateRequest,
|
||||
)
|
||||
from .key_exchange import TlsClientKeyExchange, TlsServerKeyExchange
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -11,11 +11,11 @@
|
|||
import os
|
||||
import struct
|
||||
import logging
|
||||
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from .pretty import pretty_hexlify
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
|
||||
class TlsServerKeyExchange:
|
||||
|
|
|
@ -10,12 +10,12 @@
|
|||
"""
|
||||
import struct
|
||||
import logging
|
||||
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from .types import tlsContentType
|
||||
from .certificate import TlsCertificate
|
||||
from .handshake import TlsHandshake
|
||||
from .certificate import TlsCertificate
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
"""
|
||||
from typing import NamedTuple
|
||||
|
||||
|
||||
TlsContentType = NamedTuple(
|
||||
'TlsContentType', [
|
||||
('CHANGE_CIPHER_SPEC', int),
|
||||
|
|
|
@ -10,16 +10,15 @@
|
|||
"""
|
||||
import socket
|
||||
import argparse
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import List, Union, Optional, TYPE_CHECKING
|
||||
|
||||
from ..core.event import EventQueue
|
||||
from typing import TYPE_CHECKING, List, Union, Optional
|
||||
|
||||
from .mixins import TlsInterceptionPropertyMixin
|
||||
from .parser import HttpParser
|
||||
from .connection import HttpClientConnection
|
||||
from ..core.event import EventQueue
|
||||
from .descriptors import DescriptorsHandlerMixin
|
||||
from .mixins import TlsInterceptionPropertyMixin
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..core.connection import UpstreamConnectionPool
|
||||
|
|
|
@ -10,10 +10,9 @@
|
|||
"""
|
||||
from .plugin import HttpProxyBasePlugin
|
||||
from .server import HttpProxyPlugin
|
||||
from .auth import AuthPlugin
|
||||
|
||||
|
||||
__all__ = [
|
||||
'HttpProxyBasePlugin',
|
||||
'HttpProxyPlugin',
|
||||
'AuthPlugin',
|
||||
]
|
||||
|
|
|
@ -15,14 +15,12 @@
|
|||
"""
|
||||
from typing import Optional
|
||||
|
||||
from ..exception import ProxyAuthenticationFailed
|
||||
|
||||
from ...common.flag import flags
|
||||
from ...common.constants import DEFAULT_BASIC_AUTH
|
||||
|
||||
from ...http import httpHeaders
|
||||
from ...http.parser import HttpParser
|
||||
from ..exception import ProxyAuthenticationFailed
|
||||
from ...http.proxy import HttpProxyBasePlugin
|
||||
from ...common.flag import flags
|
||||
from ...http.parser import HttpParser
|
||||
from ...common.constants import DEFAULT_BASIC_AUTH
|
||||
|
||||
|
||||
flags.add_argument(
|
||||
|
|
|
@ -9,17 +9,15 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import argparse
|
||||
|
||||
from abc import ABC
|
||||
from typing import Any, Dict, Optional, Tuple, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any, Dict, Tuple, Optional
|
||||
|
||||
from ..mixins import TlsInterceptionPropertyMixin
|
||||
|
||||
from ..parser import HttpParser
|
||||
from ..descriptors import DescriptorsHandlerMixin
|
||||
from ..connection import HttpClientConnection
|
||||
|
||||
from ...core.event import EventQueue
|
||||
from ..descriptors import DescriptorsHandlerMixin
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ...core.connection import UpstreamConnectionPool
|
||||
|
|
|
@ -21,33 +21,32 @@ import socket
|
|||
import logging
|
||||
import threading
|
||||
import subprocess
|
||||
|
||||
from typing import Optional, List, Union, Dict, cast, Any
|
||||
from typing import Any, Dict, List, Union, Optional, cast
|
||||
|
||||
from .plugin import HttpProxyBasePlugin
|
||||
|
||||
from ..parser import HttpParser, httpParserTypes, httpParserStates
|
||||
from ..plugin import HttpProtocolHandlerPlugin
|
||||
from ..headers import httpHeaders
|
||||
from ..methods import httpMethods
|
||||
from ..protocols import httpProtocols
|
||||
from ..plugin import HttpProtocolHandlerPlugin
|
||||
from ..exception import HttpProtocolException, ProxyConnectionFailed
|
||||
from ..parser import HttpParser, httpParserStates, httpParserTypes
|
||||
from ..protocols import httpProtocols
|
||||
from ..responses import PROXY_TUNNEL_ESTABLISHED_RESPONSE_PKT
|
||||
|
||||
from ...common.types import Readables, Writables, Descriptors
|
||||
from ...common.constants import DEFAULT_CA_CERT_DIR, DEFAULT_CA_CERT_FILE, DEFAULT_CA_FILE
|
||||
from ...common.constants import DEFAULT_CA_KEY_FILE, DEFAULT_CA_SIGNING_KEY_FILE
|
||||
from ...common.constants import COMMA, DEFAULT_HTTPS_PROXY_ACCESS_LOG_FORMAT
|
||||
from ...common.constants import PROXY_AGENT_HEADER_VALUE, DEFAULT_DISABLE_HEADERS
|
||||
from ...common.constants import DEFAULT_HTTP_PROXY_ACCESS_LOG_FORMAT
|
||||
from ...common.constants import DEFAULT_DISABLE_HTTP_PROXY, PLUGIN_PROXY_AUTH
|
||||
from ...common.utils import text_
|
||||
from ...common.pki import gen_public_key, gen_csr, sign_csr
|
||||
|
||||
from ...common.pki import gen_csr, sign_csr, gen_public_key
|
||||
from ...core.event import eventNames
|
||||
from ...core.connection import TcpServerConnection
|
||||
from ...core.connection import TcpConnectionUninitializedException
|
||||
from ...common.flag import flags
|
||||
from ...common.types import Readables, Writables, Descriptors
|
||||
from ...common.utils import text_
|
||||
from ...core.connection import (
|
||||
TcpServerConnection, TcpConnectionUninitializedException,
|
||||
)
|
||||
from ...common.constants import (
|
||||
COMMA, DEFAULT_CA_FILE, PLUGIN_PROXY_AUTH, DEFAULT_CA_CERT_DIR,
|
||||
DEFAULT_CA_KEY_FILE, DEFAULT_CA_CERT_FILE, DEFAULT_DISABLE_HEADERS,
|
||||
PROXY_AGENT_HEADER_VALUE, DEFAULT_DISABLE_HTTP_PROXY,
|
||||
DEFAULT_CA_SIGNING_KEY_FILE, DEFAULT_HTTP_PROXY_ACCESS_LOG_FORMAT,
|
||||
DEFAULT_HTTPS_PROXY_ACCESS_LOG_FORMAT,
|
||||
)
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -11,11 +11,10 @@
|
|||
import gzip
|
||||
from typing import Any, Dict, Optional
|
||||
|
||||
from .codes import httpStatusCodes
|
||||
from ..common.flag import flags
|
||||
from ..common.utils import build_http_response
|
||||
from ..common.constants import PROXY_AGENT_HEADER_VALUE, PROXY_AGENT_HEADER_KEY
|
||||
|
||||
from .codes import httpStatusCodes
|
||||
from ..common.constants import PROXY_AGENT_HEADER_KEY, PROXY_AGENT_HEADER_VALUE
|
||||
|
||||
|
||||
PROXY_TUNNEL_ESTABLISHED_RESPONSE_PKT = memoryview(
|
||||
|
|
|
@ -9,9 +9,10 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
from .web import HttpWebServerPlugin
|
||||
from .pac_plugin import HttpWebServerPacFilePlugin
|
||||
from .plugin import HttpWebServerBasePlugin
|
||||
from .protocols import httpProtocolTypes
|
||||
from .pac_plugin import HttpWebServerPacFilePlugin
|
||||
|
||||
|
||||
__all__ = [
|
||||
'HttpWebServerPlugin',
|
||||
|
|
|
@ -12,16 +12,14 @@
|
|||
|
||||
pac
|
||||
"""
|
||||
from typing import List, Tuple, Optional, Any
|
||||
from typing import Any, List, Tuple, Optional
|
||||
|
||||
from .plugin import HttpWebServerBasePlugin
|
||||
from .protocols import httpProtocolTypes
|
||||
|
||||
from ..parser import HttpParser
|
||||
from .protocols import httpProtocolTypes
|
||||
from ..responses import okResponse
|
||||
|
||||
from ...common.utils import bytes_, text_
|
||||
from ...common.flag import flags
|
||||
from ...common.utils import text_, bytes_
|
||||
from ...common.constants import DEFAULT_PAC_FILE, DEFAULT_PAC_FILE_URL_PATH
|
||||
|
||||
|
||||
|
|
|
@ -9,16 +9,15 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import argparse
|
||||
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import Any, Dict, List, Optional, Tuple, TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Tuple, Optional
|
||||
|
||||
from ..websocket import WebsocketFrame
|
||||
from ..parser import HttpParser
|
||||
from ..descriptors import DescriptorsHandlerMixin
|
||||
from ..websocket import WebsocketFrame
|
||||
from ..connection import HttpClientConnection
|
||||
|
||||
from ...core.event import EventQueue
|
||||
from ..descriptors import DescriptorsHandlerMixin
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ...core.connection import UpstreamConnectionPool
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
"""
|
||||
from typing import NamedTuple
|
||||
|
||||
|
||||
HttpProtocolTypes = NamedTuple(
|
||||
'HttpProtocolTypes', [
|
||||
('HTTP', int),
|
||||
|
|
|
@ -13,25 +13,25 @@ import time
|
|||
import socket
|
||||
import logging
|
||||
import mimetypes
|
||||
|
||||
from typing import List, Optional, Dict, Tuple, Union, Any, Pattern
|
||||
|
||||
from ...common.constants import DEFAULT_STATIC_SERVER_DIR
|
||||
from ...common.constants import DEFAULT_ENABLE_STATIC_SERVER, DEFAULT_ENABLE_WEB_SERVER
|
||||
from ...common.constants import DEFAULT_MIN_COMPRESSION_LIMIT, DEFAULT_WEB_ACCESS_LOG_FORMAT
|
||||
from ...common.utils import bytes_, text_, build_websocket_handshake_response
|
||||
from ...common.types import Readables, Writables, Descriptors
|
||||
from ...common.flag import flags
|
||||
|
||||
from ..exception import HttpProtocolException
|
||||
from ..plugin import HttpProtocolHandlerPlugin
|
||||
from ..websocket import WebsocketFrame, websocketOpcodes
|
||||
from ..parser import HttpParser, httpParserTypes
|
||||
from ..protocols import httpProtocols
|
||||
from ..responses import NOT_FOUND_RESPONSE_PKT, okResponse
|
||||
from typing import Any, Dict, List, Tuple, Union, Pattern, Optional
|
||||
|
||||
from .plugin import HttpWebServerBasePlugin
|
||||
from ..parser import HttpParser, httpParserTypes
|
||||
from ..plugin import HttpProtocolHandlerPlugin
|
||||
from .protocols import httpProtocolTypes
|
||||
from ..exception import HttpProtocolException
|
||||
from ..protocols import httpProtocols
|
||||
from ..responses import NOT_FOUND_RESPONSE_PKT, okResponse
|
||||
from ..websocket import WebsocketFrame, websocketOpcodes
|
||||
from ...common.flag import flags
|
||||
from ...common.types import Readables, Writables, Descriptors
|
||||
from ...common.utils import text_, bytes_, build_websocket_handshake_response
|
||||
from ...common.constants import (
|
||||
DEFAULT_ENABLE_WEB_SERVER, DEFAULT_STATIC_SERVER_DIR,
|
||||
DEFAULT_ENABLE_STATIC_SERVER, DEFAULT_MIN_COMPRESSION_LIMIT,
|
||||
DEFAULT_WEB_ACCESS_LOG_FORMAT,
|
||||
)
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -13,12 +13,11 @@
|
|||
http
|
||||
url
|
||||
"""
|
||||
from typing import List, Optional, Tuple
|
||||
|
||||
from ..common.constants import COLON, DEFAULT_ALLOWED_URL_SCHEMES, SLASH, AT
|
||||
from ..common.utils import text_
|
||||
from typing import List, Tuple, Optional
|
||||
|
||||
from .exception import HttpProtocolException
|
||||
from ..common.utils import text_
|
||||
from ..common.constants import AT, COLON, SLASH, DEFAULT_ALLOWED_URL_SCHEMES
|
||||
|
||||
|
||||
class Url:
|
||||
|
|
|
@ -19,6 +19,7 @@ from .frame import WebsocketFrame, websocketOpcodes
|
|||
from .client import WebsocketClient
|
||||
from .plugin import WebSocketTransportBasePlugin
|
||||
|
||||
|
||||
__all__ = [
|
||||
'websocketOpcodes',
|
||||
'WebsocketFrame',
|
||||
|
|
|
@ -13,16 +13,17 @@ import base64
|
|||
import socket
|
||||
import secrets
|
||||
import selectors
|
||||
|
||||
from typing import Optional, Union, Callable
|
||||
from typing import Union, Callable, Optional
|
||||
|
||||
from .frame import WebsocketFrame
|
||||
|
||||
from ..parser import httpParserTypes, HttpParser
|
||||
|
||||
from ...common.constants import DEFAULT_BUFFER_SIZE, DEFAULT_SELECTOR_SELECT_TIMEOUT
|
||||
from ...common.utils import new_socket_connection, build_websocket_handshake_request, text_
|
||||
from ...core.connection import tcpConnectionTypes, TcpConnection
|
||||
from ..parser import HttpParser, httpParserTypes
|
||||
from ...common.utils import (
|
||||
text_, new_socket_connection, build_websocket_handshake_request,
|
||||
)
|
||||
from ...core.connection import TcpConnection, tcpConnectionTypes
|
||||
from ...common.constants import (
|
||||
DEFAULT_BUFFER_SIZE, DEFAULT_SELECTOR_SELECT_TIMEOUT,
|
||||
)
|
||||
|
||||
|
||||
class WebsocketClient(TcpConnection):
|
||||
|
|
|
@ -19,10 +19,9 @@ import io
|
|||
import base64
|
||||
import struct
|
||||
import hashlib
|
||||
import secrets
|
||||
import logging
|
||||
|
||||
from typing import TypeVar, Type, Optional, NamedTuple
|
||||
import secrets
|
||||
from typing import Type, TypeVar, Optional, NamedTuple
|
||||
|
||||
|
||||
WebsocketOpcodes = NamedTuple(
|
||||
|
|
|
@ -8,15 +8,15 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import argparse
|
||||
import json
|
||||
import argparse
|
||||
from abc import ABC, abstractmethod
|
||||
from typing import TYPE_CHECKING, List, Dict, Any
|
||||
|
||||
from ...common.utils import bytes_
|
||||
from ...core.event import EventQueue
|
||||
from typing import TYPE_CHECKING, Any, Dict, List
|
||||
|
||||
from . import WebsocketFrame
|
||||
from ...core.event import EventQueue
|
||||
from ...common.utils import bytes_
|
||||
|
||||
|
||||
if TYPE_CHECKING: # pragma: no cover
|
||||
from ..connection import HttpClientConnection
|
||||
|
|
|
@ -10,15 +10,14 @@
|
|||
"""
|
||||
import json
|
||||
import logging
|
||||
from typing import List, Tuple, Any, Dict
|
||||
|
||||
from ...common.utils import bytes_
|
||||
|
||||
from ..server import httpProtocolTypes, HttpWebServerBasePlugin
|
||||
from ..parser import HttpParser
|
||||
from typing import Any, Dict, List, Tuple
|
||||
|
||||
from .frame import WebsocketFrame
|
||||
from .plugin import WebSocketTransportBasePlugin
|
||||
from ..parser import HttpParser
|
||||
from ..server import HttpWebServerBasePlugin, httpProtocolTypes
|
||||
from ...common.utils import bytes_
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -13,21 +13,22 @@
|
|||
Cloudflare
|
||||
"""
|
||||
from .cache import CacheResponsesPlugin, BaseCacheResponsesPlugin
|
||||
from .filter_by_upstream import FilterByUpstreamHostPlugin
|
||||
from .man_in_the_middle import ManInTheMiddlePlugin
|
||||
from .mock_rest_api import ProposedRestApiPlugin
|
||||
from .modify_post_data import ModifyPostDataPlugin
|
||||
from .redirect_to_custom_server import RedirectToCustomServerPlugin
|
||||
from .shortlink import ShortLinkPlugin
|
||||
from .web_server_route import WebServerPlugin
|
||||
from .reverse_proxy import ReverseProxyPlugin
|
||||
from .proxy_pool import ProxyPoolPlugin
|
||||
from .program_name import ProgramNamePlugin
|
||||
from .mock_rest_api import ProposedRestApiPlugin
|
||||
from .reverse_proxy import ReverseProxyPlugin
|
||||
from .cloudflare_dns import CloudflareDnsResolverPlugin
|
||||
from .modify_post_data import ModifyPostDataPlugin
|
||||
from .web_server_route import WebServerPlugin
|
||||
from .man_in_the_middle import ManInTheMiddlePlugin
|
||||
from .filter_by_upstream import FilterByUpstreamHostPlugin
|
||||
from .custom_dns_resolver import CustomDnsResolverPlugin
|
||||
from .filter_by_client_ip import FilterByClientIpPlugin
|
||||
from .filter_by_url_regex import FilterByURLRegexPlugin
|
||||
from .modify_chunk_response import ModifyChunkResponsePlugin
|
||||
from .custom_dns_resolver import CustomDnsResolverPlugin
|
||||
from .cloudflare_dns import CloudflareDnsResolverPlugin
|
||||
from .program_name import ProgramNamePlugin
|
||||
from .redirect_to_custom_server import RedirectToCustomServerPlugin
|
||||
|
||||
|
||||
__all__ = [
|
||||
'CacheResponsesPlugin',
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
from .base import BaseCacheResponsesPlugin
|
||||
from .cache_responses import CacheResponsesPlugin
|
||||
|
||||
|
||||
__all__ = [
|
||||
'BaseCacheResponsesPlugin',
|
||||
'CacheResponsesPlugin',
|
||||
|
|
|
@ -9,11 +9,12 @@
|
|||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import logging
|
||||
from typing import Optional, Any
|
||||
from typing import Any, Optional
|
||||
|
||||
from ...http.parser import HttpParser
|
||||
from ...http.proxy import HttpProxyBasePlugin
|
||||
from .store.base import CacheStore
|
||||
from ...http.proxy import HttpProxyBasePlugin
|
||||
from ...http.parser import HttpParser
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
import multiprocessing
|
||||
from typing import Any
|
||||
|
||||
from .store.disk import OnDiskCacheStore
|
||||
from .base import BaseCacheResponsesPlugin
|
||||
from .store.disk import OnDiskCacheStore
|
||||
|
||||
|
||||
class CacheResponsesPlugin(BaseCacheResponsesPlugin):
|
||||
|
|
|
@ -8,16 +8,16 @@
|
|||
:copyright: (c) 2013-present by Abhinav Singh and contributors.
|
||||
:license: BSD, see LICENSE for more details.
|
||||
"""
|
||||
import logging
|
||||
import os
|
||||
import logging
|
||||
import tempfile
|
||||
from typing import Optional, BinaryIO
|
||||
|
||||
from ....common.flag import flags
|
||||
from ....common.utils import text_
|
||||
from ....http.parser import HttpParser
|
||||
from typing import BinaryIO, Optional
|
||||
|
||||
from .base import CacheStore
|
||||
from ....common.flag import flags
|
||||
from ....http.parser import HttpParser
|
||||
from ....common.utils import text_
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -16,15 +16,17 @@
|
|||
"""
|
||||
import logging
|
||||
|
||||
|
||||
try:
|
||||
import httpx
|
||||
except ImportError: # pragma: no cover
|
||||
pass
|
||||
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from ..common.flag import flags
|
||||
from ..http.proxy import HttpProxyBasePlugin
|
||||
from ..common.flag import flags
|
||||
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
|
|
|
@ -13,8 +13,7 @@
|
|||
dns
|
||||
"""
|
||||
import socket
|
||||
|
||||
from typing import Optional, Tuple
|
||||
from typing import Tuple, Optional
|
||||
|
||||
from ..http.proxy import HttpProxyBasePlugin
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue