python-socks 2.5.3__tar.gz → 2.6.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_socks-2.5.3/python_socks.egg-info → python_socks-2.6.1}/PKG-INFO +32 -13
- {python_socks-2.5.3 → python_socks-2.6.1}/README.md +4 -4
- python_socks-2.6.1/pyproject.toml +69 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_abc.py +3 -26
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/factory_async.py +4 -3
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/factory_sync.py +4 -3
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/http_async.py +3 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/http_sync.py +3 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/socks4_async.py +3 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/socks4_sync.py +3 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/socks5_async.py +4 -3
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/socks5_sync.py +4 -3
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_helpers.py +17 -10
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_protocols/http.py +3 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_protocols/socks4.py +2 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_protocols/socks5.py +7 -7
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_version.py +1 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/_proxy_chain.py +9 -4
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/_chain.py +6 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/_connect.py +2 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/_proxy.py +21 -10
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/v2/_chain.py +6 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/v2/_connect.py +2 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/v2/_proxy.py +16 -10
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/_connect.py +1 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/_proxy.py +35 -40
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/v2/_chain.py +6 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/v2/_connect.py +1 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/v2/_proxy.py +23 -16
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/v2/_stream.py +5 -45
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/curio/_proxy.py +22 -9
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/_proxy.py +22 -9
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/v2/_chain.py +6 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/v2/_connect.py +2 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/v2/_proxy.py +16 -10
- python_socks-2.6.1/python_socks/py.typed +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/_chain.py +8 -5
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/_connect.py +1 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/_proxy.py +20 -9
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/_connect.py +1 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/_proxy.py +14 -11
- {python_socks-2.5.3 → python_socks-2.6.1/python_socks.egg-info}/PKG-INFO +32 -13
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks.egg-info/SOURCES.txt +20 -1
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks.egg-info/requires.txt +2 -2
- python_socks-2.6.1/tests/__pycache__/__init__.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/config.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/conftest.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/http_app.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/http_server.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/mocks.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/proxy_server.cpython-313.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_misc.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_aio.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_aio.cpython-38-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_aio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_anyio.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_anyio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_curio.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_trio.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_trio.cpython-38-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_async_trio_v2.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_sync.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_proxy_sync_v2.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/test_resolvers.cpython-313-pytest-8.0.2.pyc +0 -0
- python_socks-2.6.1/tests/__pycache__/utils.cpython-313.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_aio.py +1 -2
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_trio.py +1 -2
- python_socks-2.5.3/pyproject.toml +0 -9
- python_socks-2.5.3/setup.py +0 -58
- python_socks-2.5.3/tests/__pycache__/test_proxy_async_aio.cpython-38-pytest-8.0.2.pyc +0 -0
- python_socks-2.5.3/tests/__pycache__/test_proxy_async_trio.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/LICENSE.txt +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/MANIFEST.in +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_connectors/abc.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_errors.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_protocols/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_protocols/errors.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/_types.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/_resolver.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/v2/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/anyio/v2/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/_resolver.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/asyncio/v2/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/curio/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/curio/_connect.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/curio/_resolver.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/curio/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/_connect.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/_resolver.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/v2/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/async_/trio/v2/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/_resolver.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/_chain.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/_ssl_transport.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks/sync/v2/_stream.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks.egg-info/dependency_links.txt +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/python_socks.egg-info/top_level.txt +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/setup.cfg +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__init__.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/__init__.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/config.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/conftest.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_app.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/http_server.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/mocks.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/proxy_server.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_aio_ext.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_curio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_curio.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_curio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_trio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_trio.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_async_trio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_sync.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_sync.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_core_socks_sync.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_misc.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_ext.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_aio_v2.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_anyio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_curio.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_async_trio_v2.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_proxy_sync_v2.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-310-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-311-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-312-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-36-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-36-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-37-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-38-pytest-8.0.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-39-pytest-6.2.2.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-39-pytest-6.2.5.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/test_resolvers.cpython-39-pytest-7.0.1.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-310.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-311.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-312.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-36.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-37.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-38.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/__pycache__/utils.cpython-39.pyc +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/config.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/conftest.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/http_app.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/http_server.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/mocks.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/proxy_server.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_misc.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_aio_v2.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_anyio.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_anyio_v2.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_curio.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_async_trio_v2.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_sync.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_proxy_sync_v2.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/test_resolvers.py +0 -0
- {python_socks-2.5.3 → python_socks-2.6.1}/tests/utils.py +0 -0
|
@@ -1,18 +1,37 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: python-socks
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary:
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Keywords: socks
|
|
3
|
+
Version: 2.6.1
|
|
4
|
+
Summary: Proxy (SOCKS4, SOCKS5, HTTP CONNECT) client for Python
|
|
5
|
+
Author-email: Roman Snegirev <snegiryev@gmail.com>
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: homepage, https://github.com/romis2012/python-socks
|
|
8
|
+
Project-URL: repository, https://github.com/romis2012/python-socks
|
|
9
|
+
Keywords: socks,socks5,socks4,http,proxy,asyncio,trio,curio,anyio
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Programming Language :: Python
|
|
12
|
+
Classifier: Programming Language :: Python :: 3
|
|
13
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
+
Classifier: Operating System :: MacOS
|
|
21
|
+
Classifier: Operating System :: Microsoft
|
|
22
|
+
Classifier: Operating System :: POSIX :: Linux
|
|
23
|
+
Classifier: Topic :: Internet :: WWW/HTTP
|
|
24
|
+
Classifier: Intended Audience :: Developers
|
|
25
|
+
Classifier: Framework :: AsyncIO
|
|
26
|
+
Classifier: Framework :: Trio
|
|
27
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
28
|
+
Requires-Python: >=3.8.0
|
|
10
29
|
Description-Content-Type: text/markdown
|
|
11
30
|
License-File: LICENSE.txt
|
|
12
31
|
Provides-Extra: asyncio
|
|
13
|
-
Requires-Dist: async-timeout>=
|
|
32
|
+
Requires-Dist: async-timeout>=4.0; python_version < "3.11" and extra == "asyncio"
|
|
14
33
|
Provides-Extra: trio
|
|
15
|
-
Requires-Dist: trio>=0.
|
|
34
|
+
Requires-Dist: trio>=0.24; extra == "trio"
|
|
16
35
|
Provides-Extra: curio
|
|
17
36
|
Requires-Dist: curio>=1.4; extra == "curio"
|
|
18
37
|
Provides-Extra: anyio
|
|
@@ -28,15 +47,15 @@ Requires-Dist: anyio<5.0.0,>=3.3.4; extra == "anyio"
|
|
|
28
47
|
-->
|
|
29
48
|
|
|
30
49
|
The `python-socks` package provides a core proxy client functionality for Python.
|
|
31
|
-
Supports SOCKS4(a)
|
|
50
|
+
Supports `SOCKS4(a)`, `SOCKS5(h)`, `HTTP CONNECT` proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
|
|
32
51
|
You probably don't need to use `python-socks` directly.
|
|
33
52
|
It is used internally by
|
|
34
53
|
[aiohttp-socks](https://github.com/romis2012/aiohttp-socks) and [httpx-socks](https://github.com/romis2012/httpx-socks) packages.
|
|
35
54
|
|
|
36
55
|
## Requirements
|
|
37
|
-
- Python >= 3.
|
|
38
|
-
- async-timeout >=
|
|
39
|
-
- trio >= 0.
|
|
56
|
+
- Python >= 3.8
|
|
57
|
+
- async-timeout >= 4.0 (optional)
|
|
58
|
+
- trio >= 0.24 (optional)
|
|
40
59
|
- curio >= 1.4 (optional)
|
|
41
60
|
- anyio >= 3.3.4 (optional)
|
|
42
61
|
|
|
@@ -8,15 +8,15 @@
|
|
|
8
8
|
-->
|
|
9
9
|
|
|
10
10
|
The `python-socks` package provides a core proxy client functionality for Python.
|
|
11
|
-
Supports SOCKS4(a)
|
|
11
|
+
Supports `SOCKS4(a)`, `SOCKS5(h)`, `HTTP CONNECT` proxy and provides sync and async (asyncio, trio, curio, anyio) APIs.
|
|
12
12
|
You probably don't need to use `python-socks` directly.
|
|
13
13
|
It is used internally by
|
|
14
14
|
[aiohttp-socks](https://github.com/romis2012/aiohttp-socks) and [httpx-socks](https://github.com/romis2012/httpx-socks) packages.
|
|
15
15
|
|
|
16
16
|
## Requirements
|
|
17
|
-
- Python >= 3.
|
|
18
|
-
- async-timeout >=
|
|
19
|
-
- trio >= 0.
|
|
17
|
+
- Python >= 3.8
|
|
18
|
+
- async-timeout >= 4.0 (optional)
|
|
19
|
+
- trio >= 0.24 (optional)
|
|
20
20
|
- curio >= 1.4 (optional)
|
|
21
21
|
- anyio >= 3.3.4 (optional)
|
|
22
22
|
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ['setuptools']
|
|
3
|
+
build-backend = 'setuptools.build_meta'
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = 'python-socks'
|
|
7
|
+
license = { text = 'Apache-2.0' }
|
|
8
|
+
description = 'Proxy (SOCKS4, SOCKS5, HTTP CONNECT) client for Python'
|
|
9
|
+
readme = 'README.md'
|
|
10
|
+
authors = [{ name = 'Roman Snegirev', email = 'snegiryev@gmail.com' }]
|
|
11
|
+
keywords = [
|
|
12
|
+
'socks',
|
|
13
|
+
'socks5',
|
|
14
|
+
'socks4',
|
|
15
|
+
'http',
|
|
16
|
+
'proxy',
|
|
17
|
+
'asyncio',
|
|
18
|
+
'trio',
|
|
19
|
+
'curio',
|
|
20
|
+
'anyio',
|
|
21
|
+
]
|
|
22
|
+
requires-python = ">=3.8.0"
|
|
23
|
+
dynamic = ['version']
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Development Status :: 5 - Production/Stable",
|
|
26
|
+
"Programming Language :: Python",
|
|
27
|
+
"Programming Language :: Python :: 3",
|
|
28
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
29
|
+
"Programming Language :: Python :: 3.8",
|
|
30
|
+
"Programming Language :: Python :: 3.9",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Programming Language :: Python :: 3.13",
|
|
35
|
+
"Operating System :: MacOS",
|
|
36
|
+
"Operating System :: Microsoft",
|
|
37
|
+
"Operating System :: POSIX :: Linux",
|
|
38
|
+
"Topic :: Internet :: WWW/HTTP",
|
|
39
|
+
"Intended Audience :: Developers",
|
|
40
|
+
"Framework :: AsyncIO",
|
|
41
|
+
"Framework :: Trio",
|
|
42
|
+
"License :: OSI Approved :: Apache Software License",
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
[project.optional-dependencies]
|
|
46
|
+
asyncio = ['async-timeout>=4.0; python_version < "3.11"']
|
|
47
|
+
trio = ['trio>=0.24']
|
|
48
|
+
curio = ['curio>=1.4']
|
|
49
|
+
anyio = ['anyio>=3.3.4,<5.0.0']
|
|
50
|
+
|
|
51
|
+
[project.urls]
|
|
52
|
+
homepage = 'https://github.com/romis2012/python-socks'
|
|
53
|
+
repository = 'https://github.com/romis2012/python-socks'
|
|
54
|
+
|
|
55
|
+
[tool.setuptools.dynamic]
|
|
56
|
+
version = { attr = 'python_socks.__version__' }
|
|
57
|
+
|
|
58
|
+
[tool.setuptools.packages.find]
|
|
59
|
+
include = ['python_socks*']
|
|
60
|
+
|
|
61
|
+
[tool.black]
|
|
62
|
+
line-length = 99
|
|
63
|
+
target-version = ['py38', 'py39', 'py310', 'py311', 'py312']
|
|
64
|
+
skip-string-normalization = true
|
|
65
|
+
preview = true
|
|
66
|
+
verbose = true
|
|
67
|
+
|
|
68
|
+
[tool.pytest.ini_options]
|
|
69
|
+
asyncio_mode = 'strict'
|
|
@@ -1,27 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
def connect(self, dest_host, dest_port, timeout=None, **kwargs):
|
|
3
|
-
raise NotImplementedError()
|
|
4
|
-
|
|
5
|
-
@property
|
|
6
|
-
def proxy_host(self):
|
|
7
|
-
raise NotImplementedError()
|
|
8
|
-
|
|
9
|
-
@property
|
|
10
|
-
def proxy_port(self):
|
|
11
|
-
raise NotImplementedError()
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
class AsyncProxy:
|
|
15
|
-
async def connect(self, dest_host, dest_port, timeout=None, **kwargs):
|
|
16
|
-
raise NotImplementedError()
|
|
17
|
-
|
|
18
|
-
@property
|
|
19
|
-
def proxy_host(self):
|
|
20
|
-
raise NotImplementedError()
|
|
21
|
-
|
|
22
|
-
@property
|
|
23
|
-
def proxy_port(self):
|
|
24
|
-
raise NotImplementedError()
|
|
1
|
+
from typing import Optional
|
|
25
2
|
|
|
26
3
|
|
|
27
4
|
class SyncResolver:
|
|
@@ -39,7 +16,7 @@ class SyncSocketStream:
|
|
|
39
16
|
def write_all(self, data: bytes):
|
|
40
17
|
raise NotImplementedError()
|
|
41
18
|
|
|
42
|
-
def read(self, max_bytes: int = None):
|
|
19
|
+
def read(self, max_bytes: Optional[int] = None):
|
|
43
20
|
raise NotImplementedError()
|
|
44
21
|
|
|
45
22
|
def read_exact(self, n: int):
|
|
@@ -53,7 +30,7 @@ class AsyncSocketStream:
|
|
|
53
30
|
async def write_all(self, data: bytes):
|
|
54
31
|
raise NotImplementedError()
|
|
55
32
|
|
|
56
|
-
async def read(self, max_bytes: int = None):
|
|
33
|
+
async def read(self, max_bytes: Optional[int] = None):
|
|
57
34
|
raise NotImplementedError()
|
|
58
35
|
|
|
59
36
|
async def read_exact(self, n: int):
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from .._abc import AsyncResolver
|
|
2
3
|
from .._types import ProxyType
|
|
3
4
|
|
|
@@ -9,9 +10,9 @@ from .http_async import HttpAsyncConnector
|
|
|
9
10
|
|
|
10
11
|
def create_connector(
|
|
11
12
|
proxy_type: ProxyType,
|
|
12
|
-
username: str,
|
|
13
|
-
password: str,
|
|
14
|
-
rdns: bool,
|
|
13
|
+
username: Optional[str],
|
|
14
|
+
password: Optional[str],
|
|
15
|
+
rdns: Optional[bool],
|
|
15
16
|
resolver: AsyncResolver,
|
|
16
17
|
) -> AsyncConnector:
|
|
17
18
|
if proxy_type == ProxyType.SOCKS4:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from .._abc import SyncResolver
|
|
2
3
|
from .._types import ProxyType
|
|
3
4
|
|
|
@@ -9,9 +10,9 @@ from .http_sync import HttpSyncConnector
|
|
|
9
10
|
|
|
10
11
|
def create_connector(
|
|
11
12
|
proxy_type: ProxyType,
|
|
12
|
-
username: str,
|
|
13
|
-
password: str,
|
|
14
|
-
rdns: bool,
|
|
13
|
+
username: Optional[str],
|
|
14
|
+
password: Optional[str],
|
|
15
|
+
rdns: Optional[bool],
|
|
15
16
|
resolver: SyncResolver,
|
|
16
17
|
) -> SyncConnector:
|
|
17
18
|
if proxy_type == ProxyType.SOCKS4:
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from .._abc import AsyncSocketStream, AsyncResolver
|
|
2
3
|
from .abc import AsyncConnector
|
|
3
4
|
|
|
@@ -7,8 +8,8 @@ from .._protocols import http
|
|
|
7
8
|
class HttpAsyncConnector(AsyncConnector):
|
|
8
9
|
def __init__(
|
|
9
10
|
self,
|
|
10
|
-
username: str,
|
|
11
|
-
password: str,
|
|
11
|
+
username: Optional[str],
|
|
12
|
+
password: Optional[str],
|
|
12
13
|
resolver: AsyncResolver,
|
|
13
14
|
):
|
|
14
15
|
self._username = username
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
from .._abc import SyncSocketStream, SyncResolver
|
|
2
3
|
from .abc import SyncConnector
|
|
3
4
|
|
|
@@ -7,8 +8,8 @@ from .._protocols import http
|
|
|
7
8
|
class HttpSyncConnector(SyncConnector):
|
|
8
9
|
def __init__(
|
|
9
10
|
self,
|
|
10
|
-
username: str,
|
|
11
|
-
password: str,
|
|
11
|
+
username: Optional[str],
|
|
12
|
+
password: Optional[str],
|
|
12
13
|
resolver: SyncResolver,
|
|
13
14
|
):
|
|
14
15
|
self._username = username
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import socket
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from .._abc import AsyncSocketStream, AsyncResolver
|
|
4
5
|
from .abc import AsyncConnector
|
|
@@ -10,8 +11,8 @@ from .._helpers import is_ip_address
|
|
|
10
11
|
class Socks4AsyncConnector(AsyncConnector):
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
13
|
-
user_id: str,
|
|
14
|
-
rdns: bool,
|
|
14
|
+
user_id: Optional[str],
|
|
15
|
+
rdns: Optional[bool],
|
|
15
16
|
resolver: AsyncResolver,
|
|
16
17
|
):
|
|
17
18
|
if rdns is None:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import socket
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from .._abc import SyncSocketStream, SyncResolver
|
|
4
5
|
from .abc import SyncConnector
|
|
@@ -10,8 +11,8 @@ from .._helpers import is_ip_address
|
|
|
10
11
|
class Socks4SyncConnector(SyncConnector):
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
13
|
-
user_id: str,
|
|
14
|
-
rdns: bool,
|
|
14
|
+
user_id: Optional[str],
|
|
15
|
+
rdns: Optional[bool],
|
|
15
16
|
resolver: SyncResolver,
|
|
16
17
|
):
|
|
17
18
|
if rdns is None:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import socket
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from .._abc import AsyncSocketStream, AsyncResolver
|
|
4
5
|
from .abc import AsyncConnector
|
|
@@ -10,9 +11,9 @@ from .._helpers import is_ip_address
|
|
|
10
11
|
class Socks5AsyncConnector(AsyncConnector):
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
13
|
-
username: str,
|
|
14
|
-
password: str,
|
|
15
|
-
rdns: bool,
|
|
14
|
+
username: Optional[str],
|
|
15
|
+
password: Optional[str],
|
|
16
|
+
rdns: Optional[bool],
|
|
16
17
|
resolver: AsyncResolver,
|
|
17
18
|
):
|
|
18
19
|
if rdns is None:
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import socket
|
|
2
|
+
from typing import Optional
|
|
2
3
|
|
|
3
4
|
from .._abc import SyncSocketStream, SyncResolver
|
|
4
5
|
from .abc import SyncConnector
|
|
@@ -10,9 +11,9 @@ from .._helpers import is_ip_address
|
|
|
10
11
|
class Socks5SyncConnector(SyncConnector):
|
|
11
12
|
def __init__(
|
|
12
13
|
self,
|
|
13
|
-
username: str,
|
|
14
|
-
password: str,
|
|
15
|
-
rdns: bool,
|
|
14
|
+
username: Optional[str],
|
|
15
|
+
password: Optional[str],
|
|
16
|
+
rdns: Optional[bool],
|
|
16
17
|
resolver: SyncResolver,
|
|
17
18
|
):
|
|
18
19
|
if rdns is None:
|
|
@@ -1,12 +1,17 @@
|
|
|
1
1
|
import functools
|
|
2
2
|
import re
|
|
3
|
+
from typing import Optional, Tuple
|
|
3
4
|
from urllib.parse import urlparse, unquote
|
|
4
5
|
|
|
5
6
|
from ._types import ProxyType
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
# pylint:disable-next=invalid-name
|
|
9
|
+
_ipv4_pattern = (
|
|
10
|
+
r'^(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}'
|
|
11
|
+
r'(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$'
|
|
12
|
+
)
|
|
9
13
|
|
|
14
|
+
# pylint:disable-next=invalid-name
|
|
10
15
|
_ipv6_pattern = (
|
|
11
16
|
r'^(?:(?:(?:[A-F0-9]{1,4}:){6}|(?=(?:[A-F0-9]{0,4}:){0,6}'
|
|
12
17
|
r'(?:[0-9]{1,3}\.){3}[0-9]{1,3}$)(([0-9A-F]{1,4}:){0,5}|:)'
|
|
@@ -15,7 +20,8 @@ _ipv6_pattern = (
|
|
|
15
20
|
r'(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[A-F0-9]{1,4}:){7}'
|
|
16
21
|
r'[A-F0-9]{1,4}|(?=(?:[A-F0-9]{0,4}:){0,7}[A-F0-9]{0,4}$)'
|
|
17
22
|
r'(([0-9A-F]{1,4}:){1,7}|:)((:[0-9A-F]{1,4}){1,7}|:)|(?:[A-F0-9]{1,4}:){7}'
|
|
18
|
-
r':|:(:[A-F0-9]{1,4}){7})$'
|
|
23
|
+
r':|:(:[A-F0-9]{1,4}){7})$'
|
|
24
|
+
)
|
|
19
25
|
|
|
20
26
|
_ipv4_regex = re.compile(_ipv4_pattern)
|
|
21
27
|
_ipv6_regex = re.compile(_ipv6_pattern, flags=re.IGNORECASE)
|
|
@@ -31,8 +37,9 @@ def _is_ip_address(regex, regexb, host):
|
|
|
31
37
|
elif isinstance(host, (bytes, bytearray, memoryview)):
|
|
32
38
|
return bool(regexb.match(host))
|
|
33
39
|
else:
|
|
34
|
-
raise TypeError(
|
|
35
|
-
|
|
40
|
+
raise TypeError(
|
|
41
|
+
'{} [{}] is not a str or bytes'.format(host, type(host)) # pragma: no cover
|
|
42
|
+
)
|
|
36
43
|
|
|
37
44
|
|
|
38
45
|
is_ipv4_address = functools.partial(_is_ip_address, _ipv4_regex, _ipv4_regexb)
|
|
@@ -43,7 +50,7 @@ def is_ip_address(host):
|
|
|
43
50
|
return is_ipv4_address(host) or is_ipv6_address(host)
|
|
44
51
|
|
|
45
52
|
|
|
46
|
-
def parse_proxy_url(url):
|
|
53
|
+
def parse_proxy_url(url: str) -> Tuple[ProxyType, str, int, Optional[str], Optional[str]]:
|
|
47
54
|
parsed = urlparse(url)
|
|
48
55
|
|
|
49
56
|
scheme = parsed.scheme
|
|
@@ -62,12 +69,12 @@ def parse_proxy_url(url):
|
|
|
62
69
|
|
|
63
70
|
try:
|
|
64
71
|
port = parsed.port
|
|
65
|
-
|
|
66
|
-
|
|
72
|
+
assert port is not None
|
|
73
|
+
except (ValueError, TypeError, AssertionError) as e: # pragma: no cover
|
|
74
|
+
raise ValueError('Invalid port component') from e
|
|
67
75
|
|
|
68
76
|
try:
|
|
69
|
-
username, password = (unquote(parsed.username),
|
|
70
|
-
unquote(parsed.password))
|
|
77
|
+
username, password = (unquote(parsed.username), unquote(parsed.password))
|
|
71
78
|
except (AttributeError, TypeError):
|
|
72
79
|
username, password = '', ''
|
|
73
80
|
|
|
@@ -3,6 +3,7 @@ from dataclasses import dataclass
|
|
|
3
3
|
import base64
|
|
4
4
|
import binascii
|
|
5
5
|
from collections import namedtuple
|
|
6
|
+
from typing import Optional
|
|
6
7
|
|
|
7
8
|
from .._version import __title__, __version__
|
|
8
9
|
|
|
@@ -88,8 +89,8 @@ class _Buffer:
|
|
|
88
89
|
class ConnectRequest:
|
|
89
90
|
host: str
|
|
90
91
|
port: int
|
|
91
|
-
username: str
|
|
92
|
-
password: str
|
|
92
|
+
username: Optional[str]
|
|
93
|
+
password: Optional[str]
|
|
93
94
|
|
|
94
95
|
def dumps(self) -> bytes:
|
|
95
96
|
buff = _Buffer()
|
|
@@ -2,6 +2,7 @@ import enum
|
|
|
2
2
|
import ipaddress
|
|
3
3
|
import socket
|
|
4
4
|
from dataclasses import dataclass
|
|
5
|
+
from typing import Optional
|
|
5
6
|
|
|
6
7
|
from .errors import ReplyError
|
|
7
8
|
from .._helpers import is_ipv4_address
|
|
@@ -38,7 +39,7 @@ ReplyMessages = {
|
|
|
38
39
|
class ConnectRequest:
|
|
39
40
|
host: str # hostname or IPv4 address
|
|
40
41
|
port: int
|
|
41
|
-
user_id: str
|
|
42
|
+
user_id: Optional[str]
|
|
42
43
|
|
|
43
44
|
def dumps(self):
|
|
44
45
|
port_bytes = self.port.to_bytes(2, 'big')
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import enum
|
|
2
2
|
import ipaddress
|
|
3
3
|
import socket
|
|
4
|
-
import
|
|
4
|
+
from typing import Optional, Union
|
|
5
5
|
from dataclasses import dataclass, field
|
|
6
6
|
|
|
7
7
|
from .errors import ReplyError
|
|
@@ -67,8 +67,8 @@ ReplyMessages = {
|
|
|
67
67
|
|
|
68
68
|
@dataclass
|
|
69
69
|
class AuthMethodsRequest:
|
|
70
|
-
username: str
|
|
71
|
-
password: str
|
|
70
|
+
username: Optional[str]
|
|
71
|
+
password: Optional[str]
|
|
72
72
|
methods: bytearray = field(init=False)
|
|
73
73
|
|
|
74
74
|
def __post_init__(self):
|
|
@@ -260,7 +260,7 @@ class StateServerWaitingForAuth:
|
|
|
260
260
|
|
|
261
261
|
@dataclass
|
|
262
262
|
class StateClientAuthenticated:
|
|
263
|
-
data:
|
|
263
|
+
data: Optional[AuthReply] = None
|
|
264
264
|
|
|
265
265
|
|
|
266
266
|
@dataclass
|
|
@@ -278,19 +278,19 @@ class StateServerConnected:
|
|
|
278
278
|
data: ConnectReply
|
|
279
279
|
|
|
280
280
|
|
|
281
|
-
Request =
|
|
281
|
+
Request = Union[
|
|
282
282
|
AuthMethodsRequest,
|
|
283
283
|
AuthRequest,
|
|
284
284
|
ConnectRequest,
|
|
285
285
|
]
|
|
286
286
|
|
|
287
|
-
Reply =
|
|
287
|
+
Reply = Union[
|
|
288
288
|
AuthMethodReply,
|
|
289
289
|
AuthReply,
|
|
290
290
|
ConnectReply,
|
|
291
291
|
]
|
|
292
292
|
|
|
293
|
-
ConnectionState =
|
|
293
|
+
ConnectionState = Union[
|
|
294
294
|
StateServerWaitingForAuthMethods,
|
|
295
295
|
StateClientSentAuthMethods,
|
|
296
296
|
StateServerWaitingForAuth,
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__title__ = 'python-socks'
|
|
2
|
-
__version__ = '2.
|
|
2
|
+
__version__ = '2.6.1'
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
from typing import Iterable
|
|
2
|
-
|
|
2
|
+
import warnings
|
|
3
3
|
|
|
4
4
|
|
|
5
5
|
class ProxyChain:
|
|
6
|
-
def __init__(self, proxies: Iterable
|
|
6
|
+
def __init__(self, proxies: Iterable):
|
|
7
|
+
warnings.warn(
|
|
8
|
+
'This implementation of ProxyChain is deprecated and will be removed in the future',
|
|
9
|
+
DeprecationWarning,
|
|
10
|
+
stacklevel=2,
|
|
11
|
+
)
|
|
7
12
|
self._proxies = proxies
|
|
8
13
|
|
|
9
14
|
async def connect(self, dest_host, dest_port, timeout=None):
|
|
@@ -16,14 +21,14 @@ class ProxyChain:
|
|
|
16
21
|
dest_host=proxies[i + 1].proxy_host,
|
|
17
22
|
dest_port=proxies[i + 1].proxy_port,
|
|
18
23
|
timeout=timeout,
|
|
19
|
-
_socket=curr_socket
|
|
24
|
+
_socket=curr_socket,
|
|
20
25
|
)
|
|
21
26
|
|
|
22
27
|
curr_socket = await proxies[length].connect(
|
|
23
28
|
dest_host=dest_host,
|
|
24
29
|
dest_port=dest_port,
|
|
25
30
|
timeout=timeout,
|
|
26
|
-
_socket=curr_socket
|
|
31
|
+
_socket=curr_socket,
|
|
27
32
|
)
|
|
28
33
|
|
|
29
34
|
return curr_socket
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
from typing import Iterable
|
|
2
|
+
import warnings
|
|
2
3
|
from ._proxy import AnyioProxy
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class ProxyChain:
|
|
6
7
|
def __init__(self, proxies: Iterable[AnyioProxy]):
|
|
8
|
+
warnings.warn(
|
|
9
|
+
'This implementation of ProxyChain is deprecated and will be removed in the future',
|
|
10
|
+
DeprecationWarning,
|
|
11
|
+
stacklevel=2,
|
|
12
|
+
)
|
|
7
13
|
self._proxies = proxies
|
|
8
14
|
|
|
9
15
|
async def connect(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
import anyio
|
|
2
3
|
import anyio.abc
|
|
3
4
|
|
|
@@ -5,7 +6,7 @@ import anyio.abc
|
|
|
5
6
|
async def connect_tcp(
|
|
6
7
|
host: str,
|
|
7
8
|
port: int,
|
|
8
|
-
local_host: str = None,
|
|
9
|
+
local_host: Optional[str] = None,
|
|
9
10
|
) -> anyio.abc.SocketStream:
|
|
10
11
|
|
|
11
12
|
return await anyio.connect_tcp(
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import ssl
|
|
2
|
-
from typing import Optional
|
|
2
|
+
from typing import Any, Optional
|
|
3
|
+
import warnings
|
|
3
4
|
|
|
4
5
|
import anyio
|
|
5
6
|
|
|
@@ -25,10 +26,10 @@ class AnyioProxy:
|
|
|
25
26
|
proxy_type: ProxyType,
|
|
26
27
|
host: str,
|
|
27
28
|
port: int,
|
|
28
|
-
username: str = None,
|
|
29
|
-
password: str = None,
|
|
30
|
-
rdns: bool = None,
|
|
31
|
-
proxy_ssl: ssl.SSLContext = None,
|
|
29
|
+
username: Optional[str] = None,
|
|
30
|
+
password: Optional[str] = None,
|
|
31
|
+
rdns: Optional[bool] = None,
|
|
32
|
+
proxy_ssl: Optional[ssl.SSLContext] = None,
|
|
32
33
|
):
|
|
33
34
|
self._proxy_type = proxy_type
|
|
34
35
|
self._proxy_host = host
|
|
@@ -44,13 +45,22 @@ class AnyioProxy:
|
|
|
44
45
|
self,
|
|
45
46
|
dest_host: str,
|
|
46
47
|
dest_port: int,
|
|
47
|
-
dest_ssl: ssl.SSLContext = None,
|
|
48
|
-
timeout: float = None,
|
|
49
|
-
|
|
48
|
+
dest_ssl: Optional[ssl.SSLContext] = None,
|
|
49
|
+
timeout: Optional[float] = None,
|
|
50
|
+
**kwargs: Any,
|
|
50
51
|
) -> AnyioSocketStream:
|
|
51
52
|
if timeout is None:
|
|
52
53
|
timeout = DEFAULT_TIMEOUT
|
|
53
54
|
|
|
55
|
+
_stream = kwargs.get('_stream')
|
|
56
|
+
if _stream is not None:
|
|
57
|
+
warnings.warn(
|
|
58
|
+
"The '_stream' argument is deprecated and will be removed in the future",
|
|
59
|
+
DeprecationWarning,
|
|
60
|
+
stacklevel=2,
|
|
61
|
+
)
|
|
62
|
+
|
|
63
|
+
local_host = kwargs.get('local_host')
|
|
54
64
|
try:
|
|
55
65
|
with anyio.fail_after(timeout):
|
|
56
66
|
if _stream is None:
|
|
@@ -59,6 +69,7 @@ class AnyioProxy:
|
|
|
59
69
|
await connect_tcp(
|
|
60
70
|
host=self._proxy_host,
|
|
61
71
|
port=self._proxy_port,
|
|
72
|
+
local_host=local_host,
|
|
62
73
|
)
|
|
63
74
|
)
|
|
64
75
|
except OSError as e:
|
|
@@ -117,10 +128,10 @@ class AnyioProxy:
|
|
|
117
128
|
return self._proxy_port
|
|
118
129
|
|
|
119
130
|
@classmethod
|
|
120
|
-
def create(cls, *args, **kwargs):
|
|
131
|
+
def create(cls, *args, **kwargs): # for backward compatibility
|
|
121
132
|
return cls(*args, **kwargs)
|
|
122
133
|
|
|
123
134
|
@classmethod
|
|
124
|
-
def from_url(cls, url: str, **kwargs):
|
|
135
|
+
def from_url(cls, url: str, **kwargs) -> 'AnyioProxy':
|
|
125
136
|
url_args = parse_proxy_url(url)
|
|
126
137
|
return cls(*url_args, **kwargs)
|
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
from typing import Sequence
|
|
2
|
+
import warnings
|
|
2
3
|
from ._proxy import AnyioProxy
|
|
3
4
|
|
|
4
5
|
|
|
5
6
|
class ProxyChain:
|
|
6
7
|
def __init__(self, proxies: Sequence[AnyioProxy]):
|
|
8
|
+
warnings.warn(
|
|
9
|
+
'This implementation of ProxyChain is deprecated and will be removed in the future',
|
|
10
|
+
DeprecationWarning,
|
|
11
|
+
stacklevel=2,
|
|
12
|
+
)
|
|
7
13
|
self._proxies = proxies
|
|
8
14
|
|
|
9
15
|
async def connect(
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
from typing import Optional
|
|
1
2
|
import anyio
|
|
2
3
|
import anyio.abc
|
|
3
4
|
from ._stream import AnyioSocketStream
|
|
@@ -6,7 +7,7 @@ from ._stream import AnyioSocketStream
|
|
|
6
7
|
async def connect_tcp(
|
|
7
8
|
host: str,
|
|
8
9
|
port: int,
|
|
9
|
-
local_host: str = None,
|
|
10
|
+
local_host: Optional[str] = None,
|
|
10
11
|
) -> AnyioSocketStream:
|
|
11
12
|
s = await anyio.connect_tcp(
|
|
12
13
|
remote_host=host,
|