我尝试使用/etc/tor/torsocks.conf文件中的SOCKS5Username和SOCKS5Password字段为我的tor安装激活用户名和密码身份validation。 我已经重新启动configuration更改后的服务,并检查它是否真的重新启动。 但是,我的机器上仍然没有用户名和密码。
我从EPEL回购安装了Tor。 有关安装的更多信息:
Installed Packages Name : tor Arch : x86_64 Version : 0.2.7.6 Release : 5.el7 Current OS CentOS Linux release 7.2.1511 (Core) Tor Configuration [root@torproxy ~]# cat /etc/tor/torsocks.conf | grep -v "^#" TorAddress curl 10.0.0.43 TorPort 18009 OnionAddrRange 127.42.42.0/24 SOCKS5Username test SOCKS5Password 1234 [root@torproxy ~]# cat /etc/tor/torrc | grep -v "^#" ControlSocket /run/tor/control ControlSocketsGroupWritable 1 CookieAuthentication 1 CookieAuthFile /run/tor/control.authcookie CookieAuthFileGroupReadable 1 SOCKSPort 10.0.0.43:18009 SOCKSPolicy accept *
Tor实际上并没有试图validationSOCKS客户端提供给它的authentication信息。 它可以完全未经validation使用,并且没有强制validation的configuration。 因此,强烈build议您不要将SOCKS端口暴露给任何您不想直接连接的IP地址。
从手册页:
NOTE: Although this option allows you to specify an IP address other than localhost, you should do so only with extreme caution. The SOCKS protocol is unencrypted and (as we use it) unauthenticated, so exposing it in this way could leak your information to anybody watching your network, and allow anybody to use your computer as an open proxy.
什么Tor做的authentication信息是stream隔离。 Tor可以被configuration为使用完全不同的电路用于使用不同凭证进行“authentication”的客户端。
IsolateSOCKSAuth Don't share circuits with streams for which different SOCKS authentication was provided. (On by default; you can disable it with NoIsolateSOCKSAuth.)