简体   繁体   中英

Detect if an IP address is running a Bitcoin node

Is there a way to detect if an IP address is running a Bitcoin node? Maybe I can extract the IP information from the blockchain somehow?

There are many ways to do this.

Pretty reliable and relatively simple way is to get the list of Bitcoin nodes from https://api.blockchair.com/bitcoin/nodes . It is the JSON object that looks like:

{"data":{"nodes":{"1.234.63.142:8333":"version":"\/Satoshi:0.16.0\/","country":"KR","height":588031,"flags":1037},
"1.36.226.179:8333":{"version":"\/Satoshi:0.18.0\/","country":"HK","height":588031,"flags":1037},
"100.12.85.110:8333":{"version":"\/Satoshi:0.16.2\/","country":"US","height":588031,"flags":1037},
...

And then check if IP address in question is present in this list.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM