1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #!/bin/bash
- red='\e[1;31m'
- green='\e[0;32m'
- NC='\e[0m'
- MYIP=$(wget -qO- icanhazip.com);
- echo "Script By Senovpn"
- clear
- source /var/lib/premium-script/ipvps.conf
- if [[ "$IP" = "" ]]; then
- domain=$(cat /etc/v2ray/domain)
- else
- domain=$IP
- fi
- tls="$(cat ~/log-install.txt | grep -w "Vless TLS" | cut -d: -f2|sed 's/ //g')"
- none="$(cat ~/log-install.txt | grep -w "Vless None TLS" | cut -d: -f2|sed 's/ //g')"
- until [[ $user =~ ^[a-zA-Z0-9_]+$ && ${CLIENT_EXISTS} == '0' ]]; do
- read -rp "User: " -e user
- CLIENT_EXISTS=$(grep -w $user /etc/v2ray/vless.json | wc -l)
- if [[ ${CLIENT_EXISTS} == '1' ]]; then
- echo ""
- echo "A client with the specified name was already created, please choose another name."
- exit 1
- fi
- done
- uuid=$(cat /proc/sys/kernel/random/uuid)
- read -p "Expired (days): " masaaktif
- exp=`date -d "$masaaktif days" +"%d-%m-%Y"`
- created=`date -d "0 days" +"%d-%m-%Y"`
- sed -i '/#tls$/a\### '"$user $exp"'\
- },{"id": "'""$uuid""'","email": "'""$user""'"' /etc/v2ray/vless.json
- sed -i '/#none$/a\### '"$user $exp"'\
- },{"id": "'""$uuid""'","email": "'""$user""'"' /etc/v2ray/vnone.json
- vlesslink1="vless://${uuid}@${domain}:$tls?path=https://t.me/sampiiiiu&security=tls&encryption=none&type=ws#${user}"
- vlesslink2="vless://${uuid}@${domain}:$none?path=https://t.me/sampiiiiu&encryption=none&type=ws#${user}"
- systemctl restart v2ray@vless
- systemctl restart v2ray@vnone
- clear
- echo -e ""
- echo -e "==========-V2RAY/VLESS-=========="
- echo -e "Remarks : ${user}"
- echo -e "Domain : ${domain}"
- echo -e "port TLS : $tls"
- echo -e "port none TLS : $none"
- echo -e "id : ${uuid}"
- echo -e "Encryption : none"
- echo -e "network : ws"
- echo -e "path : https://t.me/sampiiiiu"
- echo -e "Created : $created"
- echo -e "Expired : $exp"
- echo -e "================================="
- echo -e "link TLS : ${vlesslink1}"
- echo -e "================================="
- echo -e "link none TLS : ${vlesslink2}"
- echo -e "================================="
- echo -e ""
- echo -e "Script By Senovpn"
- echo -e ""
|