Refactor: Implement WARP ACL configuration in Python

- remove WARP Plus/Key
This commit is contained in:
Whispering Wind
2025-05-02 18:24:58 +03:30
committed by GitHub
parent 07cb999259
commit 9d0a13a226
7 changed files with 178 additions and 122 deletions

20
menu.sh
View File

@ -389,10 +389,8 @@ warp_configure_handler() {
echo "2. Use WARP for popular sites"
echo "3. Use WARP for domestic sites"
echo "4. Block adult content"
echo "5. WARP (Plus) Profile"
echo "6. WARP (Normal) Profile"
echo "7. WARP Status Profile"
echo "8. Change IP address"
echo "5. WARP Status Profile"
echo "6. Change IP address"
echo "0. Cancel"
read -p "Select an option: " option
@ -402,23 +400,13 @@ warp_configure_handler() {
2) python3 $CLI_PATH configure-warp --popular-sites ;;
3) python3 $CLI_PATH configure-warp --domestic-sites ;;
4) python3 $CLI_PATH configure-warp --block-adult-sites ;;
5)
echo "Please enter your WARP Plus key:"
read -r warp_key
if [ -z "$warp_key" ]; then
echo "Error: WARP Plus key cannot be empty. Exiting."
return
fi
python3 $CLI_PATH configure-warp --warp-option "warp plus" --warp-key "$warp_key"
;;
6) python3 $CLI_PATH configure-warp --warp-option "warp" ;;
7)
5)
ip=$(curl -s --interface wgcf --connect-timeout 0.5 http://v4.ident.me)
cd /etc/warp/ && wgcf status
echo
echo -e "${yellow}Warp IP :${NC} ${cyan}$ip ${NC}" ;;
8)
6)
old_ip=$(curl -s --interface wgcf --connect-timeout 0.5 http://v4.ident.me)
echo "Current IP address: $old_ip"
echo "Restarting $service_name..."