Skip to content

Commit 4b39ba9

Browse files
authored
Merge pull request #66 from itaru2622/issue65
proxy authentication support on Streaming API (websocket x http_proxy_auth).
2 parents e338d74 + d07cc4f commit 4b39ba9

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

ripe/atlas/cousteau/stream.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,11 +123,14 @@ def _get_proxy_options(self):
123123
return {}
124124

125125
parsed = urlparse(proxy_url)
126-
return {
126+
res = {
127127
"proxy_type": parsed.scheme,
128128
"http_proxy_host": parsed.hostname,
129129
"http_proxy_port": parsed.port,
130130
}
131+
if parsed.username is not None:
132+
res.update({ "http_proxy_auth" : (parsed.username, parsed.password) })
133+
return res
131134

132135
def connect(self) -> None:
133136
while self.ws is None:

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
install_requires = [
1010
"python-dateutil",
1111
"requests>=2.7.0",
12-
"websocket-client~=1.3.1",
12+
"websocket-client~=1.6.2",
1313
"typing-extensions",
1414
]
1515

0 commit comments

Comments
 (0)