Install v2ray on FreeBSD 12

Install:
cd /usr/ports/net/v2ray
make install clean

vi /usr/local/etc/v2ray/config.json
{
  "log": {
    "access": "/var/log/v2ray/access.log",
    "error": "/var/log/v2ray/error.log",
    "loglevel": "warning"
  },

  "inbounds": [{
    "port": 10086,
    "protocol": "vmess",
    "settings": {
      "clients": [
        {
          "id": "23ad6b10-8d1a-40f7-8ad0-e3e35cd38297",
          "level": 1,
          "alterId": 64
        }
      ]
    }
  }],

  "outbounds": [{
    "protocol": "freedom",
    "settings": {}
  },{
    "protocol": "blackhole",
    "settings": {},
    "tag": "blocked"
  }],

  "routing": {
    "rules": [
      {
        "type": "field",
        "ip": ["geoip:private"],
        "outboundTag": "blocked"
      }
    ]
  }
}

vi /etc/rc.conf
v2ray_enable="YES"

/usr/local/etc/rc.d/v2ray start


Upgrade:
mkdir /root/v2ray
cd /root/v2ray
wget --no-check-certificate https://github.com/v2ray/v2ray-core/releases/download/v4.19.1/v2ray-freebsd-64.zip
unzip v2ray-freebsd-64.zip

/usr/local/etc/rc.d/v2ray stop

chmod 644 *.dat
mv geoip.dat /usr/local/share/v2ray
mv geosite.dat /usr/local/share/v2ray

chmod 555 v2ctl v2ray
mv v2ctl /usr/local/bin/v2ctl
mv v2ray /usr/local/bin/v2ray

/usr/local/etc/rc.d/v2ray start
cd /root
rm -rf /root/v2ray