2024-03-11
Linux
00
请注意,本文编写于 36 天前,最后修改于 36 天前,其中某些信息可能已经过时。

目录

基于V2ray搭建虚拟私有网络
购买墙外VPS
服务端简单部署
客户端简单配置

基于V2ray搭建虚拟私有网络

购买墙外VPS

racknerd

服务端简单部署

官网手册: v2fly

使用官方脚本安装最新版

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

编辑配置文件/usr/local/etc/v2ray/config.json

bash
vi /usr/local/etc/v2ray/config.json

将以下配置复制进config.json

json
{ "log": { "access": "/var/log/v2ray/access.log", "error": "/var/log/v2ray/error.log", "loglevel": "warning" }, "inbound": { "port": 8888, "protocol": "vmess", "settings": { "clients": [ { "id": "796aaa7-b5f5-46a0-b720-ef2d76e1836a", "level": 0, "alterId": 0 } ] } }, "outbound": { "protocol": "freedom", "settings": {} }, "inboundDetour": [], "outboundDetour": [ { "protocol": "blackhole", "settings": {}, "tag": "blocked" } ], "routing": { "strategy": "rules", "settings": { "rules": [ { "type": "field", "ip": [ "0.0.0.0/8", "10.0.0.0/8", "100.64.0.0/10", "127.0.0.0/8", "169.254.0.0/16", "172.16.0.0/12", "192.0.0.0/24", "192.0.2.0/24", "192.168.0.0/16", "198.18.0.0/15", "198.51.100.0/24", "203.0.113.0/24", "::1/128", "fc00::/7", "fe80::/10" ], "outboundTag": "blocked" } ] } } }

启动v2ray

bash
systemctl start v2ray

设置开机自启

bash
systemctl enable v2ray

关闭防火墙

bash
systemctl stop firewalld

禁用防火墙

bash
systemctl disable firewalld

客户端简单配置

依赖下载: .NET

客户端v2rayN下载: v2rayN

打开客户端

点击服务器,新增VMess服务

填下以下配置

地址端口用户ID等信息

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

本文作者:XiaoWang0777

本文链接:

版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

本网站由 又拍云Logo 提供CDN加速/云存储服务 萌ICP备20240377号