We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents de2632b + 597c2b2 commit 7b8f81bCopy full SHA for 7b8f81b
socks.py
@@ -59,9 +59,21 @@
59
from errno import EOPNOTSUPP, EINVAL, EAGAIN
60
from io import BytesIO
61
from os import SEEK_CUR
62
+import os
63
from collections import Callable
64
from base64 import b64encode
65
66
+
67
+if os.name == 'nt':
68
+ try:
69
+ import win_inet_pton
70
+ import socket
71
+ except ImportError:
72
+ raise ImportError('To run PySocks under windows you need to install win_inet_pton')
73
+else:
74
75
76
77
PROXY_TYPE_SOCKS4 = SOCKS4 = 1
78
PROXY_TYPE_SOCKS5 = SOCKS5 = 2
79
PROXY_TYPE_HTTP = HTTP = 3
0 commit comments