python-socks 2.7.3__py3-none-any.whl → 2.8.1__py3-none-any.whl
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/_connectors/socks5_async.py +2 -1
- python_socks/_connectors/socks5_sync.py +2 -1
- python_socks/_errors.py +10 -6
- python_socks/_version.py +1 -1
- python_socks/sync/_stream.py +1 -1
- {python_socks-2.7.3.dist-info → python_socks-2.8.1.dist-info}/METADATA +1 -1
- {python_socks-2.7.3.dist-info → python_socks-2.8.1.dist-info}/RECORD +10 -10
- {python_socks-2.7.3.dist-info → python_socks-2.8.1.dist-info}/WHEEL +1 -1
- {python_socks-2.7.3.dist-info → python_socks-2.8.1.dist-info}/licenses/LICENSE.txt +0 -0
- {python_socks-2.7.3.dist-info → python_socks-2.8.1.dist-info}/top_level.txt +0 -0
|
@@ -72,7 +72,7 @@ class Socks5AsyncConnector(AsyncConnector):
|
|
|
72
72
|
|
|
73
73
|
# noinspection PyMethodMayBeStatic
|
|
74
74
|
async def _read_reply(self, stream: AsyncSocketStream) -> bytes:
|
|
75
|
-
data = await stream.read_exact(
|
|
75
|
+
data = await stream.read_exact(3)
|
|
76
76
|
if data[0] != socks5.SOCKS_VER:
|
|
77
77
|
return data
|
|
78
78
|
if data[1] != socks5.ReplyCode.SUCCEEDED:
|
|
@@ -80,6 +80,7 @@ class Socks5AsyncConnector(AsyncConnector):
|
|
|
80
80
|
if data[2] != socks5.RSV:
|
|
81
81
|
return data
|
|
82
82
|
|
|
83
|
+
data += await stream.read_exact(1)
|
|
83
84
|
addr_type = data[3]
|
|
84
85
|
|
|
85
86
|
if addr_type == socks5.AddressType.IPV4:
|
|
@@ -63,7 +63,7 @@ class Socks5SyncConnector(SyncConnector):
|
|
|
63
63
|
|
|
64
64
|
# noinspection PyMethodMayBeStatic
|
|
65
65
|
def _read_reply(self, stream: SyncSocketStream) -> bytes:
|
|
66
|
-
data = stream.read_exact(
|
|
66
|
+
data = stream.read_exact(3)
|
|
67
67
|
if data[0] != socks5.SOCKS_VER:
|
|
68
68
|
return data
|
|
69
69
|
if data[1] != socks5.ReplyCode.SUCCEEDED:
|
|
@@ -71,6 +71,7 @@ class Socks5SyncConnector(SyncConnector):
|
|
|
71
71
|
if data[2] != socks5.RSV:
|
|
72
72
|
return data
|
|
73
73
|
|
|
74
|
+
data += stream.read_exact(1)
|
|
74
75
|
addr_type = data[3]
|
|
75
76
|
|
|
76
77
|
if addr_type == socks5.AddressType.IPV4:
|
python_socks/_errors.py
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
-
class
|
|
2
|
-
|
|
3
|
-
super().__init__(message)
|
|
4
|
-
self.error_code = error_code
|
|
1
|
+
class ProxyException(Exception):
|
|
2
|
+
pass
|
|
5
3
|
|
|
6
4
|
|
|
7
|
-
class ProxyTimeoutError(TimeoutError):
|
|
5
|
+
class ProxyTimeoutError(ProxyException, TimeoutError):
|
|
8
6
|
pass
|
|
9
7
|
|
|
10
8
|
|
|
11
|
-
class ProxyConnectionError(OSError):
|
|
9
|
+
class ProxyConnectionError(ProxyException, OSError):
|
|
12
10
|
pass
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
class ProxyError(ProxyException):
|
|
14
|
+
def __init__(self, message, error_code=None):
|
|
15
|
+
super().__init__(message)
|
|
16
|
+
self.error_code = error_code
|
python_socks/_version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__title__ = 'python-socks'
|
|
2
|
-
__version__ = '2.
|
|
2
|
+
__version__ = '2.8.1'
|
python_socks/sync/_stream.py
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
python_socks/__init__.py,sha256=gKywvwx_x4_0hWJEa2eif1dPzP9YeFXJdrNlHuvFmC8,367
|
|
2
2
|
python_socks/_abc.py,sha256=_juTZE0iqoTChE53IHjBKEYFO-fxYZfPhdUc6EgFlwE,909
|
|
3
|
-
python_socks/_errors.py,sha256=
|
|
3
|
+
python_socks/_errors.py,sha256=M2KkgCrFy_ebEqw7JoxCWMjIIQ5Zu_B7YlXYhsLo-gk,329
|
|
4
4
|
python_socks/_helpers.py,sha256=UacO07M9i8G8CfqzBYWnehgCTFbZTlwJWAsFoXR3mVk,2708
|
|
5
5
|
python_socks/_types.py,sha256=dgQifNf2mIwdKoX7YmI91H_lUsW9-Y0ZkZGlIV6_NNw,90
|
|
6
|
-
python_socks/_version.py,sha256=
|
|
6
|
+
python_socks/_version.py,sha256=e7j6da3GYTfq-hRQ9-hzCSija3gACzgMjjpG6A56uGs,49
|
|
7
7
|
python_socks/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
8
8
|
python_socks/_connectors/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
python_socks/_connectors/abc.py,sha256=1fgjPiv64UAMiJDsJXYr-GofPGhuHTwTzaodQfrzf7Q,397
|
|
@@ -13,8 +13,8 @@ python_socks/_connectors/http_async.py,sha256=vo8QhluTYEqnIoxL2XPcj9vSl8yhu9Tvm4
|
|
|
13
13
|
python_socks/_connectors/http_sync.py,sha256=Q6DRrUCljokQe2veoJJ6G8SZ7QEmq8x4_Q-faSADLEY,926
|
|
14
14
|
python_socks/_connectors/socks4_async.py,sha256=QGoB1are0qU-uoPCUvanFBUvSCyFxgKN_XVMKSrDoYY,1179
|
|
15
15
|
python_socks/_connectors/socks4_sync.py,sha256=yX4e3xMOHH1OzVPTYROeQDBf8gcZcXODFOxBHyRtVOc,1148
|
|
16
|
-
python_socks/_connectors/socks5_async.py,sha256=
|
|
17
|
-
python_socks/_connectors/socks5_sync.py,sha256=
|
|
16
|
+
python_socks/_connectors/socks5_async.py,sha256=qniozb0P8gtXF_vK3b7kjRmoGNMHmYAb9eIZg-heI8k,2829
|
|
17
|
+
python_socks/_connectors/socks5_sync.py,sha256=G_FW1XsiaMDbzR7vcBMtRpD3R9LpO5V5zu9pltpo7xI,2602
|
|
18
18
|
python_socks/_protocols/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
19
19
|
python_socks/_protocols/errors.py,sha256=4XqU4AqgrWaedmUVGMjd6TvQKXv3mV0H76s5lf8aazY,150
|
|
20
20
|
python_socks/_protocols/http.py,sha256=QhLHqBgc6DfsvC8AIhylN1tjfk7QzxgwemrK1LuL3vk,4499
|
|
@@ -63,15 +63,15 @@ python_socks/sync/_chain.py,sha256=do_WtGenqKAG7B50nNZdltFqEQV8t-mSlGnMACNIwgE,9
|
|
|
63
63
|
python_socks/sync/_connect.py,sha256=N1Y-uQXkOiJ_dxkwWHw1fBliIQlTL47ydql7IvaSqm8,344
|
|
64
64
|
python_socks/sync/_proxy.py,sha256=Ny2QA8GI2aCUm0JL8IfY2j2IaXKzAZNp6bZeF7OmwYA,3287
|
|
65
65
|
python_socks/sync/_resolver.py,sha256=2rf9-NdjRktYrab1Oyv9ZJLKByP95ysFmRE3TgjRCSA,547
|
|
66
|
-
python_socks/sync/_stream.py,sha256=
|
|
66
|
+
python_socks/sync/_stream.py,sha256=VeR-_ERvn5x_PjxFsPy88llEiNfTuejvXoZkAxlqOuY,811
|
|
67
67
|
python_socks/sync/v2/__init__.py,sha256=eVZc6zh0pLhNMf_uSPZiH_1vNGEvedwzX5gObUSkRT8,116
|
|
68
68
|
python_socks/sync/v2/_chain.py,sha256=IRVMioTVWwxylZ8maD5Gqxhhgw4VyrG5vo_hAOuEn8Q,579
|
|
69
69
|
python_socks/sync/v2/_connect.py,sha256=QrZ1CZimYCUMUuaD8JdUblwlqlzIbqFrbsPwMzoxGkM,420
|
|
70
70
|
python_socks/sync/v2/_proxy.py,sha256=7FuO6wML0DkEonoGAprhTlVd8fazOgNeNrJyxABmP1Q,3621
|
|
71
71
|
python_socks/sync/v2/_ssl_transport.py,sha256=MURwzvKu-S2-MI7o8KaZTvvBFOiiKIu5R0ERVIMvERE,6088
|
|
72
72
|
python_socks/sync/v2/_stream.py,sha256=Jq89x1xmIX3L_v-WyS1nRTItjTnYTcDcfDblsANxfJI,1544
|
|
73
|
-
python_socks-2.
|
|
74
|
-
python_socks-2.
|
|
75
|
-
python_socks-2.
|
|
76
|
-
python_socks-2.
|
|
77
|
-
python_socks-2.
|
|
73
|
+
python_socks-2.8.1.dist-info/licenses/LICENSE.txt,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
|
|
74
|
+
python_socks-2.8.1.dist-info/METADATA,sha256=jDS83DnufjrnQhuWQBgKuXA7h0KMUNre3G83vwrOXC4,8151
|
|
75
|
+
python_socks-2.8.1.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
|
|
76
|
+
python_socks-2.8.1.dist-info/top_level.txt,sha256=7qyDAVwjTZ0sIYG1iatFbE-SLpWhONjaoMQ0Ib2DX0Q,13
|
|
77
|
+
python_socks-2.8.1.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|