mirror of
https://github.com/aljazceru/python-nostr.git
synced 2025-12-19 07:14:23 +01:00
Merge branch 'main' into feat/count_events
This commit is contained in:
@@ -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, "🔴")
|
||||
|
||||
Reference in New Issue
Block a user