Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/24.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux 使用torify的不同终端中的不同IP_Linux_Terminal_Vpn_Tor_Anonymity - Fatal编程技术网

Linux 使用torify的不同终端中的不同IP

Linux 使用torify的不同终端中的不同IP,linux,terminal,vpn,tor,anonymity,Linux,Terminal,Vpn,Tor,Anonymity,如何在单独的终端窗口中使用torify命令获得不同的tor电路?具体来说,如果我在终端1窗口中键入命令 torify curl http://icanhazip.com 我收到我的IP地址作为回应 但是如果我同时在另一个终端窗口中尝试,我会得到相同的IP,这是正常的行为 我试图实现的是在每个新的终端窗口中使用不同的配置文件,以便在不同的终端窗口中获得不同的IP地址。使用-I(--isolate)选项或--user和--pass获取 从man 1 torsocks: -u, --user

如何在单独的终端窗口中使用torify命令获得不同的tor电路?具体来说,如果我在终端1窗口中键入命令

torify curl http://icanhazip.com
我收到我的IP地址作为回应

但是如果我同时在另一个终端窗口中尝试,我会得到相同的IP,这是正常的行为

我试图实现的是在每个新的终端窗口中使用不同的配置文件,以便在不同的终端窗口中获得不同的IP地址。

使用
-I
--isolate
)选项或
--user
--pass
获取

man 1 torsocks

-u, --user
      Set username for the SOCKS5 authentication. Use for circuit isolation in Tor.
      Note that you MUST have a password set either by the command line,
      environment variable or configuration file (torsocks.conf(5).

-p, --pass
      Set  password  for the SOCKS5 authentication. Use for circuit isolation in
      Tor.  Note that you MUST have a username set either by the command line,
      environment variable or configuration file (torsocks.conf(5)).

-i, --isolate                                                                                                                                                                          
      Automatic tor isolation. Set the username and password for
      the SOCKS5 authentication method to a PID/current time based value
     automatically. Username and Password MUST NOT be set.
例如:

torify --user foo --pass password curl https://example.com/
curl -Lv --socks5-hostname 127.0.0.1:9050 \
  --proxy-user foo:password \
  https://example.com/
然后,使用一组不同的凭证将获得不同的电路和退出继电器:

torify --user foo2 --pass password2 curl https://example.com/
curl -Lv --socks5-hostname 127.0.0.1:9050 \
  --proxy-user foo2:password2 \
  https://example.com/
您可以直接使用Tor的socks代理和curl实现同样的效果,并指定一个唯一的代理用户名/密码组合来获得流隔离

例如:

torify --user foo --pass password curl https://example.com/
curl -Lv --socks5-hostname 127.0.0.1:9050 \
  --proxy-user foo:password \
  https://example.com/
然后,使用一组不同的凭证将获得不同的电路和退出继电器:

torify --user foo2 --pass password2 curl https://example.com/
curl -Lv --socks5-hostname 127.0.0.1:9050 \
  --proxy-user foo2:password2 \
  https://example.com/

你是一个天使,我不知道,通过简单地改变用户名和通行证的组合,我们可以实现一个不同的tor电路。到目前为止,我一直在制作不同的torsocks.conf文件,并在/etc/torrc中为不同的socks端口及其相应的控制端口添加手动条目,然后使用torsocks命令指定torsocks.conf文件。您能提供一些参考链接或视频来了解tor的深入工作吗?只是好奇而已。是的,流隔离是一个非常酷的特性。这就是Tor Browser用于为不同域实现不同回路的功能,但允许单个/多个选项卡为同一域使用相同回路(因此也允许相同IP)。更改用户名/密码以获取新IP要比使用NEWNYM或多个配置或tor实例容易得多。至于链接,我从阅读各种tor规范文档中学到了很多:如果你寻找roger dingledine或nick mathewson或其他tor项目团队成员,youtube上有一些关于tor的好视频。我现在想不出任何关于深入工作的视频,但希望这些搜索能让你找到正确的方向