From 05e89843685b82c4e4262a1ef2c059b5ef9a0758 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Wed, 9 Oct 2024 00:39:50 +0330 Subject: [PATCH] Add OBFS Manager --- menu.sh | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/menu.sh b/menu.sh index df177ad..e5e2738 100644 --- a/menu.sh +++ b/menu.sh @@ -465,6 +465,31 @@ normalsub_handler() { done } + +obfs_handler() { + while true; do + echo -e "${cyan}1.${NC} Remove Obfs" + echo -e "${red}2.${NC} Generating new Obfs" + echo "0. Back" + read -p "Choose an option: " option + + case $option in + 1) + python3 $CLI_PATH manage_obfs -r + ;; + 2) + python3 $CLI_PATH manage_obfs -g + ;; + 0) + break + ;; + *) + echo "Invalid option. Please try again." + ;; + esac + done +} + # Function to display the main menu display_main_menu() { clear @@ -578,8 +603,9 @@ display_advance_menu() { echo -e "${green}[7] ${NC}↝ Normal-SUB SubLink" echo -e "${cyan}[8] ${NC}↝ Change Port Hysteria2" echo -e "${cyan}[9] ${NC}↝ Change SNI Hysteria2" - echo -e "${cyan}[10] ${NC}↝ Update Core Hysteria2" - echo -e "${red}[11] ${NC}↝ Uninstall Hysteria2" + echo -e "${cyan}[10] ${NC}↝ Manage OBFS" + echo -e "${cyan}[11] ${NC}↝ Update Core Hysteria2" + echo -e "${red}[12] ${NC}↝ Uninstall Hysteria2" echo -e "${red}[0] ${NC}↝ Back to Main Menu" echo -e "${LPurple}◇──────────────────────────────────────────────────────────────────────◇${NC}" echo -ne "${yellow}➜ Enter your option: ${NC}" @@ -602,8 +628,9 @@ advance_menu() { 7) normalsub_handler ;; 8) hysteria2_change_port_handler ;; 9) hysteria2_change_sni_handler ;; - 10) python3 $CLI_PATH update-hysteria2 ;; - 11) python3 $CLI_PATH uninstall-hysteria2 ;; + 10) obfs_handler ;; + 11) python3 $CLI_PATH update-hysteria2 ;; + 12) python3 $CLI_PATH uninstall-hysteria2 ;; 0) return ;; *) echo "Invalid option. Please try again." ;; esac