This repository has been archived by the owner on Jan 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathMisakaToolbox.sh
732 lines (680 loc) · 27.7 KB
/
MisakaToolbox.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
#!/bin/bash
version="v4.2.3(20221107)"
version_log="填大饼"
RED="\033[31m"
GREEN="\033[32m"
YELLOW="\033[33m"
PLAIN="\033[0m"
REGEX=("debian" "ubuntu" "centos|red hat|kernel|oracle linux|alma|rocky" "'amazon linux'" "fedora")
RELEASE=("Debian" "Ubuntu" "CentOS" "CentOS" "Fedora")
PACKAGE_UPDATE=("apt-get update" "apt-get update" "yum -y update" "yum -y update" "yum -y update")
PACKAGE_INSTALL=("apt -y install" "apt -y install" "yum -y install" "yum -y install" "yum -y install")
PACKAGE_REMOVE=("apt -y remove" "apt -y remove" "yum -y remove" "yum -y remove" "yum -y remove")
PACKAGE_UNINSTALL=("apt -y autoremove" "apt -y autoremove" "yum -y autoremove" "yum -y autoremove" "yum -y autoremove")
CMD=("$(grep -i pretty_name /etc/os-release 2>/dev/null | cut -d \" -f2)" "$(hostnamectl 2>/dev/null | grep -i system | cut -d : -f2)" "$(lsb_release -sd 2>/dev/null)" "$(grep -i description /etc/lsb-release 2>/dev/null | cut -d \" -f2)" "$(grep . /etc/redhat-release 2>/dev/null)" "$(grep . /etc/issue 2>/dev/null | cut -d \\ -f1 | sed '/^[ ]*$/d')")
for i in "${CMD[@]}"; do
SYS="$i" && [[ -n $SYS ]] && break
done
for ((int = 0; int < ${#REGEX[@]}; int++)); do
if [[ $(echo "$SYS" | tr '[:upper:]' '[:lower:]') =~ ${REGEX[int]} ]]; then
SYSTEM="${RELEASE[int]}" && [[ -n $SYSTEM ]] && break
fi
done
[[ $EUID -ne 0 ]] && red "注意:请在root用户下运行脚本" && exit 1
[[ -z $SYSTEM ]] && red "换个系统?俺这不兼容..." && exit 1
about(){
echo "#####################################################"
echo -e "# ${RED}Misaka Linux Toolbox ${PLAIN} #"
echo -e "# ${GREEN}我的博客${PLAIN}: https://blog.imgblz.cn #"
echo -e "# ${GREEN}项目地址${PLAIN}: https://github.com/imgblz/MisakaToolbox #"
echo -e "# ${GREEN}Raw加速${PLAIN}: https://ghraw.imgblz.cn #"
echo "#####################################################"
}
dd_vps(){
clear
echo -e "脚本来自 https://github.com/bohanyang/debi"
echo -e "此脚本过于精简,缺少大部分组件,请自行apt install -y <组件名称> 安装"
echo -e "甲骨文ARM服务器请选择 Ubuntu 20.04 或 18.04 系统模板,暂不支持 Oracle Linux"
echo -e "dd后你的端口为 22 账号为 root"
echo -e "请输入密码"
read -p "(默认: useradmin):" dd_password
[[ -z "$dd_password" ]] && dd_password="useradmin"
echo -e "使用中国镜像?[y/n]"
read -p "(默认: y):" dd_china
[[ -z "$dd_china" ]] && dd_china="y"
curl -fLO https://ghraw.imgblz.cn/bohanyang/debi/master/debi.sh
chmod a+rx debi.sh
if [[ "$dd_china" == "y" ]]; then
sudo ./debi.sh --cdn --network-console --ethx --bbr --user root --dns '223.5.5.5 223.6.6.6' --mirror-protocol https --mirror-host mirrors.aliyun.com --security-repository mirror --ntp ntp.aliyun.com --password $dd_password
else
sudo ./debi.sh --cdn --network-console --ethx --bbr --user root --password $dd_password
fi
echo -e "确定无报错请输入y重启"
read -p "(默认: y):" dd_reboot
[[ -z "$dd_reboot" ]] && dd_reboot="y"
if [[ "$dd_reboot" == "y" ]]; then
sudo shutdown -r now
else
echo -e "请截图反馈"
fi
}
mt(){
if [[ -z $(grep "alias mt='bash /root/MisakaToolbox.sh'" /etc/profile) ]]; then
echo -e "正在配置快捷启动方式"
echo "alias mt='bash /root/MisakaToolbox.sh'" >> /etc/profile
echo -e "完成,是否重启完成配置?[y/n]"
read -p "(默认: y):" mt_reboot
[[ -z "$mt_reboot" ]] && mt_reboot="y"
if [[ "$mt_reboot" == "y" ]]; then
reboot
else
echo -e "您可能需要重启才能使用快捷方式"
fi
fi
}
aboutx(){
clear
echo -e " About"
echo -e "这个只是一个一堆脚本的合集罢了,方便搞事情,并无什么技术含量"
echo -e "维护这个东东只是因为我懒!!!"
echo -e "github反代项目都可以用,只要大家不搞事情,我就继续放这用"
echo -e "CDN由Cloudflare提供,国内由自建反向代理提供"
echo -e "我就是一个大专生,还是一个学机电一体化的,啥都不会,脚本能用就行"
echo " -------------"
echo -e " ${GREEN}1.${PLAIN} 返回主菜单"
echo -e " ${GREEN}2.${PLAIN} 更新到Beat版(仅供开发测试用)"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) menux ;;
2) wget -N --no-check-certificate https://ghraw.imgblz.cn/imgblz/MisakaToolbox/Beat/MisakaToolbox.sh && bash MisakaToolbox.sh ;;
*) menux ;;
esac
}
check_status(){
yellow "等下!你这vps就是逊了..."
if [[ -z $(type -P curl) ]]; then
yellow "安装curl..."
if [[ ! $SYSTEM == "CentOS" ]]; then
${PACKAGE_UPDATE[int]}
fi
${PACKAGE_INSTALL[int]} curl
fi
if [[ -z $(type -P sudo) ]]; then
yellow "安装sudo..."
if [[ ! $SYSTEM == "CentOS" ]]; then
${PACKAGE_UPDATE[int]}
fi
${PACKAGE_INSTALL[int]} sudo
fi
IPv4Status=$(curl -s4m8 https://www.cloudflare.com/cdn-cgi/trace -k | grep warp | cut -d= -f2)
IPv6Status=$(curl -s6m8 https://www.cloudflare.com/cdn-cgi/trace -k | grep warp | cut -d= -f2)
if [[ $IPv4Status =~ "on"|"plus" ]] || [[ $IPv6Status =~ "on"|"plus" ]]; then
wg-quick down wgcf >/dev/null 2>&1
v66=`curl -s6m8 https://ip.gs -k`
v44=`curl -s4m8 https://ip.gs -k`
wg-quick up wgcf >/dev/null 2>&1
else
v66=`curl -s6m8 https://ip.gs -k`
v44=`curl -s4m8 https://ip.gs -k`
fi
if [[ $IPv4Status == "off" ]]; then
w4="${RED}未使用WARP${PLAIN}"
fi
if [[ $IPv6Status == "off" ]]; then
w6="${RED}未使用WARP${PLAIN}"
fi
if [[ $IPv4Status == "on" ]]; then
w4="${YELLOW}WARP free账户${PLAIN}"
fi
if [[ $IPv6Status == "on" ]]; then
w6="${YELLOW}WARP free账户${PLAIN}"
fi
if [[ $IPv4Status == "plus" ]]; then
w4="${GREEN}WARP+ 或 Teams账户${PLAIN}"
fi
if [[ $IPv6Status == "plus" ]]; then
w6="${GREEN}WARP+ 或 Teams账户${PLAIN}"
fi
if [[ -n $v66 ]] && [[ -z $v44 ]]; then
VPSIP=0
elif [[ -z $v66 ]] && [[ -n $v44 ]]; then
VPSIP=1
elif [[ -n $v66 ]] && [[ -n $v44 ]]; then
VPSIP=2
fi
v4=$(curl -s4m8 https://ip.gs -k)
v6=$(curl -s6m8 https://ip.gs -k)
c4=$(curl -s4m8 https://ip.gs/country -k)
c6=$(curl -s6m8 https://ip.gs/country -k)
s5p=$(warp-cli --accept-tos settings 2>/dev/null | grep 'WarpProxy on port' | awk -F "port " '{print $2}')
w5p=$(grep BindAddress /etc/wireguard/proxy.conf 2>/dev/null | sed "s/BindAddress = 127.0.0.1://g")
if [[ -n $s5p ]]; then
s5s=$(curl -sx socks5h://localhost:$s5p https://www.cloudflare.com/cdn-cgi/trace -k --connect-timeout 8 | grep warp | cut -d= -f2)
s5i=$(curl -sx socks5h://localhost:$s5p https://ip.gs -k --connect-timeout 8)
s5c=$(curl -sx socks5h://localhost:$s5p https://ip.gs/country -k --connect-timeout 8)
fi
if [[ -n $w5p ]]; then
w5s=$(curl -sx socks5h://localhost:$w5p https://www.cloudflare.com/cdn-cgi/trace -k --connect-timeout 8 | grep warp | cut -d= -f2)
w5i=$(curl -sx socks5h://localhost:$w5p https://ip.gs -k --connect-timeout 8)
w5c=$(curl -sx socks5h://localhost:$w5p https://ip.gs/country -k --connect-timeout 8)
fi
if [[ -z $s5s ]] || [[ $s5s == "off" ]]; then
s5="${RED}未启动${PLAIN}"
fi
if [[ -z $w5s ]] || [[ $w5s == "off" ]]; then
w5="${RED}未启动${PLAIN}"
fi
if [[ $s5s == "on" ]]; then
s5="${YELLOW}WARP 免费账户${PLAIN}"
fi
if [[ $w5s == "on" ]]; then
w5="${YELLOW}WARP 免费账户${PLAIN}"
fi
if [[ $s5s == "plus" ]]; then
s5="${GREEN}WARP+ / Teams${PLAIN}"
fi
if [[ $w5s == "plus" ]]; then
w5="${GREEN}WARP+ / Teams${PLAIN}"
fi
}
open_ports(){
systemctl stop firewalld.service 2>/dev/null
systemctl disable firewalld.service 2>/dev/null
setenforce 0 2>/dev/null
ufw disable 2>/dev/null
iptables -P INPUT ACCEPT 2>/dev/null
iptables -P FORWARD ACCEPT 2>/dev/null
iptables -P OUTPUT ACCEPT 2>/dev/null
iptables -t nat -F 2>/dev/null
iptables -t mangle -F 2>/dev/null
iptables -F 2>/dev/null
iptables -X 2>/dev/null
netfilter-persistent save 2>/dev/null
green "VPS的防火墙端口已放行!"
}
bbr_script(){
virt=$(systemd-detect-virt)
TUN=$(cat /dev/net/tun 2>&1 | tr '[:upper:]' '[:lower:]')
if [[ ${virt} =~ "kvm"|"zvm"|"microsoft"|"xen"|"vmware" ]]; then
wget -N --no-check-certificate "https://ghraw.imgblz.cn/chiakge/Linux-NetSpeed/master/tcp.sh" && chmod +x tcp.sh && ./tcp.sh
elif [[ ${virt} == "openvz" ]]; then
if [[ ! $TUN =~ 'in bad state' ]] && [[ ! $TUN =~ '处于错误状态' ]] && [[ ! $TUN =~ 'Die Dateizugriffsnummer ist in schlechter Verfassung' ]]; then
wget -N --no-check-certificate https://ghraw.imgblz.cn/mzz2017/lkl-haproxy/master/lkl-haproxy.sh && bash lkl-haproxy.sh
else
wget -N --no-check-certificate https://ghraw.imgblz.cn/mzz2017/lkl-haproxy/master/lkl-haproxy.sh && bash lkl-haproxy.sh
fi
else
red "抱歉,你的VPS虚拟化架构暂时不支持bbr加速脚本"
fi
}
v6_dns64(){
wg-quick down wgcf 2>/dev/null
v66=`curl -s6m8 https://ip.gs -k`
v44=`curl -s4m8 https://ip.gs -k`
if [[ -z $v44 && -n $v66 ]]; then
echo -e "nameserver 2a01:4f8:c2c:123f::1" > /etc/resolv.conf
green "设置DNS64服务器成功!"
else
red "非纯IPv6 VPS,设置DNS64服务器失败!"
fi
wg-quick up wgcf 2>/dev/null
}
warp_script(){
green "请选择你接下来使用的脚本"
echo "1. fscarmen"
echo "2. fscarmen-docker"
echo "3. fscarmen warp解锁奈飞流媒体脚本"
echo "4. fscarmen warp-go (CoiaPrant)"
echo "5. P3TERX"
echo "0. 返回主菜单"
echo ""
read -rp "请输入选项:" warpNumberInput
case $warpNumberInput in
1) wget -N https://ghraw.imgblz.cn/fscarmen/warp/main/menu.sh && bash menu.sh ;;
2) wget -N https://ghraw.imgblz.cn/fscarmen/warp/main/docker.sh && bash docker.sh ;;
3) bash <(curl -sSL https://ghraw.imgblz.cn/fscarmen/warp_unlock/main/unlock.sh) ;;
4) wget -N https://ghraw.imgblz.cn/fscarmen/warp/main/warp-go.sh && bash warp-go.sh ;;
5) bash <(curl -fsSL https://ghraw.imgblz.cn/P3TERX/warp.sh/main/warp.sh) menu ;;
0) menux ;;
*) warp_script ;;
esac
}
setChinese(){
chattr -i /etc/locale.gen
cat > '/etc/locale.gen' << EOF
zh_CN.UTF-8 UTF-8
zh_TW.UTF-8 UTF-8
en_US.UTF-8 UTF-8
ja_JP.UTF-8 UTF-8
EOF
locale-gen
update-locale
chattr -i /etc/default/locale
cat > '/etc/default/locale' << EOF
LANGUAGE="zh_CN.UTF-8"
LANG="zh_CN.UTF-8"
LC_ALL="zh_CN.UTF-8"
EOF
export LANGUAGE="zh_CN.UTF-8"
export LANG="zh_CN.UTF-8"
export LC_ALL="zh_CN.UTF-8"
}
aapanel(){
if [[ $SYSTEM = "CentOS" ]]; then
yum install -y wget && wget -O install.sh http://www.aapanel.com/script/install_6.0_en.sh && bash install.sh forum
elif [[ $SYSTEM = "Debian" ]]; then
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && bash install.sh forum
else
wget -O install.sh http://www.aapanel.com/script/install-ubuntu_6.0_en.sh && sudo bash install.sh forum
fi
}
bt(){
if [[ $SYSTEM = "CentOS" ]]; then
curl -sSO http://io.bt.sy/install/install_panel.sh && bash install_panel.sh forum
elif [[ $SYSTEM = "Debian" ]]; then
wget -O install.sh http://io.bt.sy/install/install-ubuntu_6.0.sh && sudo bash install.sh forum
else
wget -O install.sh http://io.bt.sy/install/install-ubuntu_6.0.sh && sudo bash install.sh forum
fi
}
tools(){
if [[ $SYSTEM = "CentOS" ]]; then
green "不行!用debian去"
elif [[ $SYSTEM = "Debian" ]]; then
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update && apt-get install sudo curl screen -y && curl -LO https://ghraw.imgblz.cn/johnrosen1/vpstoolbox/master/vps.sh && sudo screen -U bash vps.sh
else
apt -o Acquire::AllowInsecureRepositories=true -o Acquire::AllowDowngradeToInsecureRepositories=true update && apt-get install sudo curl screen -y && curl -LO https://ghraw.imgblz.cn/johnrosen1/vpstoolbox/master/vps.sh && sudo screen -U bash vps.sh
fi
}
xui() {
echo " "
green "请选择你接下来使用的X-ui面板版本"
echo "1. 使用X-ui官方原版"
echo "2. 使用FranzKafkaYu魔改版"
echo "0. 返回主菜单"
read -rp "请输入选项:" xuiNumberInput
case "$xuiNumberInput" in
1) bash <(curl -Ls https://ghraw.imgblz.cn/vaxilu/x-ui/master/install.sh) ;;
2) bash <(curl -Ls https://ghraw.imgblz.cn/FranzKafkaYu/x-ui/master/install.sh) ;;
0) menx ;;
*) xui ;;
esac
}
ubuntukernel(){
apt install git -y
echo "已安装Git组件"
git clone https://github.com/mtompkins/linux-kernel-utilities.git
echo "已克隆linux-kernel-utilities仓库"
cd linux-kernel-utilities
chmod 750 *.sh
echo "已修改权限,即将运行脚本,将下载最新内核进行编译安装"
echo "非常慢,看你服务器咋样了"
./compile_linux_kernel.sh --latest
}
qlpanel(){
[[ -z $(docker -v 2>/dev/null) ]] && curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun
read -rp "请输入将要安装的青龙面板容器名称:" qlPanelName
read -rp "请输入外网访问端口:" qlHTTPPort
docker run -dit --name $qlPanelName --hostname $qlPanelName --restart always -p $qlHTTPPort:5700 -v $PWD/QL/config:/ql/config -v $PWD/QL/log:/ql/log -v $PWD/QL/db:/ql/db -v $PWD/QL/scripts:/ql/scripts -v $PWD/QL/jbot:/ql/jbot whyour/qinglong:latest
wg-quick down wgcf 2>/dev/null
v66=`curl -s6m8 https://ip.gs -k`
v44=`curl -s4m8 https://ip.gs -k`
yellow "青龙面板安装成功!!!"
if [[ -n $v44 && -z $v66 ]]; then
green "IPv4访问地址为:http://$v44:$qlHTTPPort"
elif [[ -n $v66 && -z $v44 ]]; then
green "IPv6访问地址为:http://[$v66]:$qlHTTPPort"
elif [[ -n $v44 && -n $v66 ]]; then
green "IPv4访问地址为:http://$v44:$qlHTTPPort"
green "IPv6访问地址为:http://[$v66]:$qlHTTPPort"
fi
yellow "请稍等1-3分钟,等待青龙面板容器启动"
wg-quick up wgcf 2>/dev/null
}
serverstatus() {
wget -N https://ghraw.imgblz.cn/cokemine/ServerStatus-Hotaru/master/status.sh
echo " "
green "请选择你需要安装探针的客户端类型"
echo "1. 服务端"
echo "2. 监控端"
echo "0. 返回主页"
echo " "
read -rp "请输入选项:" menuNumberInput1
case "$menuNumberInput1" in
1) bash status.sh s ;;
2) bash status.sh c ;;
0) menu ;;
*) serverstatus ;;
esac
}
menu() {
clear
mt
echo "检查更新..."
wget -q -O /tmp/version.txt https://ghraw.imgblz.cn/imgblz/MisakaToolbox/main/version.txt
if [ "$(cat /tmp/version.txt)" != "$version" ]; then
echo "发现新版本,请及时更新!"
wget -q -O /tmp/tools_uplog.txt https://ghraw.imgblz.cn/imgblz/MisakaToolbox/main/log.txt
menuu
else
echo "当前已经是最新版本 版本:$version"
menuz
fi
}
menuu(){
clear
echo "发现新版本,建议更新"
echo ""
echo -e "${YELLOW}当前版本${PLAIN}:$version"
echo -e "${YELLOW}最新版本${PLAIN}:$(cat /tmp/version.txt)"
echo "更新日志:$(cat /tmp/tools_uplog.txt)"
echo ""
read -rp "是否更新?[y/n]" menuNumberInput
case "$menuNumberInput" in
y) wget -N --no-check-certificate https://ghraw.imgblz.cn/imgblz/MisakaToolbox/main/MisakaToolbox.sh && bash MisakaToolbox.sh ;;
n) menuz ;;
*) menuu ;;
esac
}
menuz(){
check_status
clear
about
echo ""
echo -e "${YELLOW}当前版本${PLAIN}:$version"
echo -e "${YELLOW}更新日志${PLAIN}:$version_log"
echo ""
if [[ -n $v4 ]]; then
echo -e "IPv4 地址:$v4"
echo -e "地区:$c4 WARP状态:$w4"
fi
if [[ -n $v6 ]]; then
echo -e "IPv6 地址:$v6 "
echo -e "地区:$c6 WARP状态:$w6"
fi
if [[ -n $w5p ]]; then
echo -e "WireProxy代理端口: 127.0.0.1:$w5p WireProxy状态: $w5"
if [[ -n $w5i ]]; then
echo -e "WireProxy IP: $w5i 地区: $w5c"
fi
fi
echo ""
echo "*您可以在命令行直接输入 mt 快速启动脚本*"
echo ""
read -rp "---按下enter运行脚本---" menuInput
case $menuInput in
*) menux ;;
esac
}
menux(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 系统相关"
echo -e " ${GREEN}2.${PLAIN} 面板相关"
echo -e " ${GREEN}3.${PLAIN} 节点相关"
echo -e " ${GREEN}4.${PLAIN} 性能测试"
echo -e " ${GREEN}5.${PLAIN} 一键更换系统"
echo -e " ${GREEN}6.${PLAIN} 一键更换内核"
echo -e " ${RED}9.${PLAIN} 回到欢迎页"
echo -e " ${RED}x.${PLAIN} 关于"
echo -e " ${RED}0.${PLAIN} 退出"
echo ""
echo -e "${YELLOW}版本号${PLAIN}:$version"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) menu1 ;;
2) menu2 ;;
3) menu3 ;;
4) menu4 ;;
5) menu5 ;;
6) menu6 ;;
9) menuz ;;
x) aboutx ;;
0) exit 1 ;;
*) menux ;;
esac
}
menu1(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 关闭系统防火墙端口"
echo -e " ${GREEN}2.${PLAIN} BBR加速系列脚本"
echo -e " ${GREEN}3.${PLAIN} 纯IPv6 VPS设置DNS64服务器"
echo -e " ${GREEN}4.${PLAIN} 设置CloudFlare WARP"
echo -e " ${GREEN}5.${PLAIN} 下载并安装Docker"
echo -e " ${GREEN}6.${PLAIN} 修改Linux系统软件源"
echo -e " ${GREEN}7.${PLAIN} 切换系统语言为中文"
echo -e " ${GREEN}8.${PLAIN} 添加swap"
echo -e " ${GREEN}9.${PLAIN} vpstoolbox(全自动化解放双手)"
echo -e " ${GREEN}10.${PLAIN} vps改root登陆"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) open_ports ;;
2) bbr_script ;;
3) v6_dns64 ;;
4) warp_script ;;
5) curl -fsSL https://get.docker.com | bash -s docker --mirror Aliyun ;;
6) bash <(curl -sSL https://gitee.com/SuperManito/LinuxMirrors/raw/main/ChangeMirrors.sh) ;;
7) setChinese ;;
8) wget https://www.moerats.com/usr/shell/swap.sh && bash swap.sh ;;
9) tools ;;
10) wget https://ghraw.imgblz.cn/imgblz/vpsroot/main/root.sh && bash root.sh ;;
0) menux ;;
*) menu1 ;;
esac
}
menu2(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 服务器面板"
echo -e " ${GREEN}2.${PLAIN} 下载(aria2)面板"
echo -e " ${GREEN}3.${PLAIN} 青龙面板"
echo -e " ${GREEN}4.${PLAIN} 节点面板"
echo -e " ${GREEN}5.${PLAIN} 服务器探针"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) menu2a ;;
2) menu2b ;;
3) menu2c ;;
4) menu2d ;;
5) menu2e ;;
0) menux ;;
*) menu2 ;;
esac
}
menu2a(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} aapanel面板"
echo -e " ${GREEN}2.${PLAIN} 宝塔快乐版"
echo -e " ${GREEN}3.${PLAIN} CyberPanel面板"
echo -e " ${GREEN}4.${PLAIN} AMH面板"
echo -e " ${GREEN}5.${PLAIN} kangle彩虹版(CentOS6/7/8)"
echo -e " ${GREEN}6.${PLAIN} mdserver(代替宝塔的新面板?)"
echo -e " ${GREEN}7.${PLAIN} NewPanel(lnmp环境)"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回上一页"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) aapanel ;;
2) bt ;;
3) sh <(curl https://cyberpanel.net/install.sh || wget -O - https://cyberpanel.net/install.sh) ;;
4) wget http://dl.amh.sh/amh.sh && bash amh.sh ;;
5) wget http://kangle.cccyun.cn/start;sh start ;;
6) curl -fsSL https://ghraw.imgblz.cn/midoks/mdserver-web/master/scripts/install.sh | bash ;;
7) wget http://panel.ropon.top/panel/lnmp.tar.gz && tar xf lnmp.tar.gz && cd lnmp && ./install.sh ;;
0) menu2 ;;
*) menu2a ;;
esac
}
menu2b(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} CCAA(Aria下载器)"
echo -e " ${GREEN}2.${PLAIN} aria2(面板为远程链接)"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回上一页"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) bash <(curl -Lsk https://ghraw.imgblz.cn/helloxz/ccaa/master/ccaa.sh) ;;
2) ${PACKAGE_INSTALL[int]} ca-certificates && wget -N git.io/aria2.sh && chmod +x aria2.sh && bash aria2.sh ;;
0) menu2 ;;
*) menu2b ;;
esac
}
menu2c(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 官方版"
echo -e " ${GREEN}2.${PLAIN} 傻瓜式一键带仓库"
echo -e " ${GREEN}3.${PLAIN} 青龙面板一键依赖(需要默认容器名)"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回上一页"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) qlpanel ;;
2) wget https://ghraw.imgblz.cn/shidahuilang/QL-/main/lang1.sh && bash lang1.sh ;;
3) docker exec -it qinglong bash -c "$(curl -fsSL https://ghraw.imgblz.cn/FlechazoPh/QLDependency/main/Shell/QLOneKeyDependency.sh | sh)" ;;
0) menu2 ;;
*) menu2c ;;
esac
}
menu2d(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} Trojan面板"
echo -e " ${GREEN}2.${PLAIN} x-ui面板"
echo -e " ${GREEN}3.${PLAIN} Trojan Panel"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回上一页"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) source <(curl -sL https://git.io/trojan-install) ;;
2) xui ;;
3) source <(curl -L https://ghraw.imgblz.cn/trojanpanel/install-script/main/install_script.sh) ;;
0) menu2 ;;
*) menu2d ;;
esac
}
menu2e(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 哪吒面板(探针)"
echo -e " ${GREEN}2.${PLAIN} ServerStatus-Hotaru"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回上一页"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) curl -L https://ghraw.imgblz.cn/naiba/nezha/master/script/install.sh -o nezha.sh && chmod +x nezha.sh && bash nezha.sh ;;
2) serverstatus ;;
0) menu2 ;;
*) menu2e ;;
esac
}
menu3(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} mack-a"
echo -e " ${GREEN}2.${PLAIN} wulabing v2ray"
echo -e " ${GREEN}3.${PLAIN} wulabing xray (Nginx前置)推荐"
echo -e " ${GREEN}4.${PLAIN} wulabing xray (Xray前置)"
echo -e " ${GREEN}5.${PLAIN} misaka xray"
echo -e " ${GREEN}6.${PLAIN} teddysun shadowsocks"
echo -e " ${GREEN}7.${PLAIN} telegram mtproxy"
echo -e " ${GREEN}8.${PLAIN} WireGuard"
echo -e " ${GREEN}9.${PLAIN} 订阅转换一键安装"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) wget -P /root -N --no-check-certificate "https://ghraw.imgblz.cn/mack-a/v2ray-agent/master/install.sh" && chmod 700 /root/install.sh && /root/install.sh ;;
2) wget -N --no-check-certificate -q -O install.sh "https://ghraw.imgblz.cn/wulabing/V2Ray_ws-tls_bash_onekey/master/install.sh" && chmod +x install.sh && bash install.sh ;;
3) wget -N --no-check-certificate -q -O install.sh "https://ghraw.imgblz.cn/wulabing/Xray_onekey/nginx_forward/install.sh" && chmod +x install.sh && bash install.sh ;;
4) wget -N --no-check-certificate -q -O install.sh "https://ghraw.imgblz.cn/wulabing/Xray_onekey/main/install.sh" && chmod +x install.sh && bash install.sh ;;
5) wget -N --no-check-certificate https://ghraw.imgblz.cn/imgblz/Xray-script-master/master/xray.sh && bash xray.sh ;;
6) wget --no-check-certificate -O shadowsocks-all.sh https://ghraw.imgblz.cn/teddysun/shadowsocks_install/master/shadowsocks-all.sh && chmod +x shadowsocks-all.sh && ./shadowsocks-all.sh 2>&1 | tee shadowsocks-all.log ;;
7) mkdir /home/mtproxy && cd /home/mtproxy && curl -s -o mtproxy.sh https://ghraw.imgblz.cn/sunpma/mtp/master/mtproxy.sh && chmod +x mtproxy.sh && bash mtproxy.sh && bash mtproxy.sh start ;;
8) wget https://git.io/wireguard -O wireguard-install.sh && bash wireguard-install.sh ;;
9) bash -c "$(curl -fsSL https://ghraw.imgblz.cn/shidahuilang/SS-SSR-TG-iptables-bt/main/sh/clash_install.sh)" ;;
0) menux ;;
*) menu3 ;;
esac
}
menu4(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} VPS测试-bench.sh"
echo -e " ${GREEN}2.${PLAIN} VPS测试-superbench"
echo -e " ${GREEN}3.${PLAIN} VPS测试-lemonbench"
echo -e " ${GREEN}4.${PLAIN} VPS测试-融合全测"
echo -e " ${GREEN}5.${PLAIN} 流媒体检测"
echo -e " ${GREEN}6.${PLAIN} 三网测速"
echo " -------------"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) wget -qO- bench.sh | bash ;;
2) wget -qO- --no-check-certificate https://ghraw.imgblz.cn/oooldking/script/master/superbench.sh | bash ;;
3) curl -fsL https://ilemonra.in/LemonBenchIntl | bash -s fast ;;
4) bash <(wget -qO- --no-check-certificate https://gitlab.com/spiritysdx/za/-/raw/main/ecs.sh) ;;
5) bash <(curl -L -s https://ghraw.imgblz.cn/lmc999/RegionRestrictionCheck/main/check.sh) ;;
6) bash <(curl -Lso- https://git.io/superspeed.sh) ;;
0) menux ;;
*) menu4 ;;
esac
}
menu5(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} 一键Debian(bohanyang)"
echo -e " ${GREEN}2.${PLAIN} 一键dd脚本魔改版(cxthhhhh)"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) dd_vps ;;
2) wget --no-check-certificate -qO ~/Network-Reinstall-System-Modify.sh 'https://www.cxthhhhh.com/CXT-Library/Network-Reinstall-System-Modify/Network-Reinstall-System-Modify.sh' && chmod a+x ~/Network-Reinstall-System-Modify.sh && bash ~/Network-Reinstall-System-Modify.sh -UI_Options ;;
0) menux ;;
*) menu5 ;;
esac
}
menu6(){
clear
about
echo ""
echo -e " ${GREEN}1.${PLAIN} ubuntu系统更新内核(最新源码编译)"
echo -e " ${GREEN}0.${PLAIN} 返回主菜单"
echo ""
read -rp " 请输入选项:" menuInput
case $menuInput in
1) ubuntukernel ;;
0) menux ;;
*) menu6 ;;
}
menu