-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathsetup2.sh
More file actions
202 lines (192 loc) · 8.64 KB
/
Copy pathsetup2.sh
File metadata and controls
202 lines (192 loc) · 8.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
#!/bin/bash
# =========================================
# Quick Setup | Script Setup Manager
# Edition : Stable Edition V1.0
# Auther : NevermoreSSH
# (C) Copyright 2022
# =========================================
clear
DEFBOLD='\e[39;1m'
RB='\e[31;1m'
GB='\e[32;1m'
YB='\e[33;1m'
BB='\e[34;1m'
MB='\e[35;1m'
CB='\e[35;1m'
WB='\e[37;1m'
red='\e[1;31m'
green='\e[0;32m'
purple='\e[0;35m'
orange='\e[0;33m'
NC='\e[0m'
export Server_URL="raw.githubusercontent.com/NevermoreSSH/yourpath/main"
dateFromServer=$(curl -v --insecure --silent https://google.com/ 2>&1 | grep Date | sed -e 's/< Date: //')
biji=`date +"%Y-%m-%d" -d "$dateFromServer"`
##########################
MYIP=$(wget -qO- ipv4.icanhazip.com);
MYIP=$(curl -s ipinfo.io/ip )
MYIP=$(curl -sS ipv4.icanhazip.com)
MYIP=$(curl -sS ifconfig.me )
echo "Checking VPS"
clear
red='\e[1;31m'
green='\e[0;32m'
yell='\e[1;33m'
tyblue='\e[1;36m'
purple='\e[0;35m'
NC='\e[0m'
purple() { echo -e "\\033[35;1m${*}\\033[0m"; }
tyblue() { echo -e "\\033[36;1m${*}\\033[0m"; }
yellow() { echo -e "\\033[33;1m${*}\\033[0m"; }
green() { echo -e "\\033[32;1m${*}\\033[0m"; }
red() { echo -e "\\033[31;1m${*}\\033[0m"; }
red='\e[1;31m'
green='\e[0;32m'
NC='\e[0m'
green() { echo -e "\\033[32;1m${*}\\033[0m"; }
red() { echo -e "\\033[31;1m${*}\\033[0m"; }
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
MYIP=$(wget -qO- icanhazip.com/ip);
MYIP=$(curl -s ipinfo.io/ip )
MYIP=$(curl -sS ipv4.icanhazip.com)
MYIP=$(curl -sS ifconfig.me )
secs_to_human() {
echo "Installation time : $(( ${1} / 3600 )) hours $(( (${1} / 60) % 60 )) minutes $(( ${1} % 60 )) seconds"
}
start=$(date +%s)
echo -e "[ ${green}INFO${NC} ] Preparing the autoscript installation ~"
apt install git curl -y >/dev/null 2>&1
echo -e "[ ${green}INFO${NC} ] Installation file is ready to begin !"
sleep 1
if [ -f "/usr/local/etc/xray/domain" ]; then
echo "Script Already Installed"
exit 0
fi
mkdir /var/lib/premium-script;
mkdir /var/lib/crot-script;
clear
#echo -e "${red}♦️${NC} ${green}Established By NevermoreSSH 2022${NC} ${red}♦️${NC}"
#DOWNLOAD SOURCE SCRIPT
echo -e "${red} ♦️${NC} ${green} CUSTOM SETUP DOMAIN VPS ${NC}"
echo -e "${red}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m${NC}"
echo "1. Use Domain From Script / Gunakan Domain Dari Script"
echo "2. Choose Your Own Domain / Pilih Domain Sendiri"
echo -e "${red}━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\033[0m${NC}"
read -rp "Choose Your Domain Installation : " dom
if test $dom -eq 1; then
clear
wget -q -O /root/cf.sh "https://${Server_URL}/cf.sh"
chmod +x /root/cf.sh
./cf.sh
elif test $dom -eq 2; then
read -rp "Enter Your Domain : " domen
echo $domen > /root/domain
else
echo "Not Found Argument"
exit 1
fi
echo -e "${GREEN}Done!${NC}"
sleep 2
clear
echo "IP=$host" >> /var/lib/premium-script/ipvps.conf
echo "IP=$host" >> /var/lib/crot-script/ipvps.conf
echo "$host" >> /root/domain
#clear
#echo -e "\e[0;32mREADY FOR INSTALLATION SCRIPT...\e[0m"
#echo -e ""
#sleep 1
#Install SSH-VPN
echo -e "\e[0;32mINSTALLING SSH-VPN...\e[0m"
sleep 1
wget https://${Server_URL}/ssh-vpn2.sh && chmod +x ssh-vpn2.sh && ./ssh-vpn2.sh
sleep 3
clear
echo -e "\e[0;32mINSTALLING XRAY CORE...\e[0m"
sleep 3
wget -q -O /root/xray2.sh "https://${Server_URL}/xray2.sh"
chmod +x /root/xray2.sh
./xray2.sh
echo -e "${GREEN}Done!${NC}"
sleep 2
clear
#Install SET-BR
echo -e "\e[0;32mINSTALLING SET-BR...\e[0m"
sleep 1
wget -q -O /root/set-br.sh "https://${Server_URL}/set-br.sh"
chmod +x /root/set-br.sh
./set-br.sh
echo -e "${GREEN}Done!${NC}"
sleep 2
clear
#rm -rf /usr/share/nginx/html/index.html
#wget -q -O /usr/share/nginx/html/index.html "https://raw.githubusercontent.com/NevermoreSSH/yourpath/main/OTHERS/index.html"
# Finish
rm -f /root/ins-xray.sh
rm -f /root/set-br.sh
rm -f /root/ssh-vpn.sh
# Version
echo "1.0" > /home/ver
clear
echo ""
echo -e "${RB} .-------------------------------------------.${NC}"
echo -e "${RB} |${NC} ${CB}Installation Has Been Completed${NC} ${RB}|${NC}"
echo -e "${RB} '-------------------------------------------'${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${WB}Multiport Websocket Autoscript By NevermoreSSH${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${WB}»»» Protocol Service ««« | »»» Network Protocol «««${NC} "
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${RB}♦️${NC} ${YB}Vmess Websocket${NC} ${WB}|${NC} ${YB}- Websocket (CDN) TLS${NC}"
echo -e " ${RB}♦️${NC} ${YB}Vless Websocket${NC} ${WB}|${NC} ${YB}- Websocket (CDN) NTLS${NC}"
echo -e " ${RB}♦️${NC} ${YB}Trojan Websocket${NC} ${WB}|${NC} ${YB}- TCP XTLS${NC}"
echo -e " ${RB}♦️${NC} ${YB}Trojan TCP XTLS${NC} ${WB}|${NC} ${YB}- TCP TLS${NC}"
echo -e " ${RB}♦️${NC} ${YB}Trojan TCP${NC} ${WB}|${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${WB}»»» YAML Service Information «««${NC} "
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${RB}♦️${NC} ${YB}YAML XRAY VMESS WS${NC}"
echo -e " ${RB}♦️${NC} ${YB}YAML XRAY VLESS WS${NC}"
echo -e " ${RB}♦️${NC} ${YB}YAML XRAY TROJAN WS${NC}"
echo -e " ${RB}♦️${NC} ${YB}YAML XRAY TROJAN XTLS${NC}"
echo -e " ${RB}♦️${NC} ${YB}YAML XRAY TROJAN TCP${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${WB}»»» Server Information «««${NC} "
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${RB}♦️${NC} ${YB}Timezone : Asia/Kuala_Lumpur (GMT +8)${NC}"
echo -e " ${RB}♦️${NC} ${YB}Fail2Ban : [ON]${NC}"
echo -e " ${RB}♦️${NC} ${YB}Dflate : [ON]${NC}"
echo -e " ${RB}♦️${NC} ${YB}IPtables : [ON]${NC}"
echo -e " ${RB}♦️${NC} ${YB}Auto-Reboot : [ON]${NC}"
echo -e " ${RB}♦️${NC} ${YB}IPV6 : [OFF]${NC}"
echo -e ""
echo -e " ${RB}♦️${NC} ${YB}Autoreboot On 06.00 GMT +8${NC}"
echo -e " ${RB}♦️${NC} ${YB}Backup & Restore VPS Data${NC}"
echo -e " ${RB}♦️${NC} ${YB}Automatic Delete Expired Account${NC}"
echo -e " ${RB}♦️${NC} ${YB}Bandwith Monitor${NC}"
echo -e " ${RB}♦️${NC} ${YB}RAM & CPU Monitor${NC}"
echo -e " ${RB}♦️${NC} ${YB}Check Login User${NC}"
echo -e " ${RB}♦️${NC} ${YB}Check Created Config${NC}"
echo -e " ${RB}♦️${NC} ${YB}Automatic Clear Log${NC}"
echo -e " ${RB}♦️${NC} ${YB}Media Checker${NC}"
echo -e " ${RB}♦️${NC} ${YB}DNS Changer${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${WB}»»» Network Port Service «««${NC} "
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo -e " ${RB}♦️${NC} ${YB}HTTP : 80, 8080, 8880${NC}"
echo -e " ${RB}♦️${NC} ${YB}HTTPS : 443${NC}"
echo -e "${BB}————————————————————————————————————————————————————————${NC}"
echo ""
secs_to_human "$(($(date +%s) - ${start}))"
echo ""
rm -r setup2.sh
echo ""
echo ""
read -p "$( echo -e "Press ${orange}[ ${NC}${green}Enter${NC} ${CYAN}]${NC} For Reboot") "
reboot