forked from bigfangfang/IBMVPS
-
Notifications
You must be signed in to change notification settings - Fork 1
/
vemss2.sh
31 lines (30 loc) · 912 Bytes
/
vemss2.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
ibmcloud target --cf &&
read -p "输入你的app名称:" appname&&
path=$(ibmcloud cf ssh ${appname} -c "cat app/v2ray/config.json"|grep path|sed -e 's/ //g'|sed -e 's/\path//g'|sed -e 's/\"//g'|sed -e 's/\://g'|sed -e 's/\,//g')
id=$(ibmcloud cf ssh ${appname} -c "cat app/v2ray/config.json" |grep id|sed -e 's/ //g'|sed -e 's/\id//g'|sed -e 's/\"//g'|sed -e 's/\://g'|sed -e 's/\,//g')
&&VMESSCODE=$(base64 -w 0 << EOF
{
"v": "2",
"ps": "IBMVPS",
"add": "${appname}.us-south.cf.appdomain.cloud",
"port": "443",
"id": "${id}",
"aid": "64",
"net": "ws",
"type": "none",
"host": "",
"path": "${path}",
"tls": "tls"
}
EOF
)
echo address:${appname}.us-south.cf.appdomain.cloud
echo ID:${id}
echo port:443
echo alterID:64
echo net:ws
echo path:${path}
echo tls:${tls}
echo "恭喜你找回了你的vmess"
echo "配置链接:"
echo vmess://${VMESSCODE}