Skip to content

Commit a503472

Browse files
author
3np
committed
rename tor_control_hashedpassword to tor_control_password
1 parent e048dab commit a503472

File tree

9 files changed

+23
-17
lines changed

9 files changed

+23
-17
lines changed

docs/PAYJOIN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,7 @@ tor_control_port = 9051
219219
# by default, the tor control connection used cookie auth, which assumes
220220
# the tor node to be running on a shared filesystem.
221221
# to authenticate to the tor control port using HashedControlPassword instead:
222-
#tor_control_hashedpassword=xxx
222+
#tor_control_password=xxx
223223
224224
# the host/port actually serving the hidden service
225225
# (note the *virtual port*, that the client uses,

docs/onion-message-channels.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ tor_control_port = 9051
4949
# by default, the tor control connection used cookie auth, which assumes
5050
# the tor node to be running on a shared filesystem.
5151
# to authenticate to the tor control port using HashedControlPassword instead:
52-
#tor_control_hashedpassword=xxx
52+
#tor_control_password=xxx
5353

5454
# the host/port actually serving the hidden service
5555
# (note the *virtual port*, that the client uses,

docs/tor.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,3 +102,9 @@ sudo vim /etc/tor/torrc
102102
ControlPort 9051
103103
HashedControlPassword RESULT_OF_hash-password
104104
```
105+
106+
Then add the same password to your joinmarket configuration:
107+
108+
```
109+
tor_control_password !CHANGEME!
110+
```

scripts/snicker/snicker-server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -302,15 +302,15 @@ def start_tor(self):
302302
if not self.local_port:
303303
control_host = jm_single().config.get("PAYJOIN", "tor_control_host")
304304
control_port = int(jm_single().config.get("PAYJOIN", "tor_control_port"))
305-
control_hashedpass = jm_single().config.get("PAYJOIN", "tor_control_hashedpasword")
305+
control_pass = jm_single().config.get("PAYJOIN", "tor_control_password")
306306
if str(control_host).startswith('unix:'):
307307
control_endpoint = UNIXClientEndpoint(reactor, control_host[5:])
308308
else:
309309
control_endpoint = TCP4ClientEndpoint(reactor, control_host, control_port)
310310

311311
password_cb = None
312-
if not control_hashedpass is None and len(str(control_hashedpass)) > 0:
313-
password_cb = lambda : control_hashedpass
312+
if not control_pass is None and len(str(control_pass)) > 0:
313+
password_cb = lambda : control_pass
314314

315315
d = txtorcon.connect(reactor, control_endpoint, password_function=password_cb)
316316
d.addCallback(self.create_onion_ep)

src/jmbase/twisted_utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def __init__(self, proto_factory_or_resource, info_callback,
137137
tor_control_port, serving_host, serving_port,
138138
virtual_port=None,
139139
shutdown_callback=None,
140-
tor_control_hashedpassword=None,
140+
tor_control_password=None,
141141
hidden_service_dir=""):
142142
if isinstance(proto_factory_or_resource, Resource):
143143
# TODO bad naming, in this case it doesn't start
@@ -159,7 +159,7 @@ def __init__(self, proto_factory_or_resource, info_callback,
159159
self.virtual_port = virtual_port
160160
self.tor_control_host = tor_control_host
161161
self.tor_control_port = tor_control_port
162-
self.tor_control_hashedpassword = tor_control_hashedpassword
162+
self.tor_control_password = tor_control_password
163163
# note that defaults only exist in jmclient
164164
# config object, so no default here:
165165
self.serving_host = serving_host
@@ -185,10 +185,10 @@ def start_tor(self):
185185
else:
186186
control_endpoint = TCP4ClientEndpoint(reactor,
187187
self.tor_control_host, self.tor_control_port)
188-
if self.tor_control_hashedpassword is None:
188+
if self.tor_control_password is None:
189189
d = txtorcon.connect(reactor, control_endpoint)
190190
else:
191-
d = txtorcon.connect(reactor, control_endpoint, password_function=lambda : self.tor_control_hashedpassword)
191+
d = txtorcon.connect(reactor, control_endpoint, password_function=lambda : self.tor_control_password)
192192
d.addCallback(self.create_onion_ep)
193193
d.addErrback(self.setup_failed)
194194
# TODO: add errbacks to the next two calls in

src/jmclient/client_protocol.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def connectionMade(self):
8787
netconfig = {"port": 80,
8888
"tor_control_host": jcg("PAYJOIN", "tor_control_host"),
8989
"tor_control_port": jcg("PAYJOIN", "tor_control_port"),
90-
"tor_control_hashedpassword": jcg("PAYJOIN", "tor_control_hashedpassword"),
90+
"tor_control_password": jcg("PAYJOIN", "tor_control_password"),
9191
"onion_serving_host": jcg("PAYJOIN", "onion_serving_host"),
9292
"onion_serving_port": jcg("PAYJOIN", "onion_serving_port")}
9393
d = self.callRemote(commands.BIP78ReceiverInit,

src/jmclient/configure.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def jm_single() -> AttributeDict:
161161
# by default, the tor control connection used cookie auth, which assumes
162162
# the tor node to be running on a shared filesystem.
163163
# to authenticate to the tor control port using HashedControlPassword instead:
164-
#tor_control_hashedpassword=xxx
164+
#tor_control_password=xxx
165165
166166
# the host/port actually serving the hidden service
167167
# (note the *virtual port*, that the client uses,
@@ -457,7 +457,7 @@ def jm_single() -> AttributeDict:
457457
# by default, the tor control connection used cookie auth, which assumes
458458
# the tor node to be running on a shared filesystem.
459459
# to authenticate to the tor control port using HashedControlPassword instead:
460-
#tor_control_hashedpassword=xxx
460+
#tor_control_password=xxx
461461
462462
# the host/port actually serving the hidden service
463463
# (note the *virtual port*, that the client uses,
@@ -542,7 +542,7 @@ def get_mchannels(mode: str = "TAKER") -> list:
542542
onion_fields = [("type", str), ("directory_nodes", str), ("regtest_count", str),
543543
("socks5_host", str), ("socks5_port", int),
544544
("tor_control_host", str), ("tor_control_port", int),
545-
("tor_control_hashedpassword", str),
545+
("tor_control_password", str),
546546
("onion_serving_host", str), ("onion_serving_port", int),
547547
("hidden_service_dir", str)]
548548

src/jmdaemon/daemon_protocol.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ def on_BIP78_RECEIVER_INIT(self, netconfig):
281281
self.serving_port = int(netconfig["port"])
282282
self.tor_control_host = netconfig["tor_control_host"]
283283
self.tor_control_port = int(netconfig["tor_control_port"])
284-
self.tor_control_hashedpassword = netconfig["tor_control_hashedpassword"]
284+
self.tor_control_password = netconfig["tor_control_password"]
285285
self.onion_serving_host=netconfig["onion_serving_host"]
286286
self.onion_serving_port=int(netconfig["onion_serving_port"])
287287
self.bip78_rr = BIP78ReceiverResource(self.info_callback,
@@ -295,7 +295,7 @@ def on_BIP78_RECEIVER_INIT(self, netconfig):
295295
self.tor_control_port,
296296
self.onion_serving_host,
297297
self.onion_serving_port,
298-
tor_control_hashedpassword=self.tor_control_hashedpassword,
298+
tor_control_password=self.tor_control_password,
299299
shutdown_callback=self.shutdown_callback)
300300
# this call will start bringing up the HS; when it's finished,
301301
# it will fire the `onion_hostname_callback`, or if it fails,

src/jmdaemon/onionmc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,7 @@ def __init__(self,
641641
self.serverport = self.hostid
642642
self.tor_control_host = configdata["tor_control_host"]
643643
self.tor_control_port = configdata["tor_control_port"]
644-
self.tor_control_hashedpassword = configdata["tor_control_hashedpassword"]
644+
self.tor_control_password = configdata["tor_control_password"]
645645
self.onion_serving_host = configdata["onion_serving_host"]
646646
self.onion_serving = configdata["serving"]
647647
if self.onion_serving:
@@ -692,7 +692,7 @@ def __init__(self,
692692
self.onion_serving_port,
693693
virtual_port=ONION_VIRTUAL_PORT,
694694
shutdown_callback=self.shutdown_callback,
695-
tor_control_hashedpassword=self.tor_control_hashedpassword,
695+
tor_control_password=self.tor_control_password,
696696
hidden_service_dir=self.hidden_service_dir)
697697
# this call will start bringing up the HS; when it's finished,
698698
# it will fire the `onion_hostname_callback`, or if it fails,

0 commit comments

Comments
 (0)