|
cd
pkill myray
rm -rf myray
mkdir myray
cd myray
if [[ "$(uname -m)" == 'aarch64' ]]; then curl -Lo tmp.zip https://github.com/XTLS/Xray-core/releases/download/v1.6.0/Xray-linux-arm64-v8a.zip ; else curl -Lo tmp.zip https://github.com/XTLS/Xray-core/releases/download/v1.6.0/Xray-linux-64.zip ; fi
unzip tmp.zip
rm -f tmp.zip
mv xray myray
echo "
pkill myray
cd $HOME/myray
ulimit -n 262144
nohup ./myray run > /dev/null 2>&1 &
" > run
chmod +x run
export MYRAY_UUID=$(cat /proc/sys/kernel/random/uuid)
printf '
{
"inbounds": [
{
"port": 80,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "%s"
}
]
},
"streamSettings": {
"network": "ws"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
' $MYRAY_UUID > config.json
printf '
{
"v": "2",
"aid": "0",
"ps": "myray",
"tls": "",
"add": "%s",
"port": "80",
"id": "%s",
"net": "ws",
"host": "log.snssdk.com",
"path": "/"
}
' $(curl -s ip.sb) $MYRAY_UUID > url.json
echo "vmess://$(cat url.json | base64 -w 0)"
cd
myray/run
|
|