34 Xray Beta

This commit is contained in:
2025-11-26 14:15:36 -03:00
parent d604c1e8ab
commit 6f81d9f9cf
4 changed files with 662 additions and 9 deletions

101
menu
View File

@@ -189,18 +189,103 @@ fi
#menuv2
#--------------------
elif [ "$cake" == "4" ]; then
clear
echo "Portas Ativas"
echo ""
php /opt/DragonCore/menu.php infoport
echo ""
echo -ne "Pressione enter para continuar"; read enter
menucon
# Xray Core management
clear
menuxray
elif [ "$cake" == "5" ]; then
clear
echo "Portas Ativas"
echo ""
php /opt/DragonCore/menu.php infoport
echo ""
echo -ne "Pressione enter para continuar"; read enter
menucon
else
menucon
menucon
fi
}
menuxray(){
clear
php /opt/DragonCore/menu.php menuxray
echo -ne "> "; read option
if [ -z "$option" ]; then
menuxray
elif [ "$option" == "0" ]; then
menucon
elif [ "$option" == "1" ]; then
clear
echo -ne "Nome do usuario > "; read usr
if [ -z "$usr" ]; then
menuxray
else
echo -ne "Protocolo (ws/xhttp/grpc/tcp) [ws] > "; read proto
[ -z "$proto" ] && proto="ws"
php /opt/DragonCore/menu.php xrayAddUser "$usr" "$proto"
echo ""
echo -ne "Pressione enter para continuar"; read enter
menuxray
fi
elif [ "$option" == "2" ]; then
clear
php /opt/DragonCore/menu.php xrayListUsers
echo ""
echo -ne "ID ou UUID para remover > "; read ident
if [ -n "$ident" ]; then
php /opt/DragonCore/menu.php xrayRemoveUser "$ident"
echo ""
echo -ne "Pressione enter para continuar"; read enter
fi
menuxray
elif [ "$option" == "3" ]; then
clear
php /opt/DragonCore/menu.php xrayListUsers
echo ""
echo -ne "Pressione enter para continuar"; read enter
menuxray
elif [ "$option" == "4" ]; then
clear
php /opt/DragonCore/menu.php xrayInfo
echo ""
echo -ne "Pressione enter para continuar"; read enter
menuxray
elif [ "$option" == "5" ]; then
clear
echo -ne "Dominio (ex: vpn.seudominio.com) > "; read dominio
if [ -n "$dominio" ]; then
php /opt/DragonCore/menu.php xrayCert "$dominio"
echo ""
chmod 777 -R /opt/DragonCore/ssl
echo -ne "Pressione enter para continuar"; read enter
fi
menuxray
elif [ "$option" == "6" ]; then
clear
echo -ne "Porta do inbound [443] > "; read p
[ -z "$p" ] && p=443
echo -ne "Protocolo (ws/xhttp/grpc/tcp) [ws] > "; read pr
[ -z "$pr" ] && pr="ws"
bash <(php /opt/DragonCore/menu.php xrayInstall)
php /opt/DragonCore/menu.php xrayGenerateConfig "$p" "$pr"
echo ""
chmod 777 /usr/local/etc/xray/config.json
echo -ne "Pressione enter para continuar"; read enter
menuxray
elif [ "$option" == "7" ]; then
clear
echo -ne "Deseja remover o Xray Core? S/n > "; read sn
lower=$(echo "$sn" | tr '[:upper:]' '[:lower:]')
if [[ "$lower" == "s" || "$lower" == "y" ]]; then
bash <(php /opt/DragonCore/menu.php xrayRemove)
echo ""
echo -ne "Pressione enter para continuar"; read enter
fi
menuxray
else
menuxray
fi
}
menuferrament(){
clear
php /opt/DragonCore/menu.php menuferramenta