#!/bin/bash

while true; do
  clear
  echo "========= 一键选择菜单 ========="
  echo "1、升级到 Debian 12"
  echo "2、安装 Soga"
  echo "3、配置 Soga"
  echo "4、启用 BBR"
  echo "5、启用 BBR Plus"
  echo "6、关闭防火墙"
  echo "7、修改 Debian12 源"
  echo "8、清理磁盘"
  echo "0、退出"
  echo "================================"
  read -rp "请输入选项数字并回车: " choice

  case "$choice" in
    1)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/debian12.sh)"
      ;;
    2)
      bash <(curl -Ls https://raw.githubusercontent.com/vaxilu/soga/refs/heads/master/install.sh)
      ;;
    3)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/soga-conf1.sh)"
      ;;
    4)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/bbr.sh)"
      ;;
    5)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/bbrplus.sh)"
      ;;
    6)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/close-firewall.sh)"
      ;;
    7)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/change-source.sh)"
      ;;
    8)
      bash -c "$(curl -fsSL https://sh.digac.icu/shell/clean-linux.sh)"
      ;;
    0)
      echo "退出脚本，再见！"
      exit 0
      ;;
    *)
      echo "无效选项，请输入 0-8 之间的数字"
      sleep 2
      ;;
  esac

  echo
  read -rp "按回车键返回菜单..."
done
