Bitcointalk · A few suggestions

中本聪,2009 年 12 月 9 日

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

阅读语言
中文译文

有用的建议,谢谢。

- bitcoin 软件与对端建立连接时(客户端 TCP 套接字),应改由客户端发送握手字符串。现在是服务端(服务端 TCP 套接字)先发握手。我的理由当然是为了匿名。ISP 对客户端做端口扫描、探测到他们在运行这个程序,实在是太容易了。

这确是个好主意。接受连接的一方,只需忍住不发任何东西,直到收到有效的握手。端口扫描所能碰到的,不过是一条不会自报家门的死连接。

- 在握手阶段使用某种加密(和上面的建议相配),在 DPI(深度包检测)面前混淆软件的身份。我真正惦记的是中国、伊朗这类不自由(指自由意义上的)国家的人们。

我想过最终给所有连接加上 SSL。我猜在 DPI 面前,不上 SSL 的一切手段都是白搭。兴许更好更快的办法,是走 TOR 连接,0.2 就可以做到。

- 需要某种 API,让这套系统能与网站集成、提供即时开通的服务。一个简单的 https 回执机制就能创造奇迹。让客户端把每笔收到的付款连同全部相关信息 POST 到一个 https url,并提供状态更新。最好还有一个出账支付机制,这样可以自动化地付款(以及批量付款)。状态可以通过 https 回执接口返回。

这是 0.2 之后日程表上的头等大事之一。

- 固定端口/随机端口。加一个设置项,随机分配运行端口(同时也能为防火墙极严的环境固定端口)。

是啊,倘若端口永远是同一个,其他隐身手段,也就没什么意义了。

- UPnP 支持。让客户端自动在上级路由器上创建端口转发。默认启用,可在选项菜单关闭。

我很期待试 UPnP。大多数 P2P 客户端一般默认都启用 UPnP 吗?

- 支持为 *NIX 系统编译无头(仅控制台)版本。还能直接作为网络服务运行,不妨留一个可 telnet 的控制端口(甚至用 unix 套接字也行)。

我还在思量管理接口怎样设计为最好。兴许用命令行命令与后台守护进程通信,查询收到的交易、发起转账,如此这般对自动化更为友好。抑或在某些非 80 端口上开一个 http 接口,用浏览器管理,如何?

ORIGINAL · 英文原文
Helpful suggestions, thanks.

- When the bitcoin software establishes a connection with a peer (client TCP socket) have the client send the handshake string. Right now you have the server (server TCP socket) send the handshake. My reasons for this are anonymity of course. It is far too easy for ISPs to portscan clients and detect they are running this program.
That's a good idea.  The side accepting the connection just needs to withhold from sending anything until it receives a valid handshake.  Any portscan would only get a dead connection that doesn't volunteer to identify itself.

Quote
- Use some sort of encryption during the handshake (sort of goes with the statement/request above) to obfuscate what the software is during DPI (deep packet inspection). I am really thinking about people in non-free (as in freedom) countries such as China/Iran.
I have thought about eventually SSLing all the connections.  I assume anything short of SSL would be pointless against DPI.  Maybe a better more immediate solution is to connect through TOR, which will be possible with 0.2.  

Quote
- Some sort of an API is needed so that this system can be integrated with websites to provide instant-on services. A simple https receipt mechanism would do wonders. Have the client post each incoming payment to an https url with all of the relevant information and provide status updates. Also an outbound payment mechanism would be nice. So one could automate payments (and batch payments) outbound. Status could be returned via the https receipt interface.
That's one of the main things on the agenda after 0.2.

Quote
- Static port/Random port. Have a setting to randomly assign the port that it runs on. (also be able to set it statically for very restrictive firewalls).
Yeah, the other stealth stuff would be kinda pointless if it's always the same port number.

Quote
- UPnP support. Have the client automatically create the port forward on upstream routers. Enabled by default. Can be turned off in the options menu.
I'm looking forward to trying UPnP.  Do most P2P clients typically have UPnP enabled by default?

Quote
- Ability to compile a headless (console only) install for *NIX systems. Also have the ability to just run as a network service. Perhaps with a telnet-able port for control (or even a unix socket would be ok).
I'm still thinking about how best to structure the management interface.  Maybe command line commands to communicate with the background daemon to query transactions received and initiate sending transfers.  That would be more automation friendly.  Or what about an http interface on some port other than 80 to manage it with a browser?

来源
Bitcointalk 原始链接 ↗ 记录编号 SN-0031