Bitcointalk · TOR and I2P

中本聪,2010 年 2 月 4 日

SN-0083 已核对来源,附原文与上下文。

阅读语言
中文译文

用代理端口 9050 时,它只会尝试连接 IRC 一次就放弃,因为它知道 IRC 服务器封禁所有 TOR 出口节点,多半永远连不上。如果用别的端口,它会以为那是个普通的老式代理,会以越来越长的间隔不断重试 IRC。不要用 Polipo 或 Privoxy,那些是 http 过滤器和缓存,一旦改动内容就会破坏 Bitcoin 的消息。Bitcoin 可能正试图通过重连来克服这个问题。你应该用 9050 端口。

如 riX 所说,"is giving Tor only an IP address. Apps that do DNS..." 这类警告不用理会。Bitcoin 在代理模式下完全不用 DNS。

由于 Bitcoin 经 Tor 无法连上 IRC,它不知道当前哪些节点在线,只能尝试所有最近见过的节点。它尽量节省连接尝试,但人们也希望它启动时快速连接、断线后快速重连。它用了一个算法:一个 IP 距上次连接成功越久,尝试频率越低。比如对一个 24 小时前见过的节点,它会等 5 小时再试。一旦有至少 2 条连接,超过一周没见过的就不再尝试;有 5 条连接时,超过 24 小时不再尝试。

ORIGINAL · 英文原文
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.
上下文
← 上一条 SN-0083 · 当前 下一条 → 在档案中查看完整主题串 →
来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0083