Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible interoperability problem with js-libp2p (WS transport) #195

Open
mriesen opened this issue Jul 19, 2021 · 0 comments
Open

Possible interoperability problem with js-libp2p (WS transport) #195

mriesen opened this issue Jul 19, 2021 · 0 comments

Comments

@mriesen
Copy link

mriesen commented Jul 19, 2021

I stumbled across a possible interoperability problem with js-libp2p.
While playing around with a browser instance of js-libp2p, I tried to ping my jvm-libp2p instance over WS transport.

The JS version uses the multiaddress including the p2p protocol prefix and the peer id to call other peers.
This is not the case for the JVM version.

Since I see no possibility to set the peer id of the node in the host builder, I used the following multiaddress for listening on the JVM side:
/ip4/127.0.0.1/tcp/PORT/ws/
Where PORT is my port.
It seems like the WebSocket is opened at ws://127.0.0.1:PORT/

The call ws://127.0.0.1:PORT/p2p/PEER_ID leads to nowhere.
The JS version calls the URL above if the following multiaddress is given:
/ip4/127.0.0.1/tcp/PORT/ws/ipfs/PEER_ID

Am I doing something wrong or is there a fix for this problem?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant