Closed kasperisager closed 2 years ago
~@davidmarkclements The tests are failing on Windows as of Brittle 2.0.2. Do you know what might be causing this?~
This got sorted in 2.0.3 👌
@mafintosh This is ready for another look.
I broke the tests 💥
This pull request introduces support for externally managed secret keys to allow a relaying DHT node to act on behalf of another relayed node. A summary of the changes:
DHT.createServer()
andDHT.connect()
now accept two new options,createHandshake
andcreateSecretStream
, to allow callers to perform Noise handshaking and stream setup themselves. To ensure that the relaying DHT node can still hole punch on behalf of the relayed node,handshake.final()
is now required to return aholepunchSecret
key, but may leave out the Noise keys.server.listen()
now accepts two new options,signAnnounce
andsignUnannounce
, to allow callers to perform signing themselves.DHT.lookupAndUnannounce()
,DHT.unannounce()
, andDHT.announce()
now accept a new option,signUnannounce
, to allow callers to perform signing themselves.DHT.announce()
also accepts asignAnnounce
option andDHT.mutablePut()
accepts asignMutable
option.