ibm vps配置完v2ray生成的vmess连接如果没有保存怎么办?这篇文章我们用代码找回配置好的v2ray vmess连接
一、登陆IBM shell
二、CLI连接
ibmcloud login -a 'https://cloud.ibm.com' -r 'us-south'
三、生成VMESS代码
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": "ibmyes",
"add": "${appname}.us-south.cf.appdomain.cloud",
"port": "443",
"id": "${id}",
"aid": "4",
"net": "ws",
"type": "none",
"host": "",
"path": "${path}",
"tls": "tls"
}
EOF
)&&echo "配置链接:"&&echo vmess://${VMESSCODE}
四、核对
把VMESS链接倒入到V2rayu中,检查一下地址和其他设置是否正确,没有错误的话VMESS连接就生成了。
视频演示:https://youtu.be/xkbF4VZTbxs
IBM免费VPS忘记VMESS连接怎么办?
Reviewed by xxbai
on
九月 09, 2020
Rating:
脚本有误:
回复删除cat app/v2ray/config.json" |grep id
会找到两行:
"destOverride": ["http", "tls"]
"id": "xxxxxx"
最终生成的Vmess会在id前多出destOverride["http", "tls"],所以应修改为:
cat config.json |grep \"id\"
完整代码:
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": "ibmyes",
"add": "${appname}.us-south.cf.appdomain.cloud",
"port": "443",
"id": "${id}",
"aid": "4",
"net": "ws",
"type": "none",
"host": "",
"path": "${path}",
"tls": "tls"
}
EOF
)&&echo "配置链接:"&&echo vmess://${VMESSCODE}
小小白 咨询个问题,按照您前几期视频配置好了域名、ibmapp和cf(cf生成的两个地址也填到了freenom的域名管理位置),网站ping IBM生成的域名,ping注册的域名都能ping通,返回的ip查询也都在美国,然后将注册的域名填入v2rayN的address,将ibm地址填入host之后,测试真连接延迟,显示超时,测试真连接速度,显示“远程服务器返回错误(503),远程服务器不可用”。之前在您电报群里咨询,留言被淹没了。
回复删除请问问题可能在哪里?应该怎么处理。