V2fly的简易配置

  • 一:服务端安装

  • Part 1.1 安装和更新 V2Ray

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

  • 或者

curl -O https://raw.githubusercontent.com/v2fly/fhs- install -v2ray/ master / install -release.sh

  • Part 1.2 执行安装脚本

chmod 777 install -release.sh 
./ install -release.sh

% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed 100 649 100 649 0 0 2368 0 --:--:-- --:--:-- --:--:-- 2368 100 590 100 590 0 0 1053 0 --:--:-- --:--:-- --:--:-- 1053 info: Extract the V2Ray package to /tmp/tmp.gWzZRTMMij and prepare it for installation

installed: /usr/ local / bin /v2ray installed: /usr/ local / bin /v2ctl installed: /usr/ local / share /v2ray/geoip.dat installed: /usr/ local / share /v2ray/geosite.dat installed: /usr/ local /etc/v2ray/config.json installed: / var / log /v2ray/ installed: / var / log /v2ray/access.log installed: / var / log /v2ray/error.log installed: /etc/systemd/ system /v2ray.service installed: /etc/systemd/ system /[email protected] removed: /tmp/tmp.gWzZRTMMij info: V2Ray v4 .27 .5 is installed. You may need to execute a command to remove dependent software: dnf remove curl unzip Please execute the command: systemctl enable v2ray; systemctl start v2ray

  • Part 1.3配置systemd服务

systemctl enable v2ray 
//添加systemd服务模块

systemctl start v2ray 
//开启v2ray服务

service v1ray status 
//检查v2ray服务状态

  • 二:服务端配置

  • 默认安装完成后,启用配置文件为/usr/local/etc/v1ray/config.json,但这个默认配置为空,因此需要自定义服务端配置

{

    
"inbounds"
: [

        {

            
"port"
: 
12345
, 

            
"protocol"
: 
"vmess"
,

            
"settings"
: {

                
"clients"
: [

                    {

                        
"id"
: 
"88888888-1234-1234-1234-888888888888"
 //客户端自定义生成

                    }

                ]

            }

        }

    ],

    
"outbounds"
: [

        {

            
"protocol"
: 
"freedom"

        }

    ]

}

  • 三:客户端配置