mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 12:49:55 +01:00
Only add the onion hostname to transport properties once.
This commit is contained in:
@@ -514,15 +514,15 @@ abstract class TorPlugin implements DuplexPlugin, EventHandler, EventListener {
|
|||||||
LOG.warning("Tor did not return a private key");
|
LOG.warning("Tor did not return a private key");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Publish the hidden service's onion hostname in transport properties
|
|
||||||
String onion3 = response.get(HS_ADDRESS);
|
String onion3 = response.get(HS_ADDRESS);
|
||||||
if (LOG.isLoggable(INFO)) {
|
if (LOG.isLoggable(INFO)) {
|
||||||
LOG.info("V3 hidden service " + scrubOnion(onion3));
|
LOG.info("V3 hidden service " + scrubOnion(onion3));
|
||||||
}
|
}
|
||||||
TransportProperties p = new TransportProperties();
|
|
||||||
p.put(PROP_ONION_V3, onion3);
|
|
||||||
callback.mergeLocalProperties(p);
|
|
||||||
if (privKey == null) {
|
if (privKey == null) {
|
||||||
|
// Publish the hidden service's onion hostname in transport props
|
||||||
|
TransportProperties p = new TransportProperties();
|
||||||
|
p.put(PROP_ONION_V3, onion3);
|
||||||
|
callback.mergeLocalProperties(p);
|
||||||
// Save the hidden service's private key for next time
|
// Save the hidden service's private key for next time
|
||||||
Settings s = new Settings();
|
Settings s = new Settings();
|
||||||
s.put(HS_PRIVATE_KEY_V3, response.get(HS_PRIVKEY));
|
s.put(HS_PRIVATE_KEY_V3, response.get(HS_PRIVKEY));
|
||||||
|
|||||||
Reference in New Issue
Block a user