33

Multitor:通过HAProxy创建多个TOR实例并实现负载均衡的工具

 6 years ago
source link: http://www.freebuf.com/sectool/173389.html?amp%3Butm_medium=referral
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

UFNVBnr.jpg!web

Multitor是一个可以通过HAProxy创建多个TOR实例并实现负载均衡的工具 。它为客户端提供了一个单一的端点。此外,还可以查看之前运行的Tor进程,并为所有或选定的进程创建新的标识。

使用

在使用multitor之前,请详细了解所有参数及其工作原理,参考 手册

简单示例:

# Clone this repository
git clone https://github.com/trimstray/multitor

# Go into the repository
cd multitor

# Install
./setup.sh install

# Run the app
multitor --init 2 --user debian-tor --socks-port 9000 --control-port 9900

bin/multitor符号链接位于/usr/local/bin

帮助文档位于/usr/local/man/man8

参数

提供以下选项:

Usage:
   multitor <option|long-option>

 Examples:
   multitor --init 2 --user debian-tor --socks-port 9000 --control-port 9900
   multitor --show-id --socks-port 9000

 Options:
       --help                      显示帮助信息
       --debug                     在屏幕上显示信息(debug mode)
       --verbose                   显示Tor进程的更多信息
   -i, --init <num>                初始化新的tor进程
   -k, --kill                      杀死所有multitor进程
   -s, --show-id                   显示特定的Tor进程id
   -n, --new-id                    重新生成tor环路
   -u, --user <string>             设置用户(仅支持与-i|--init使用)
       --socks-port <port_num|all> 设置socks端口号
       --control-port <port_num>   设置控制端口号
       --proxy <socks|http>        设置负载均衡

运行环境

在运行Multitor之前以下外部程序需要被安装:

tor

netcat

haproxy

polipo

此外,你还需要以root身份进行访问。

其它

重要

如果在其它脚本中使用该工具,其输出将会被保存在任何可能的位置,而不会出现在屏幕上,请记住你将无法使用生成的密码。我会在下个版本中解决这个问题。如果你不使用带密码的单个或所有TOR环路的重新生成功能,你可以安全地重启multitor,他会为你完成。

局限性

每个Tor进程都需要一定占用数量的内存。如果进程的数量太大,则之前的进程将被系统自动杀死。

Polipo不再被支持,但它仍然是一个非常优秀的轻量级代理工具。在下一版本中,我将提供一个不同解决方案的选项。

*参考来源: GitHub ,FB小编 secist 编译,转载请注明来自FreeBuf.COM


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK