zoukankan      html  css  js  c++  java
  • 比特币节点外部地址确定方式

    Local Client's External Address
    The client uses public web services which return the information to determine its own external, routable IP address.

    The client runs a thread called ThreadGetMyExternalIP (in net.cpp) which attempts to determine the client's IP address as seen from the outside world.

    First, it attempts to connect to 91.198.22.70 port 80, which should be the checkip.dyndns.org server. If connection fails, a DNS request is made for checkip.dyndns.org and a connection is attempted to that address. Next, it attempts to connect to 74.208.43.192 port 80, which should be the www.showmyip.com server. If connection fails, a DNS request is made for www.showmyip.com and a connection is attempted to that address.

    For each address attempted above, the client attempts to connect, send a HTTP request, read the appropriate response line, and parse the IP address from it. If this succeeds, the IP address is returned, it is advertised to any connected nodes, and then the thread finishes (without proceeding to the next address).

  • 相关阅读:
    tcp socket
    Spring MVC 复习笔记01
    Spring 复习笔记01
    mybatis 复习笔记03
    ActiveMQ实现负载均衡+高可用部署方案(转)
    JVM复习笔记
    JAVA NIO复习笔记
    java IO复习笔记
    并发编程复习笔记
    杂记复习笔记
  • 原文地址:https://www.cnblogs.com/glensblog/p/11187520.html
Copyright © 2011-2022 走看看