#!/bin/bash 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 REPO="https://raw.githubusercontent.com/ica4me/auto-script-free/main/" function CEKIP () { echo -e "Bypassing IP Check..." key2 domain Pasang } clear # ===== WARNA ===== green='\033[1;32m' cyan='\033[1;36m' yellow='\033[1;33m' red='\033[1;31m' NC='\033[0m' red='\e[1;31m' green='\e[0;32m' yell='\e[1;33m' tyblue='\e[1;36m' NC='\033[0m' purple() { echo -e "\\033[35;1m${*}\${NC}"; } tyblue() { echo -e "\\033[36;1m${*}\${NC}"; } yellow() { echo -e "\\033[33;1m${*}\${NC}"; } green() { echo -e "\\033[32;1m${*}\${NC}"; } red() { echo -e "\\033[31;1m${*}\${NC}"; } cd /root if [ "${EUID}" -ne 0 ]; then echo "You need to run this script as root" exit 1 fi if [ "$(systemd-detect-virt)" == "openvz" ]; then echo "OpenVZ is not supported" exit 1 fi 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 secs_to_human() { echo "Installation time : $(( ${1} / 3600 )) hours $(( (${1} / 60) % 60 )) minute's $(( ${1} % 60 )) seconds" } mkdir -p /etc/xray mkdir -p /var/lib/ >/dev/null 2>&1 echo "IP=" >> /var/lib/ipvps.conf clear # ===== ANIMASI GARIS ===== line() { echo -e "${cyan}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━${NC}" } line echo -e "[ ${green}INFO${NC} ] Installation file is ready 🚀" line sleep 0.5 # ===== ASCII ART ===== echo -e "${green}" cat << "EOF" _ _ _ _ __ __ _____ _ _ _ _ _ _ _____ _ | \ | | / \ | | \/ | |_ _| | | | \ | | \ | | ____| | | \| | / _ \ _ | | |\/| | | | | | | | \| | \| | _| | | | |\ |/ ___ \ |_| | | | | | | | |_| | |\ | |\ | |___| |___ |_| \_/_/ \_\___/|_| |_| |_| \___/|_| \_|_| \_|_____|_____| EOF echo -e "${NC}" sleep 0.4 # ===== STATUS ===== echo -e "${cyan}System is ready to use.${NC}" sleep 0.4 line # ===== LINK ===== echo -e "${cyan}Developed by najm${NC}" echo -e "${cyan}https://vip.meiyu.my.id/${NC}" line sleep 2 sleep 5 echo " " echo "Set User to: admin (Auto Bypass)" name="admin" echo "admin" > /etc/xray/username echo "" clear author=$name echo "" function key2(){ clear echo -e "${green}┌──────────────────────────────────────────┐${NC}" echo -e "${green}│ \033[1;37mGENERATING LOCAL LICENSE... ${green} │${NC}" echo -e "${green}└──────────────────────────────────────────┘${NC}" sleep 1 # Deteksi IP MYIP=$(curl -sS ipv4.icanhazip.com) EXP="2099-12-31" # Lifetime sampai tahun 2099 # --- BAGIAN PENTING: Membuat File yang DIBACA oleh MENU --- # Menu membaca /usr/bin/user dan /usr/bin/e echo "admin" > /usr/bin/user echo "$EXP" > /usr/bin/e echo "$EXP" > /usr/bin/ver # File pendukung lainnya (untuk kompatibilitas script lain) mkdir -p /etc/github mkdir -p /root/izinvps2 mkdir -p /etc/xray echo "### admin ${EXP} ${MYIP} @VIP" > /root/izinvps2/ipx echo "### admin ${EXP} ${MYIP} @VIP" > /etc/github/ipx echo "admin" > /root/username echo "admin" > /etc/xray/username echo "IP=${MYIP}" > /var/lib/ipvps.conf echo -e "${green}License Created: ${yellow}LIFETIME (2099)${NC}" sleep 1 } function domain(){ fun_bar() { CMD[0]="$1" CMD[1]="$2" ( [[ -e $HOME/fim ]] && rm $HOME/fim ${CMD[0]} -y >/dev/null 2>&1 ${CMD[1]} -y >/dev/null 2>&1 touch $HOME/fim ) >/dev/null 2>&1 & tput civis echo -ne " \033[0;33mUpdate Domain.. \033[1;37m- \033[0;33m[" while true; do for ((i = 0; i < 18; i++)); do echo -ne "\033[0;32m#" sleep 0.1s done [[ -e $HOME/fim ]] && rm $HOME/fim && break echo -e "\033[0;33m]" sleep 1s tput cuu1 tput dl1 echo -ne " \033[0;33mUpdate Domain... \033[1;37m- \033[0;33m[" done echo -e "\033[0;33m]\033[1;37m -\033[1;32m Succes !\033[1;37m" tput cnorm } res1() { wget ${REPO}install/pointing.sh && chmod +x pointing.sh && ./pointing.sh clear } clear cd echo "" echo -e "$BBlue SETUP DOMAIN VPS $NC" echo -e "$BYellow----------------------------------------------------------$NC" echo -e "$BGreen 1. Use Domain Random / Gunakan Domain Sendiri $NC" echo -e "$BGreen 2. Jangan pilih aku, Pilih 1 aja ya! $NC" echo -e "$BYellow----------------------------------------------------------$NC" until [[ $domain =~ ^[132]+$ ]]; do read -p " Please select numbers 1 : " domain done if [[ $domain == "1" ]]; then clear echo -e "${green}┌──────────────────────────────────────────┐${NC}" echo -e "${green}│ \033[1;37mPASTIKAN DOMAIN SUDAH POINTING ${green}│${NC}" echo -e "${green}│ \033[1;37mKE CLOUDFLARE (DNS ACTIVE) ${green}│${NC}" echo -e "${green}│ \033[1;37mAGAR INSTALL BERJALAN NORMAL ${green}│${NC}" echo -e "${green}└──────────────────────────────────────────┘${NC}" echo " " until [[ $dnss =~ ^[a-zA-Z0-9_.-]+$ ]]; do read -rp "Masukan domain kamu Disini : " -e dnss done rm -rf /etc/v2ray rm -rf /etc/nsdomain rm -rf /etc/per mkdir -p /etc/xray mkdir -p /etc/v2ray mkdir -p /etc/nsdomain touch /etc/xray/domain touch /etc/v2ray/domain touch /etc/xray/slwdomain touch /etc/v2ray/scdomain echo "$dnss" > /root/domain echo "$dnss" > /root/scdomain echo "$dnss" > /etc/xray/scdomain echo "$dnss" > /etc/v2ray/scdomain echo "$dnss" > /etc/xray/domain echo "$dnss" > /etc/v2ray/domain echo "IP=$dnss" > /var/lib/ipvps.conf echo "" clear fi if [[ $domain == "2" ]]; then clear echo " " until [[ $dn1 =~ ^[a-zA-Z0-9_.-]+$ ]]; do read -rp "Masukan subdomain kamu Disini tanpa spasi : " -e dn1 done rm -rf /etc/v2ray rm -rf /etc/nsdomain rm -rf /etc/per mkdir -p /etc/xray mkdir -p /etc/v2ray mkdir -p /etc/nsdomain touch /etc/xray/domain touch /etc/v2ray/domain touch /etc/xray/slwdomain touch /etc/v2ray/scdomain echo "$dn1" > /root/domain echo "$dn1" > /root/scdomain echo "$dn1" > /etc/xray/scdomain echo "$dn1" > /etc/v2ray/scdomain echo "$dn1" > /etc/xray/domain echo "$dn1" > /etc/v2ray/domain echo "IP=$dn1" > /var/lib/ipvps.conf echo "" clear cd sleep 1 fun_bar 'res1' clear rm /root/subdomainx fi } function Pasang(){ cd wget ${REPO}tools.sh &> /dev/null chmod +x tools.sh bash tools.sh clear start=$(date +%s) ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime apt install git curl -y >/dev/null 2>&1 apt install python -y >/dev/null 2>&1 } function Installasi(){ fun_bar() { CMD[0]="$1" CMD[1]="$2" ( # Hapus file fim jika ada [[ -e $HOME/fim ]] && rm -f $HOME/fim # Jalankan perintah di background dan sembunyikan output ${CMD[0]} -y >/dev/null 2>&1 ${CMD[1]} -y >/dev/null 2>&1 # Buat file fim untuk menandakan selesai touch $HOME/fim ) >/dev/null 2>&1 & tput civis # Sembunyikan kursor echo -ne " \033[0;33mLagi Menginstal File \033[1;37m- \033[0;33m[" while true; do for ((i = 0; i < 18; i++)); do echo -ne "\033[0;32m#" sleep 0.1 done # Jika file fim ada, hapus dan keluar dari loop if [[ -e $HOME/fim ]]; then rm -f $HOME/fim break fi echo -e "\033[0;33m]" sleep 1 tput cuu1 # Kembali ke baris sebelumnya tput dl1 # Hapus baris sebelumnya echo -ne " \033[0;33mLagi Menginstal File \033[1;37m- \033[0;33m[" done echo -e "\033[0;33m]\033[1;37m -\033[1;32m Succes !\033[1;37m" tput cnorm # Tampilkan kursor kembali } res2() { wget ${REPO}install/ssh-vpn.sh && chmod +x ssh-vpn.sh && ./ssh-vpn.sh clear } res3() { wget ${REPO}install/ins-xray.sh && chmod +x ins-xray.sh && ./ins-xray.sh clear } res4() { wget ${REPO}sshws/insshws.sh && chmod +x insshws.sh && ./insshws.sh clear } res5() { wget ${REPO}install/set-br.sh && chmod +x set-br.sh && ./set-br.sh clear } res6() { wget ${REPO}sshws/ohp.sh && chmod +x ohp.sh && ./ohp.sh clear } res7() { wget ${REPO}menu/update.sh && chmod +x update.sh && ./update.sh clear } res8() { wget ${REPO}slowdns/installsl.sh && chmod +x installsl.sh && bash installsl.sh clear } res9() { wget ${REPO}install/udp-custom.sh && chmod +x udp-custom.sh && bash udp-custom.sh clear } res10() { wget ${REPO}udp-zi && chmod +x udp-zi && ./udp-zi clear } #res11() { #wget ${REPO}install-nob && chmod +x install-nob && bash install-nob #clear #} #res12() { #wget ${REPO}install/install-wireguard && chmod +x install-wireguard && bash install-wireguard #clear #} #res13() { #wget -qO- ${REPO}fix-error/fix-usr-local-sbin.sh && chmod +x fix-usr-local-sbin.sh && bash fix-usr-local-sbin.sh #clear #} res14() { wget -qO- ${REPO}fix-error/fix-proxy-nginx.sh && chmod +x fix-proxy-nginx.sh && bash fix-proxy-nginx.sh clear } res15() { wget ${REPO}fix-error/fix-ssh-udp.sh && chmod +x fix-ssh-udp.sh && ./fix-ssh-udp.sh clear } res17() { wget ${REPO}install/install_service.quota.sh && chmod +x install_service.quota.sh && ./install_service.quota.sh clear } if [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "ubuntu" ]]; then echo -e "${green}Setup nginx For OS Is $(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g')${NC}" setup_ubuntu elif [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "debian" ]]; then echo -e "${green}Setup nginx For OS Is $(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g')${NC}" setup_debian else echo -e " Your OS Is Not Supported ( ${YELLOW}$(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g')${FONT} )" fi } function setup_debian(){ echo -e "PROCESS INSTALLED SSH & OPENVPN" fun_bar 'res2' echo -e "PROCESS INSTALLED XRAY" fun_bar 'res3' echo -e "PROCESS INSTALLED WEBSOCKET SSH" fun_bar 'res4' echo -e "PROCESS INSTALLED BACKUP MENU" fun_bar 'res5' echo -e "PROCESS INSTALLED OHP" fun_bar 'res6' echo -e "DOWNLOAD EXTRA MENU" fun_bar 'res7' echo -e "DOWNLOAD SYSTEM" fun_bar 'res8' echo -e "DOWNLOAD UDP COSTUM" fun_bar 'res9' echo -e "DOWNLOAD ZIVPN" fun_bar 'res10' #echo -e "DOWNLOAD NOOBZ" #fun_bar 'res11' #echo -e "DOWNLOAD WIREGUARD" #fun_bar 'res12' #echo -e "FIX MENU" #fun_bar 'res13' echo -e "REPAIR NGINX-HPROXY" fun_bar 'res14' echo -e "REPAIR SSH UDP" fun_bar 'res15' echo -e "SET Service Quota Xray" fun_bar 'res17' } function setup_ubuntu(){ echo -e "PROCESS INSTALLED SSH & OPENVPN" res2 echo -e "PROCESS INSTALLED XRAY" res3 echo -e "PROCESS INSTALLED WEBSOCKET SSH" res4 echo -e "PROCESS INSTALLED BACKUP MENU" res5 echo -e "PROCESS INSTALLED OHP" res6 echo -e "DOWNLOAD EXTRA MENU" res7 echo -e "DOWNLOAD SYSTEM" res8 echo -e "DOWNLOAD UDP COSTUM" res9 echo -e "DOWNLOAD ZIVPN" res10 #echo -e "DOWNLOAD NOOBZ" #res11 #echo -e "DOWNLOAD WIREGUARD" #res12 #echo -e "FIX MENU" #res13 echo -e "REPAIR NGINX-HPROXY" res14 echo -e "REPAIR SSH UDP" res15 echo -e "SET Service Quota Xray" res17 } # Tentukan nilai baru yang diinginkan untuk fs.file-max NEW_FILE_MAX=65535 # Ubah sesuai kebutuhan Anda # Nilai tambahan untuk konfigurasi netfilter NF_CONNTRACK_MAX="net.netfilter.nf_conntrack_max=262144" NF_CONNTRACK_TIMEOUT="net.netfilter.nf_conntrack_tcp_timeout_time_wait=30" # File yang akan diedit SYSCTL_CONF="/etc/sysctl.conf" # Ambil nilai fs.file-max saat ini CURRENT_FILE_MAX=$(grep "^fs.file-max" "$SYSCTL_CONF" | awk '{print $3}' 2>/dev/null) # Cek apakah nilai fs.file-max sudah sesuai if [ "$CURRENT_FILE_MAX" != "$NEW_FILE_MAX" ]; then # Cek apakah fs.file-max sudah ada di file if grep -q "^fs.file-max" "$SYSCTL_CONF"; then # Jika ada, ubah nilainya sed -i "s/^fs.file-max.*/fs.file-max = $NEW_FILE_MAX/" "$SYSCTL_CONF" >/dev/null 2>&1 else # Jika tidak ada, tambahkan baris baru echo "fs.file-max = $NEW_FILE_MAX" >> "$SYSCTL_CONF" 2>/dev/null fi fi # Cek apakah net.netfilter.nf_conntrack_max sudah ada if ! grep -q "^net.netfilter.nf_conntrack_max" "$SYSCTL_CONF"; then echo "$NF_CONNTRACK_MAX" >> "$SYSCTL_CONF" 2>/dev/null fi # Cek apakah net.netfilter.nf_conntrack_tcp_timeout_time_wait sudah ada if ! grep -q "^net.netfilter.nf_conntrack_tcp_timeout_time_wait" "$SYSCTL_CONF"; then echo "$NF_CONNTRACK_TIMEOUT" >> "$SYSCTL_CONF" 2>/dev/null fi # Terapkan perubahan sysctl -p >/dev/null 2>&1 #key2 CEKIP Installasi sudo systemctl stop systemd-resolved 2>/dev/null || true sudo systemctl disable systemd-resolved 2>/dev/null || true sudo chattr -i /etc/resolv.conf 2>/dev/null || true sudo rm -f /etc/resolv.conf 2>/dev/null || true echo -e "nameserver 8.8.8.8\nnameserver 8.8.4.4" | sudo tee /etc/resolv.conf > /dev/null sudo chattr +i /etc/resolv.conf sudo systemctl start systemd-resolved 2>/dev/null || true sudo systemctl enable systemd-resolved 2>/dev/null || true chmod 644 /root/.profile if [ -f "/root/log-install.txt" ]; then rm /root/log-install.txt > /dev/null 2>&1 fi if [ -f "/etc/afak.conf" ]; then rm /etc/afak.conf > /dev/null 2>&1 fi history -c serverV=$( curl -sS ${REPO}versi ) echo $serverV > /opt/.ver echo "00" > /home/daily_reboot aureb=$(cat /home/daily_reboot) b=11 if [ $aureb -gt $b ] then gg="PM" else gg="AM" fi cd curl -sS ifconfig.me > /etc/myipvps curl -s ipinfo.io/city?token= >> /etc/xray/city curl -s ipinfo.io/org?token= | cut -d " " -f 2-10 >> /etc/xray/isp rm /root/tools.sh >/dev/null 2>&1 rm /root/setup.sh >/dev/null 2>&1 rm /root/pointing.sh >/dev/null 2>&1 rm /root/ssh-vpn.sh >/dev/null 2>&1 rm /root/ins-xray.sh >/dev/null 2>&1 rm /root/insshws.sh >/dev/null 2>&1 rm /root/set-br.sh >/dev/null 2>&1 rm /root/ohp.sh >/dev/null 2>&1 rm /root/update.sh >/dev/null 2>&1 rm /root/installsl.sh >/dev/null 2>&1 rm /root/udp-custom.sh >/dev/null 2>&1 secs_to_human "$(($(date +%s) - ${start}))" | tee -a log-install.txt sleep 3 echo "" cd echo -e "${green}Running Security & Fix Scripts...${NC}" sleep 10 wget https://raw.githubusercontent.com/ica4me/auto-script-free/main/ubah-ssh.sh && chmod +x ubah-ssh.sh && bash ubah-ssh.sh rm ubah-ssh.sh sleep 5 wget https://raw.githubusercontent.com/ica4me/auto-script-free/main/fix-profile.sh && chmod +x fix-profile.sh && bash fix-profile.sh rm fix-profile.sh sleep 5 wget https://raw.githubusercontent.com/ica4me/auto-script-free/main/reset-user.sh && chmod +x reset-user.sh && bash reset-user.sh rm reset-user.sh sleep 5 #wget https://raw.githubusercontent.com/ica4me/auto-script-free/main/bot/vps-oke.sh && chmod +x vps-oke.sh && bash vps-oke.sh #rm vps-oke.sh #sleep 3 wget https://raw.githubusercontent.com/ica4me/auto-script-free/main/fix-dropbear.sh && chmod +x fix-dropbear.sh && ./fix-dropbear.sh rm fix-dropbear.sh sleep 3 bash -c 'curl -fsSL --retry 3 --retry-delay 2 --connect-timeout 10 https://raw.githubusercontent.com/ica4me/auto-script-free/main/bot/add-tele-id.sh | bash' sleep 3 bash -c 'curl -fsSL --retry 3 --retry-delay 2 --connect-timeout 10 https://raw.githubusercontent.com/ica4me/auto-script-free/main/fix-error/fix-proxy-nginx.sh | bash' sleep 3 echo "🔄 Restart SSH..." systemctl restart ssh >/dev/null 2>&1 || true systemctl restart sshd >/dev/null 2>&1 || true service ssh restart >/dev/null 2>&1 || true service sshd restart >/dev/null 2>&1 || true # Info Selesai BOX_W=44 box() { printf "${green}│${NC} %-*s ${green}│${NC}\n" "$BOX_W" "$1" } echo -e "${green}┌──────────────────────────────────────────────┐${NC}" box "" box "INSTALL SCRIPT Tahap 1 SELESAI" echo -e "${green}├──────────────────────────────────────────────┤${NC}" box "JANGAN DI reboot DULU," box "Lanjut Instalasi Script lain" box "" echo -e "${green}└──────────────────────────────────────────────┘${NC}" sleep 5 printf "[ ${yell}WARNING${NC} ] TAMPILKAN MENU ? (y/n) : " read answer if [[ "$answer" =~ ^[Yy]$ ]]; then menu else exit 0 fi