gpt4 book ai didi

linux - 需要帮助理解 tsocks FAQ 中的一行

转载 作者:太空宇宙 更新时间:2023-11-04 11:00:46 24 4
gpt4 key购买 nike

结束here他们解释了我正在运行 tsocks 的错误:

I keep getting an error like "SOCKS server is not on a local subnet!", what's going on?

By definition SOCKS servers in the tsocks configuration file must be on networks specified by a "local" subnet statement. Remember that a 'local' subnet doesn't describe a subnet that the machine is directly attached to but rather networks that the machine can reach without the aid of any SOCKS server (thus such networks are "local" networks).

When you think about it, if a SOCKS server were on a network that wasn't local then you would need a SOCKS server in order to be able to reach the SOCKS server (which can actually occur in some strange networks but tsocks doesn't yet support that sort of network).

To fix your problem just define the network your SOCKS server is on in a local subnet statement.

错误与他们提到的相同 - ... 不在本地子网上!失败:连接被拒绝。

你能解释一下这是什么意思吗:

To fix your problem just define the network your SOCKS server is on in a local subnet statement.

如何在我的本地子网中“定义”我的 SOCKS 服务器所在的网络?

最佳答案

听起来您只需要在 tsocks.conf 文件中将您尝试连接的服务器所在的子网定义为本地子网。

来自此处的文档:http://linux.die.net/man/5/tsocks.conf

The basic structure of all lines in the configuration file is:

<directive> = <parameters>

...

local

An IP/Subnet pair specifying a network which may be accessed directly without proxying through a SOCKS server (e.g "local = 10.0.0.0/255.0.0.0"). Obviously all SOCKS server IP addresses must be in networks specified as local, otherwise tsocks would need a SOCKS server to reach SOCKS servers.

因此,如果您尝试连接到 10.10.10.10,那么您需要如下所示的一行(取决于您要定义子网的宽度):

local=10.10.10.10/255.255.255.255
local=10.10.10.0/255.255.255.0
local=10.10.0.0/255.255.0.0
local=10.0.0.0/255.0.0.0

显然,这些只是您可以使用的 32 个子网掩码中的一小部分 :))

关于linux - 需要帮助理解 tsocks FAQ 中的一行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27125454/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com