Skip to content

vacp2p/identify-probe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

QUIC Identify Probe

A lightweight command-line diagnostic tool for probing libp2p peers over QUIC. It dials a target multiaddress, runs the identify protocol, and prints the remote peer's identity information to stdout.

What It Does

  1. Generates a throwaway Ed25519 keypair as the local identity
  2. Dials the specified peer over QUIC
  3. Waits for the remote peer to respond with an Identify message (up to 20 seconds)
  4. Prints the peer's identity details and exits

Output

On success, the tool prints the remote peer's:

  • Peer ID
  • Protocol version
  • Agent version
  • Observed address
  • Listen addresses
  • Supported protocols
  • Public key type

Diagnostic/progress messages (dialing, connection events, ping events) are written to stderr, while the final identify result is written to stdout.

Usage

cargo run -- /ip4/<node_public_ip>/udp/<swarm_port>/quic-v1

Example

cargo run -- /ip4/185.181.228.122/udp/31000/quic-v1
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.08s
     Running `target/debug/quic_identify_probe /ip4/185.181.228.122/udp/31000/quic-v1`
Local peer id: 12D3KooWCKKV5RFmb1CpAXC1Zgh9NG7QERXKCaStcPT86Grppf3t
Dialing: /ip4/185.181.228.122/udp/31000/quic-v1
Connection established with 12D3KooWPrCH6vE2esBujTZXkxGCvuSUP1vqUpXN9aRTZxEKWcco via Dialer { address: /ip4/185.181.228.122/udp/31000/quic-v1, role_override: Dialer, port_use: Reuse }
Identify event: Sent { connection_id: ConnectionId(1), peer_id: PeerId("12D3KooWPrCH6vE2esBujTZXkxGCvuSUP1vqUpXN9aRTZxEKWcco") }
Ping event: Event { peer: PeerId("12D3KooWPrCH6vE2esBujTZXkxGCvuSUP1vqUpXN9aRTZxEKWcco"), connection: ConnectionId(1), result: Err(Unsupported) }
=== Identify::Received ===
peer_id: 12D3KooWPrCH6vE2esBujTZXkxGCvuSUP1vqUpXN9aRTZxEKWcco
protocol_version: /logos-blockchain-devnet/identify/1.0.0
agent_version: rust-libp2p/0.46.0
observed_addr: /ip4/10.64.0.6/udp/33290/quic-v1
listen_addrs:
  /ip4/185.181.228.122/udp/31000/quic-v1
  /ip4/127.0.0.1/udp/31000/quic-v1
  /ip4/10.42.14.93/udp/31000/quic-v1
protocols:
  /meshsub/1.0.0
  /ipfs/id/push/1.0.0
  /libp2p/autonat/2/dial-request
  /logos-blockchain-devnet/kad/1.0.0
  /meshsub/1.1.0
  /logos-blockchain-devnet/chainsync/1.0.0
  /ipfs/id/1.0.0
  /meshsub/1.2.0
public_key: present (Ed25519)

About

QUIC Identify Probe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages