简体   繁体   English

检测 IP 地址是否正在运行比特币节点

[英]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?有没有办法检测 IP 地址是否正在运行比特币节点? Maybe I can extract the IP information from the blockchain somehow?也许我可以以某种方式从区块链中提取 IP 信息?

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 .非常可靠且相对简单的方法是从https://api.blockchair.com/bitcoin/nodes获取比特币节点列表。 It is the JSON object that looks like: JSON 对象如下所示:

{"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.然后检查此列表中是否存在有问题的 IP 地址。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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