-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deterministically de-dupe mdns connections (#112)
* feat: handle duplicate connections by sorting {remote,local}.publicKeys We added a check to always close the same connection from both sides, using `b4a.compare(publicKey, remotePublicKey)` additionally we: * destroy the socket instead of closing to match hypercore implementation, and take care of handling posible error events * close mdns connection if its not from a localAddress * add the remote address and port to PeerInfo (instead of local address and port) * feat: correctly handling checking of privateIp Basically, only allow local connections on mdns, using `private-ip` * chore: added package-lock.json --------- Co-authored-by: Tomás Ciccola <[email protected]>
- Loading branch information
1 parent
954e1b1
commit b918ce1
Showing
3 changed files
with
130 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters