Merge branch 'main' into feat/count_events

This commit is contained in:
callebtc
2023-02-02 16:38:51 +01:00
18 changed files with 899 additions and 88 deletions

View File

@@ -49,10 +49,19 @@ class Relay:
on_pong=self._on_pong,
)
def connect(self, ssl_options: dict = {}):
def connect(self, ssl_options: dict=None, proxy: dict=None):
self.ssl_options = ssl_options
<<<<<<< HEAD
print(self.url, "🟢")
self.ws.run_forever(sslopt=self.ssl_options)
=======
self.ws.run_forever(
sslopt=ssl_options,
http_proxy_host=None if proxy is None else proxy.get('host'),
http_proxy_port=None if proxy is None else proxy.get('port'),
proxy_type=None if proxy is None else proxy.get('type')
)
>>>>>>> main
def close(self):
print(self.url, "🔴")