Skip to content
Menu
莱风 莱风
  • 序章
莱风 莱风

centos7搭建v2ray服务器

Posted on 2020/02/182020/11/09 by zhou

1.安装

最新安装方法参考:https://github.com/v2fly/fhs-install-v2ray/blob/master/README.zh-Hans-CN.md

安装:

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

配置文件路径:/usr/local/etc/v2ray/config.json

配置文件模板:

{
    "log": {
        "loglevel": "warning"
    },
    "routing": {
        "domainStrategy": "AsIs",
        "rules": [
            {
                "ip": [
                    "geoip:private"
                ],
                "outboundTag": "blocked",
                "type": "field"
            }
        ]
    },
    "inbounds": [
        {
            "port": 2020,
            "protocol": "vmess",
            "settings": {
                "clients": [
                    {
                        "id": "用户id",
                        "alterId": 64
                    }
                ]
            }
        }
    ],
    "outbounds": [
        {
            "protocol": "freedom"
        },
        {
            "protocol": "blackhole",
            "tag": "blocked"
        }
    ]
}

以下安装脚本已过期
yum -y install wget
wget https://install.direct/go.sh
yum install -y zip unzip  
bash go.sh 
得到PORT和UUID

2.设置

## 启动
systemctl start v2ray

## 停止
systemctl stop v2ray

## 重启
systemctl restart v2ray

## 开机自启
systemctl enable v2ray

配置文件路径:/etc/v2ray/config.json

3.Windows使用

下载v2rayN:https://github.com/2dust/v2rayN/releases

添加vmess

4.安卓使用

下载 BifrostV :https://apkpure.com/bifrostv/com.github.dawndiy.bifrostv

顶部选择 VMess ,主机(Host)填入VPS的IP地址,端口(Port)填入记录的PORT,用户ID(UserId)填入记录的UUID,其他保持默认,然后保存

发表回复 取消回复

您的邮箱地址不会被公开。 必填项已用 * 标注

10 + 5 = ?

近期文章

  • redhat Linux centos7 安装或卸载官方MySQL8
  • WordPress文章游客评论时添加验证码
  • 宝塔面板MySQL设置单数据库主从双向同步
  • wordpress修改底部版权信息删除RSS订阅按钮
  • centos7安装sql server 2022

分类

  • docker (4)
  • Linux (2)
  • MySQL (1)
  • sql (8)
  • Windows (5)
  • WordPress (5)
  • 未分类 (11)
  • 飞跃长城 (5)

近期评论

    其他操作

    • 登录
    ©2025 莱风