标签归档:V2Ray

CentOS 7部署V2Ray服务

由于Shadowsocks在国内被大范围识别封锁,所以转向V2Ray。虽然V2Ray作为一个平台,比起Shadowsocks复杂许多,但是安装部署其实已经集成的非常好。以下是部署步骤:

1、安装V2Ray服务端

bash <(curl -L -s https://install.direct/go.sh)

执行完后得到以下内容

Installing V2Ray v4.20.0 on x86_64
Downloading V2Ray: https://github.com/v2ray/v2ray-core/releases/download/v4.20.0/v2ray-linux-64.zip
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   608    0   608    0     0   1647      0 --:--:-- --:--:-- --:--:--  1652
100 11.3M  100 11.3M    0     0  7368k      0  0:00:01  0:00:01 --:--:-- 11.5M
Updating software repo
Installing unzip
warning: /var/cache/yum/x86_64/7/base/packages/unzip-6.0-20.el7.x86_64.rpm: Header V3 RSA/SHA256 Signature, key ID f4a80eb5: NOKEY
Public key for unzip-6.0-20.el7.x86_64.rpm is not installed
Importing GPG key 0xF4A80EB5:
 Userid     : "CentOS-7 Key (CentOS 7 Official Signing Key) <security@centos.org>"
 Fingerprint: 6341 ab27 53d7 8a78 a7c2 7bb1 24c6 a8a7 f4a8 0eb5
 Package    : centos-release-7-6.1810.2.el7.centos.x86_64 (@anaconda)
 From       : /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-7
Extracting V2Ray package to /tmp/v2ray.
Archive:  /tmp/v2ray/v2ray.zip
  inflating: /tmp/v2ray/config.json  
   creating: /tmp/v2ray/doc/
  inflating: /tmp/v2ray/doc/readme.md  
  inflating: /tmp/v2ray/geoip.dat    
  inflating: /tmp/v2ray/geosite.dat  
   creating: /tmp/v2ray/systemd/
  inflating: /tmp/v2ray/systemd/v2ray.service  
   creating: /tmp/v2ray/systemv/
  inflating: /tmp/v2ray/systemv/v2ray  
  inflating: /tmp/v2ray/v2ctl        
 extracting: /tmp/v2ray/v2ctl.sig    
  inflating: /tmp/v2ray/v2ray        
 extracting: /tmp/v2ray/v2ray.sig    
  inflating: /tmp/v2ray/vpoint_socks_vmess.json  
  inflating: /tmp/v2ray/vpoint_vmess_freedom.json  
PORT:38731
UUID:c877a768-946e-4bea-93ff-d44a5a5b3915
Created symlink from /etc/systemd/system/multi-user.target.wants/v2ray.service to /etc/systemd/system/v2ray.service.
V2Ray v4.20.0 is installed.

以上信息中,有两项需要记下:UUIDPORT

启动V2Ray服务

systemctl start v2ray
systemctl enable v2ray

由于需要端口通讯,建议将端口加入防火墙白名单。这里只是示范,所以关闭防火墙

iptables -F
systemctl stop firewalld

2、安装Windows客户端

Windows系统客户端可以使用V2RayN,首先去Github上下载最新的release:

将压缩包解压,执行v2rayN.exe即可启动客户端。

启动之后,选择服务器->添加[VMess]服务器,按之前在服务器上得到的UUIDPORT填写

参考:

Project V Official Site: V2Ray