You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

关于IPFS p2p实验特性基础使用方法的技术问询

Understanding IPFS P2P Listener Basics

Let’s walk through your questions one by one to clear up the confusion:

1. What does "application" refer to in the address /ip4/127.0.0.1/tcp/10101?

The "application" here is any TCP-based service running locally on Node A—it’s not an IPFS附属 tool, but an independent service you’ve started on Node A’s machine. For example, this could be a local HTTP server, a database service, or a custom TCP program you wrote. IPFS p2p acts as a bridge to expose this local service to other IPFS nodes, even if your machine is behind a NAT or firewall that blocks direct external access.

2. What does "transfer p2p connections" mean, and is this address a standard host:port format?

  • "Transfer p2p connections" essentially means IPFS creates an encrypted, peer-to-peer tunnel between nodes. Instead of external nodes trying to connect directly to your local 127.0.0.1:10101 (which is usually inaccessible from outside your network), IPFS routes the connection through its global p2p network, forwarding traffic to your local service seamlessly.
  • Yes, this is a standard host:port format—just wrapped in IPFS’s multiaddr syntax. /ip4/127.0.0.1/tcp/10101 directly maps to the familiar 127.0.0.1:10101; IPFS uses multiaddrs to standardize how network addresses are represented across different protocols.

3. How do I connect to Node A’s listener from another node?

Here’s the step-by-step process:

  1. On Node A, get its unique peer ID by running:
    ipfs id
    
    Copy the ID field (it looks like a long string starting with Qm... or 12D3Koo...).
  2. On Node B, run the dial command to create a local mapping to Node A’s listener:
    ipfs p2p dial <NODE_A_PEER_ID> p2p-test /ip4/127.0.0.1/tcp/20202
    
    Replace <NODE_A_PEER_ID> with the actual peer ID you copied, and 20202 with any unused local port on Node B.
  3. Now, any traffic Node B sends to 127.0.0.1:20202 will be routed through the IPFS p2p tunnel straight to Node A’s 127.0.0.1:10101 service.

Note: If Node A is behind a NAT, you may need to ensure it’s reachable on the IPFS network—either by having a public IP, using an IPFS relay node, or enabling hole-punching features.

内容的提问来源于stack exchange,提问作者Vadim Filin

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 06:42:08