This repository has been archived by the owner on Aug 29, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 40
Method Transport#filter() doesn't matches unix sockets #132
Labels
exp/novice
Someone with a little familiarity can pick up
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
released
status/ready
Ready to be worked
Comments
jacobheun
added
kind/bug
A bug in existing code (including security flaws)
exp/novice
Someone with a little familiarity can pick up
P2
Medium: Good to have, but can wait until someone steps up
status/ready
Ready to be worked
labels
Jun 1, 2020
Filter needs to be updated here to check for tcp and unix multiaddrs. Unix could be added to the mafmt module, but that's probably unnecessary right now since we only support a single structure to the address ( |
achingbrain
pushed a commit
that referenced
this issue
Sep 14, 2022
This PR adds the functionality to handle UNIX domain sockets. * This works with plain `/unix` multiaddresses but is unable to handle p2p encapsulated addresses (`/unix/.../p2p/...`) due to ambiguity. Because of this it causes errors when attempting to use `/unix` addresses in js-libp2p because it appends the `/p2p` address. * On Windows this uses named pipes instead. Despite the fact that it does not work with `/unix` addresses in js-libp2p directly, this still remains useful and is needed in other projects like [js-libp2p-daemon](https://github.com/libp2p/js-libp2p-daemon). Refs #132. Co-authored-by: saul <saul@organicdesign.nz>
achingbrain
added a commit
that referenced
this issue
Nov 16, 2022
achingbrain
added a commit
that referenced
this issue
Nov 17, 2022
🎉 This issue has been resolved in version 6.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
exp/novice
Someone with a little familiarity can pick up
kind/bug
A bug in existing code (including security flaws)
P2
Medium: Good to have, but can wait until someone steps up
released
status/ready
Ready to be worked
According to the source code, TCP transport method
Transport#filter()
relies on mafmt's TCP matcher function (mafmt /src/index.js:18) which doesn't match unix sockets: src/index.js:135. So it's impossible to listen unix sockets. And attempts to provide unix path to Transport fails:The code throws
ERR_NO_VALID_ADDRESSES
. I'm not sure if it the TCP or mafmt package error. I'm not sure if it the TCP or mafmt package error, but while it's hard to understand which protocol is unix port listening I think it relates to this package.The text was updated successfully, but these errors were encountered: