使用的系统
➜ ~ uname -a
FreeBSD gillbert-ghostbsd 14.3-RELEASE-p2 FreeBSD 14.3-RELEASE-p2 n230752-78980ed8f8e2 GENERIC amd64
安装
sudo pkg install xray-core
拷贝配置文件
cp config.json /usr/local/etc/xray-core/config.json
下载geoip.dat和geosite.dat
wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat
https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat
拷贝geoip.dat和geosite.dat到指定目录
cp geosite.dat /usr/local/bin/geosite.dat
cp geoip.dat /usr/local/bin/geoip.dat
启用xray
将xray_enable="YES"写入/etc/rc.conf文件中,实现服务开机启动。
➜ ~ sudo sysrc xray_enable="YES"
xray_enable: -> YES
启动xray
sudo service xray start
查看端口
使用sockstat -l查看监听的端口