Skip to content

Commit bda320f

Browse files
committed
require proxy type for tor connection
1 parent b105e65 commit bda320f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

nostr/relay.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ def connect(self, ssl_options: dict=None, proxy: dict=None):
4141
self.ws.run_forever(
4242
sslopt=ssl_options,
4343
http_proxy_host=None if proxy is None else proxy.get('host'),
44-
http_proxy_port=None if proxy is None else proxy.get('port')
44+
http_proxy_port=None if proxy is None else proxy.get('port'),
45+
proxy_type=None if proxy is None else proxy.get('type')
4546
)
4647

4748
def close(self):

nostr/relay_manager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def close_subscription(self, id: str):
3535
for relay in self.relays.values():
3636
relay.close_subscription(id)
3737

38-
def open_connections(self, ssl_options: dict=None, proxy: dict= None):
38+
def open_connections(self, ssl_options: dict=None, proxy: dict=None):
3939
for relay in self.relays.values():
4040
threading.Thread(
4141
target=relay.connect,

0 commit comments

Comments
 (0)