mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-04-19 21:42:24 +00:00
new option - speedtest + google recaptcha
This commit is contained in:
parent
2dd203e174
commit
7c980343f1
1 changed files with 42 additions and 15 deletions
31
x-ui.sh
31
x-ui.sh
|
@ -706,6 +706,25 @@ ssl_cert_issue_by_cloudflare() {
|
||||||
show_menu
|
show_menu
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
google_recaptcha() {
|
||||||
|
curl -O https://raw.githubusercontent.com/jinwyp/one_click_script/master/install_kernel.sh && chmod +x ./install_kernel.sh && ./install_kernel.sh
|
||||||
|
echo ""
|
||||||
|
before_show_menu
|
||||||
|
}
|
||||||
|
|
||||||
|
run_speedtest() {
|
||||||
|
# Check if Speedtest is already installed
|
||||||
|
if ! command -v speedtest &> /dev/null; then
|
||||||
|
# If not installed, install it
|
||||||
|
sudo apt-get update && sudo apt-get install -y curl
|
||||||
|
curl -s https://install.speedtest.net/app/cli/install.deb.sh | sudo bash
|
||||||
|
sudo apt-get install -y speedtest
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Run Speedtest
|
||||||
|
speedtest
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
show_usage() {
|
show_usage() {
|
||||||
echo "x-ui control menu usages: "
|
echo "x-ui control menu usages: "
|
||||||
|
@ -751,9 +770,11 @@ show_menu() {
|
||||||
${green}16.${plain} Apply for an SSL Certificate
|
${green}16.${plain} Apply for an SSL Certificate
|
||||||
${green}17.${plain} Update Geo Files
|
${green}17.${plain} Update Geo Files
|
||||||
${green}18.${plain} Active Firewall and open ports
|
${green}18.${plain} Active Firewall and open ports
|
||||||
|
${green}19.${plain} Fixing Google reCAPTCHA
|
||||||
|
${green}20.${plain} Speedtest by Ookla
|
||||||
"
|
"
|
||||||
show_status
|
show_status
|
||||||
echo && read -p "Please enter your selection [0-18]: " num
|
echo && read -p "Please enter your selection [0-20]: " num
|
||||||
|
|
||||||
case "${num}" in
|
case "${num}" in
|
||||||
0)
|
0)
|
||||||
|
@ -813,8 +834,14 @@ show_menu() {
|
||||||
18)
|
18)
|
||||||
open_ports
|
open_ports
|
||||||
;;
|
;;
|
||||||
|
19)
|
||||||
|
google_recaptcha
|
||||||
|
;;
|
||||||
|
20)
|
||||||
|
run_speedtest
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
LOGE "Please enter the correct number [0-18]"
|
LOGE "Please enter the correct number [0-20]"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue