v2ray 过滤局域网ip的代理 配置
要过滤局域网IP的v2ray代理配置,可以按照以下步骤进行:
- 打开v2ray的配置文件,通常位于
/etc/v2ray/config.json或/usr/local/etc/v2ray/config.json,具体位置可能因系统而异。 - 在
inbounds部分找到你要配置的入站协议的配置,通常是http或socks。 - 在对应的入站协议配置中,找到
settings字段,然后找到clients字段。 - 在
clients字段中添加一个新的对象,用于配置要过滤的局域网IP。例如:
"clients": [
{
"id": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"level": 1,
"email": "user@example.com",
"ip": [
"192.168.0.0/16",
"10.0.0.0/8"
]
}
]
在上面的示例中,ip字段配置了要过滤的局域网IP,可以根据实际情况修改IP地址范围。
5. 保存配置文件,并重新加载v2ray服务。具体的命令可能因系统而异,可以使用systemctl restart v2ray或service v2ray restart来重新加载配置。
完成以上步骤后,v2ray代理将过滤掉指定的局域网IP
原文地址: http://www.cveoy.top/t/topic/iT08 著作权归作者所有。请勿转载和采集!