回复:TOR 和 I2P
原始发布页
打开来源页面查看 1 个交叉存档
使用代理端口 9050 时,它只会尝试连接 IRC 一次,然后放弃,因为它知道这很可能总是失败:IRC 服务器会封禁所有 TOR 出口节点。如果你使用其他端口,它会认为那可能是普通的旧式代理,于是会以越来越长的间隔不断重试 IRC。不要使用 Polipo 或 Privoxy,因为它们是 HTTP 过滤器和缓存,如果修改了比特币的消息,就会损坏这些消息。比特币可能正试图通过重新连接来克服这个问题。你应该使用端口 9050。
正如 riX 所说,“只给 Tor 一个 IP 地址。使用 DNS 的应用……”这类警告不用担心。比特币在代理模式下完全不使用 DNS。
由于比特币无法通过 Tor 连接 IRC,它不知道当前哪些节点在线,所以必须尝试所有最近见过的节点。它会尽量节省连接尝试,但人们也希望启动时能快速连接,并在断开后快速重新连接。它使用一种算法:某个 IP 上次成功连接的时间越久远,就越少尝试连接。例如,对于 24 小时前见过的节点,它会每隔 5 小时尝试一次。一旦至少有 2 个连接,就不会尝试超过一周未见的节点;有 5 个连接后,则不会尝试超过 24 小时未见的节点。
英文原文
展开英文原文
When using proxy port 9050, it will only make one attempt to connect to IRC, then give up, since it knows it will probably always fail because IRC servers ban all the TOR exit nodes. If you're using another port, it would assume it might be a regular old normal proxy and would keep retrying IRC at longer and longer intervals. You should not use Polipo or Privoxy as those are http filters and caches that would corrupt Bitcoin's messages if they make any changes. Bitcoin might be trying to overcome it by reconnecting. You should use port 9050.
As riX says, the "is giving Tor only an IP address. Apps that do DNS..." warnings are nothing to worry about. Bitcoin doesn't use DNS at all in proxy mode.
Since Bitcoin can't get through to IRC through Tor, it doesn't know which nodes are currently online, so it has to try all the recently seen nodes. It tries to conserve connection attempts as much as possible, but also people want it to connect quickly when they start it up and reconnect quickly if disconnected. It uses an algorithm where it tries an IP less and less frequently the longer ago it was successful connected. For example, for a node it saw 24 hours ago, it would wait 5 hours between connection attempts. Once it has at least 2 connections, it won't try anything over a week old, and 5 connections it won't try anything over 24 hours old.