-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmfly.sh
57 lines (53 loc) · 1.39 KB
/
mfly.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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh
rm -rf v2ray
rm -rf v2ray-linux-64.zip*
mkdir v2ray
cd v2ray
wget https://github.com/v2fly/v2ray-core/releases/download/v4.45.0/v2ray-linux-64.zip
echo "Downloaded binary v2ray-linux-64.zip"
unzip v2ray-linux-64.zip
# Set config file
cat <<EOF >./config.json
{
"log": {
"loglevel": "warning"
},
"inbounds": [
{
"listen": "0.0.0.0",
"port": 8088,
"protocol": "vmess",
"settings": {
"clients": [
{
"id": "74592d79-c1c0-434a-ac08-b7a3143e7739",
"alterId": 0
}
],
"disableInsecureEncryption": true
},
"streamSettings": {
"network": "ws"
}
}
],
"outbounds": [
{
"protocol": "freedom"
}
]
}
EOF
echo "install mfly done, begin download ngrok"
cd ..
wget https://bin.equinox.io/c/bNyj1mQVY4c/ngrok-v3-stable-linux-amd64.tgz
tar -xzvf ngrok-v3-stable-linux-amd64.tgz
echo "Install done"
./ngrok config add-authtoken 28yujkS0AbUtkyQwg2CX8fUCq6N_5A8Eeonau3GaR3Vv3KXCq
curl -L --output cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64
current=`pwd`
export PATH=$PATH:$current/
chmod +x start.sh
chmod +x mfly.sh
chmod +x cloudflared
echo "init ngrok envirent"