pull/1041/head^2
Darien Raymond 7 years ago
commit 8d27d3c87e
No known key found for this signature in database
GPG Key ID: 7251FFA14BB18169

@ -230,22 +230,22 @@ installV2Ray(){
copyFile geosite.dat false copyFile geosite.dat false
# Install V2Ray server config to /etc/v2ray # Install V2Ray server config to /etc/v2ray
mkdir -p /etc/v2ray
if [[ ! -f "/etc/v2ray/config.json" ]]; then if [[ ! -f "/etc/v2ray/config.json" ]]; then
cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/vpoint_vmess_freedom.json" "/etc/v2ray/config.json" mkdir -p /etc/v2ray
if [[ $? -ne 0 ]]; then cp "/tmp/v2ray/v2ray-${NEW_VER}-linux-${VDIS}/vpoint_vmess_freedom.json" "/etc/v2ray/config.json"
colorEcho ${YELLOW} "Create V2Ray configuration file error, pleases create it manually." if [[ $? -ne 0 ]]; then
return 1 colorEcho ${YELLOW} "Create V2Ray configuration file error, pleases create it manually."
fi return 1
let PORT=$RANDOM+10000 fi
UUID=$(cat /proc/sys/kernel/random/uuid) let PORT=$RANDOM+10000
UUID=$(cat /proc/sys/kernel/random/uuid)
sed -i "s/10086/${PORT}/g" "/etc/v2ray/config.json"
sed -i "s/23ad6b10-8d1a-40f7-8ad0-e3e35cd38297/${UUID}/g" "/etc/v2ray/config.json" sed -i "s/10086/${PORT}/g" "/etc/v2ray/config.json"
sed -i "s/23ad6b10-8d1a-40f7-8ad0-e3e35cd38297/${UUID}/g" "/etc/v2ray/config.json"
colorEcho ${GREEN} "PORT:${PORT}"
colorEcho ${GREEN} "UUID:${UUID}" colorEcho ${GREEN} "PORT:${PORT}"
mkdir -p /var/log/v2ray colorEcho ${GREEN} "UUID:${UUID}"
mkdir -p /var/log/v2ray
fi fi
return 0 return 0
} }

Loading…
Cancel
Save