multiaddr | Composable and future-proof network addresses | Networking library
kandi X-RAY | multiaddr Summary
kandi X-RAY | multiaddr Summary
Multiaddr aims to make network addresses future-proof, composable, and efficient. Current addressing schemes have a number of problems. Multiaddr solves these problems by modelling network addresses as arbitrary encapsulations of protocols. Multiaddr was originally thought up by @jbenet.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of multiaddr
multiaddr Key Features
multiaddr Examples and Code Snippets
Community Discussions
Trending Discussions on multiaddr
QUESTION
So my issue is that when mapping a class to JSON, it won't map all the fields the class has
Card:
...ANSWER
Answered 2021-Jan-28 at 10:26The problem is here
QUESTION
I'm trying to connect a browser js-ipfs
node to a my NodeJS server that is running an js-ipfs
node as well. I understand that I need to add in the server's Multiaddr
to the browser's bootstrap config in order to connect the two nodes.
However, since my website uses HTTPS
, when I try to connect the browser to my server via ws
it gives this warning: An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.
but from my understanding NodeJS's js-ipfs
cannot listen to wss
calls.
So how can I go about connecting the two nodes? Is using WebSockets the only or best way?
...ANSWER
Answered 2020-Nov-06 at 20:10Due to browser’s security policies you cannot establish unencrypted connection from secure context (e.g. page loaded via HTTPS). You can read about it at MDN Secure Context. So you should make your server to use SSL and then replace ws:// with wss://. The simplest thing to do would be to setup SSL with nginx. You’ll need to setup a domain name for the cert too. You can also look on some documentation on how to setup libp2p/IPFS with SSL on this PR.
You can also use webrtc-star
instead of websockets. However, while you can use both, each one of them have particularities that are better for certain scenarios. If you need peer discovery, webrtc-star
should be used at the moment and you can check https://github.com/libp2p/js-libp2p/tree/master/examples/libp2p-in-the-browser and https://github.com/ipfs/js-ipfs/tree/master/examples/browser-exchange-files . If you do not need to rely on peer discovery and the other peer is a well known peer you can use bootstrap and connect via websockets.
QUESTION
I am trying to install some packages for Python. When installing web3, I get an error saying there is no version that satisfies rusty-rlp. Other packages get installed fine. I am using
pip version: 20.2.3
python version: 3.8.5
OS: Windows 10
IDE: PyCharm Community Edition
...ANSWER
Answered 2020-Oct-02 at 12:04I had the same issue. As I was trying to install the rusty-rlp package itself downloading the files from the web, I realized there is no option (wheel or zip file) for 32-bit python installations. I'm on a 64-bit windows PC but for some reason I had a Python-32bit version running so, I Installed Python38-64bit and runned Pip again and the issue with web3 disappeared.
Try it and let me know if you need more info!
QUESTION
I'm using this code to play around with IPFS in the browser. I'm wondering how I can access the ip addresses of the webRTC peers? or even know if the peers are actually webRTC, or http peers?
...ANSWER
Answered 2020-Sep-02 at 17:22Looking at your config, it seems that you did not configure any swarm address. A swarm address must be configured for your peer to be diable from other peers in the network.
Some context, in this specific case, you are dealing with a browser environment. Currently, Browsers do not allow listening for connections. One of the limitations is actually that a browser does not provide an "IP Address" that someone can use to reach to it. They are designed in a client-server model where the server IP Address is known and the client will establish the connection with it.
As one of the ways to solve the issue above, there is libp2p-webrtc-star transport. It basically uses a server that will be responsible for listening for connections on behalf of browser nodes. You can use one of the available servers for experimenting https://github.com/libp2p/js-libp2p-webrtc-star#hosted-rendezvous-server. Basically, you should add to your swarm addresses, a multiaddr such as /dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star
. Once your node starts, your browser node will establish a connection with the server and the server will inform all the other peers about the peer who joined. These peers can dial your peer via this star server and the multiaddrs will look something like: /dns4/wrtc-star1.par.dwebops.pub/tcp/443/wss/p2p-webrtc-star/p2p/QmSoLPppuBtQSGwKDZT2M73ULpjvfd3aZ6ha4oFGL1KrGM
.
With this setup, you should be able to open multiple browsers and peers discover and connect to each other. If you run the ipfs.swarm.peers
you should see the addresses of the other nodes peers via the star server.
I hope this helps you move forward. I also highly recommend you to check the following examples:
- https://github.com/ipfs/js-ipfs/tree/master/examples/browser-exchange-files
- https://github.com/libp2p/js-libp2p/blob/master/examples/libp2p-in-the-browser
As a complement, there are a few new features being worked on that aim to improve the browser experience in this regard. You can follow the developments on: https://github.com/libp2p/js-libp2p/issues/703
QUESTION
I try to process a multicast packet stream in Linux. For 266s - 278s (it is not always exactly the same time period) the receiving works fine, but after that, no packets are received anymore.
This is how I initialize the multicast:
...ANSWER
Answered 2020-Feb-25 at 14:44Multicast is not a trivial thing. From what you are describing, the following happens:
When you perform
QUESTION
I'm trying trying to redirect a tcp connection to a transparent proxy without iptables. iptables is definitely not an option. Is it possible set original destination on a socket? Here is the code I wrote in go:
...ANSWER
Answered 2020-Feb-03 at 02:12SO_ORIGINAL_DST is only used to get the original destination IP address of a redirected socket. The redirection itself must be done with iptables.
QUESTION
I'm trying to get a PeerInfo
from a libp2p.Host
instance. I'm able to get a list of multiaddr.Multiaddr
s by calling Host.Addrs()
, but I'm unable to convert these into a valid peerstore.PeerInfo
.
Here is my attempt, which panics with the error panic: invalid p2p multiaddr
.
ANSWER
Answered 2018-Oct-24 at 13:12PeerInfo is a struct that encapsulates a peer ID and its multiaddrs. To build a PeerInfo from a Host easily, you can simply do the following:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install multiaddr
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page