|
考虑到最近端口经常被封,就写了一个Shell脚本,放上来和大家共享
##!/bin/bash
num1=`grep "port" /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json | tr -cd "[0-9]"`
echo Current Service Port: $num1
read -p "Input New Port:" num2
sed -i "s/$num1/$num2/g" /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json
num3=`grep "port" /etc/v2ray-agent/xray/conf/02_VLESS_TCP_inbounds.json | tr -cd "[0-9]"`
echo Port been Updated: $num3
service xray restart
echo Service Restart
目录文件你们自己改就是了,相信MJJ都能看懂的~ |
|