2025-03-06
Linux运维
00

目录

1. 在中转机器上安装 V2Ray
2. 在中转机器上配置 V2Ray 进行流量转发
3. 在中转机器上启动 V2Ray 服务
4. 客户端使用

1. 在中转机器上安装 V2Ray

如果你还没有安装 V2Ray,可以通过以下命令安装:

bash
# 安装 V2Ray bash <(curl -L https://raw.githubusercontent.com/v2fly/fhs-install-v2ray/master/install-release.sh)

安装完成后,V2Ray 的配置文件通常位于 /usr/local/etc/v2ray/config.json

2. 在中转机器上配置 V2Ray 进行流量转发

编辑 V2Ray 的配置文件 /usr/local/etc/v2ray/config.json,添加以下内容:

json
{ "inbounds": [ { "port": 8899, "protocol": "socks", "settings": { "auth": "noauth", "udp": false } } ], "outbounds": [ { "protocol": "socks", "settings": { "servers": [ { "address": "vpnx.com", "port": 1088 } ] } } ] }

3. 在中转机器上启动 V2Ray 服务

保存配置文件后,启动或重启 V2Ray 服务:

bash
# 启动 V2Ray systemctl start v2ray # 设置开机自启 systemctl enable v2ray # 检查状态 systemctl status v2ray

4. 客户端使用

设置好 中转机器IP、端口,使用TCP协议即可使用中转机器的代理进行上网。

如果对你有用的话,可以打赏哦
打赏
ali pay
wechat pay

本文作者:Dong

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 CC BY-NC。本作品采用《知识共享署名-非商业性使用 4.0 国际许可协议》进行许可。您可以在非商业用途下自由转载和修改,但必须注明出处并提供原作者链接。 许可协议。转载请注明出处!