#!/bin/bash # > Buat swap sebesar 1G dd if=/dev/zero of=/swapfile bs=1024 count=1048576 mkswap /swapfile chown root:root /swapfile chmod 0600 /swapfile >/dev/null 2>&1 swapon /swapfile >/dev/null 2>&1 sed -i '$ i\/swapfile swap swap defaults 0 0' /etc/fstab # // script credit by AndyYuda # // ini adalah script autoinstall ssh multiport untuk instalasi vpn server dan tunneling service ### System Information TANGGAL=$(date '+%Y-%m-%d') MYIP=$(wget -qO- ipinfo.io/ip) ISP=$(wget -qO- ipinfo.io/org) CITY=$(curl -s ipinfo.io/city) TIME=$(date +'%Y-%m-%d %H:%M:%S') # domain random CDN="https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/ssh" MYIP=$(curl -sS ipv4.icanhazip.com) red='\e[1;31m' green='\e[0;32m' yell='\e[1;33m' tyblue='\e[1;36m' NC='\e[0m' localip=$(hostname -I | cut -d\ -f1) hst=( `hostname` ) dart=$(cat /etc/hosts | grep -w `hostname` | awk '{print $2}') if [[ "$hst" != "$dart" ]]; then echo "$localip $(hostname)" >> /etc/hosts fi if [ -f "/root/log-install.txt" ]; then rm -fr /root/log-install.txt fi mkdir -p /etc/xray mkdir -p /etc/v2ray touch /etc/xray/domain touch /etc/v2ray/domain touch /etc/xray/scdomain touch /etc/v2ray/scdomain ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime sysctl -w net.ipv6.conf.all.disable_ipv6=1 >/dev/null 2>&1 sysctl -w net.ipv6.conf.default.disable_ipv6=1 >/dev/null 2>&1 apt install git curl -y >/dev/null 2>&1 apt install python -y >/dev/null 2>&1 echo -e "[ ${green}INFO${NC} ] Aight good ... installation file is ready" sleep 2 mkdir -p /var/lib/scrz-prem >/dev/null 2>&1 echo "IP=" >> /var/lib/scrz-prem/ipvps.conf sudo at install squid -y sudo apt install net-tools -y sudo apt install vnstat -y wget -q https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/tools.sh && chmod +x tools.sh && ./tools.sh rm tools.sh clear # izin MYIP=$(wget -qO- ipinfo.io/ip); echo "memeriksa vps anda" sleep 0.5 CEKEXPIRED () { today=$(date -d +1day +%Y -%m -%d) Exp1=$(curl -sS https://raw.githubusercontent.com/AndyyudaVPN/permission/main/ip | grep $MYIP | awk '{print $3}') if [[ $today < $Exp1 ]]; then echo "status script aktif.." else echo "SCRIPT ANDA EXPIRED"; exit 0 fi } IZIN=$(curl -sS https://raw.githubusercontent.com/AndyyudaVPN/permission/main/ip | awk '{print $4}' | grep $MYIP) if [ $MYIP = $IZIN ]; then echo "IZIN DI TERIMA!!" CEKEXPIRED else echo "Akses di tolak!! Benget sia hurung!!"; exit 0 fi echo " " clear echo -e "$BBlue SETUP DOMAIN VPS $NC" echo -e "$BYellow----------------------------------------------------------$NC" echo -e "$BGreen 1. Use Domain Random / Gunakan Domain Random $NC" echo -e "$BGreen 2. Choose Your Own Domain / Gunakan Domain Sendiri $NC" echo -e "$BYellow----------------------------------------------------------$NC" read -rp " input 1 or 2 / pilih 1 atau 2 : " dns if test $dns -eq 1; then clear apt install jq curl -y wget -q -O /root/cf "${CDN}/cf" >/dev/null 2>&1 chmod +x /root/cf bash /root/cf | tee /root/install.log print_success "Domain Random Done" elif test $dns -eq 2; then read -rp "Enter Your Domain / masukan domain : " dom read -rp "Input ur ns-domain : " -e nsdomen echo "IP=$dom" > /var/lib/scrz-prem/ipvps.conf echo "$dom" > /root/scdomain echo "$dom" > /etc/xray/scdomain echo "$dom" > /etc/xray/domain echo "$dom" > /etc/v2ray/domain echo "$dom" > /root/domain echo "$nsdomen" > /etc/xray/nsdomain echo "$nsdomen" > /root/nsdomain else echo "Not Found Argument" exit 1 fi echo -e "${BGreen}Done!${NC}" sleep 2 clear CHATID="-1001966360036" KEY="6307367714:AAG_Gae1CEjB-BDTYLzHSb89kbmLxzln7mk" WKT="10" URL="https://api.telegram.org/bot$KEY/sendMessage" TEXT="Project VPN TUNNELING ============================ Domain : $dom NS Domain : $nsdomen IP Vps : $MYIP User Login : root Pass Login : bok User Script: $IZIN Exp Script : $Exp1 Location : $CITY Timezone : $TIME ============================ " curl -s --max-time $WKT -d "chat_id=$CHATID&disable_web_page_preview=1&text=$TEXT&parse_mode=html" $URL >/dev/null #install ssh ovpn echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" echo -e "$green Install SSH / WS $NC" echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" sleep 2 clear wget -q -O ssh-vpn.sh https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/andyyuda/ssh-vpn.sh && chmod +x ssh-vpn.sh && ./ssh-vpn.sh sleep 2 clear wget https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/nginx-ssl.sh && chmod +x nginx-ssl.sh && ./nginx-ssl.sh #install ssh ovpn echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" echo -e "$green Install Websocket $NC" echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" sleep 2 clear wget https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/Insshws/insshws.sh && chmod +x insshws.sh && ./insshws.sh #exp cd /usr/bin wget -O xp "https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/xp.sh" chmod +x xp sleep 1 wget -q -O /usr/bin/notramcpu "https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/Finaleuy/notramcpu" && chmod +x /usr/bin/notramcpu cd #remove log #wget -q -O /usr/bin/removelog "https://github.com/andristji/Xray-SSH/raw/main/log.sh" && chmod +x /usr/bin/removelog #sleep 1 rm -f /root/ins-xray.sh rm -f /root/insshws.sh rm -f /root/xraymode.sh wget raw.githubusercontent.com/AndyyudaVPN/xraylite/main/limit/limit.sh && chmod +x limit.sh && ./limit.sh cd cd /usr/local/sbin/ wget raw.githubusercontent.com/AndyyudaVPN/xraylite/main/limit/limit-all-ip cat >/etc/systemd/system/vmip.service << EOF [Unit] Description=LIMIT IP VMESS ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/limit-all-ip vmip Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart vmip systemctl enable vmip cat >/etc/systemd/system/vlip.service << EOF [Unit] Description=LIMIT IP VLESS ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/limit-all-ip vlip Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart vlip systemctl enable vlip cat >/etc/systemd/system/trip.service << EOF [Unit] Description=LIMIT IP TROJAN ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/limit-all-ip trip Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart trip systemctl enable trip cat >/etc/systemd/system/ssip.service << EOF [Unit] Description=LIMIT IP Shadowsocks ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/limit-all-ip ssip Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart ssip systemctl enable ssip #SERVICE VMESS cd #xray echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" echo -e "$green Install Xray $NC" echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" sleep 2 wget -q -O ins-xray.sh https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/ins-xray.sh && chmod +x ins-xray.sh && ./ins-xray.sh sleep 1 wget -q -O senmenu.sh https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/senmenu.sh && chmod +x senmenu.sh && ./senmenu.sh echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" echo -e "$green Install slowdns $NC" echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" sleep 2 wget https://raw.githubusercontent.com/AndyyudaVPN/xraylite/main/slowdns/installsl.sh && chmod +x installsl.sh && ./installsl.sh echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" echo -e "$green Install openvpn $NC" echo -e "\e[33m━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m" sleep 2 wget -q -O vpn.sh https://raw.githubusercontent.com/fisabiliyusri/Mantap/main/ssh/vpn.sh && chmod 777 vpn.sh && ./vpn.sh #cronjob #echo "30 * * * * root removelog" >> /etc/crontab #pemangkuvmessvless mkdir /root/akun mkdir /root/akun/vmess mkdir /root/akun/vless mkdir /root/akun/shadowsocks mkdir /root/akun/trojan mkdir /root/akun/ssh #install remove log echo "0 5 * * * root reboot" >> /etc/crontab echo "* * * * * root clog" >> /etc/crontab echo "59 * * * * root pkill 'menu'" >> /etc/crontab echo "0 1 * * * root xp" >> /etc/crontab echo "*/5 * * * * root notramcpu" >> /etc/crontab service cron restart clear org=$(curl -s https://ipapi.co/org ) echo "$org" > /root/.isp cat> /root/.profile << END if [ "$BASH" ]; then if [ -f ~/.bashrc ]; then . ~/.bashrc fi fi mesg n || true clear menu END chmod 644 /root/.profile if [ -f "/root/log-install.txt" ]; then rm -fr /root/log-install.txt fi cd rm -f ins-xray.sh rm -f senmenu.sh rm -f setupku.sh rm -f xraymode.sh rm -f slowdns.sh echo "===============-[ ANDYYUDA VPN PREMIUM ]-================" echo "" echo "------------------------------------------------------------" echo "" echo " >>> Service & Port" | tee -a log-install.txt echo " - OpenSSH : 22, 53, 2222, 2269" | tee -a log-install.txt echo " - SSH Websocket : 80,8880,8080" | tee -a log-install.txt echo " - SSH SSL Websocket : 443" | tee -a log-install.txt echo " - Stunnel5 : 222, 777" | tee -a log-install.txt echo " - Dropbear : 109, 143" | tee -a log-install.txt echo " - Badvpn : 7100-7300" | tee -a log-install.txt echo " - Nginx : 81" | tee -a log-install.txt echo " - XRAY Vmess TLS : 443" | tee -a log-install.txt echo " - XRAY Vmess None TLS : 80" | tee -a log-install.txt echo " - XRAY Vless TLS : 443" | tee -a log-install.txt echo " - XRAY Vless None TLS : 80" | tee -a log-install.txt echo " - Trojan GRPC : 443" | tee -a log-install.txt echo " - Trojan WS : 443" | tee -a log-install.txt echo " - Trojan GO : 443" | tee -a log-install.txt echo " - Sodosok WS/GRPC : 443" | tee -a log-install.txt echo " - slowdns : 443,80,8080,53,5300" | tee -a log-install.txt echo "" | tee -a log-install.txt echo " >>> Server Information & Other Features" | tee -a log-install.txt echo " - Timezone : Asia/Jakarta (GMT +7)" | tee -a log-install.txt echo " - Fail2Ban : [ON]" | tee -a log-install.txt echo " - Dflate : [ON]" | tee -a log-install.txt echo " - IPtables : [ON]" | tee -a log-install.txt echo " - Auto-Reboot : [ON]" | tee -a log-install.txt echo " - IPv6 : [OFF]" | tee -a log-install.txt echo " - Autobackup Data" | tee -a log-install.txt echo " - AutoKill Multi Login User" | tee -a log-install.txt echo " - Auto Delete Expired Account" | tee -a log-install.txt echo " - Fully automatic script" | tee -a log-install.txt echo " - VPS settings" | tee -a log-install.txt echo " - Admin Control" | tee -a log-install.txt echo " - Change port" | tee -a log-install.txt echo " - Restore Data" | tee -a log-install.txt echo " - Full Orders For Various Services" | tee -a log-install.txt echo "" echo "" echo "------------------------------------------------------------" echo "" echo "===============-[ Script Credit By AndyYuda ]-===============" echo -e "" echo "" echo "" | tee -a log-install.txt echo "ADIOS" sleep 1 echo -ne "[ ${yell}WARNING${NC} ] Do you want to reboot now ? (y/n)? " read answer if [ "$answer" == "${answer#[Yy]}" ] ;then exit 0 else reboot fi