Files
BadVPN/easyinstall
2025-10-27 01:36:56 -03:00

40 lines
1.4 KiB
Bash

#!/bin/bash
echo "#!/bin/bash
if [ "'$1'" == uninstall ]
then
echo 'Desinstalando badvpn'
rm /bin/badvpn && rm /bin/badvpn-udpgw
echo 'Desinstalacion completa'
fi
if [ "'$1'" == start ]
then
screen -dmS bad badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 1000 --max-connections-for-client 1000 --client-socket-sndbuf 0 --udp-mtu 9000
echo 'Badvpn iniciando en el puerto 7300'
fi
if [ "'$1'" == stop ]
then
badvpnpid="'$(ps x |grep badvpn |grep -v grep |awk '"{'"'print $1'"'})
kill -9 "'"$badvpnpid" >/dev/null 2>/dev/null
kill $badvpnpid > /dev/null 2> /dev/null
kill "$badvpnpid" > /dev/null 2>/dev/null''
kill $(ps x |grep badvpn |grep -v grep |awk '"{'"'print $1'"'})
killall badvpn-udpgw
fi" > /bin/badvpn
chmod +x /bin/badvpn
if [ -f /bin/badvpn-udpgw ]; then
echo -e "\033[1;32mBadvpn ya esta instalado\033[0m"
rm -rf easyinstall >/dev/null 2>/dev/null
exit
else
clear
fi
echo -e "\033[1;31m Instalador Badvpn\n\033[0m"
echo -e "Descargando Badvpn"
wget -O /bin/badvpn-udpgw https://git.dr2.site/penguinehis/BadVPN/raw/branch/main/badvpn-udpgw &>/dev/null
chmod +x /bin/badvpn-udpgw
echo -e "\033[1;32m Instalacion completa\033[0m"
echo -e "\033[1;37mComandos:\n\033[1;31m badvpn start\033[1;37m para iniciar badvpn"
echo -e "\033[1;31m badvpn stop \033[1;37m para parar badvpn\033[0m"
echo -e "\033[1;31m badvpn uninstall \033[1;37m para desinstalar badvpn\033[0m"
rm -rf easyinstall >/dev/null 2>/dev/null