forked from Weera1234/DNS-AGN
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall
80 lines (80 loc) · 4.02 KB
/
install
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
#!/bin/bash
clear
fun_bar () {
comando[0]="$1"
comando[1]="$2"
(
[[ -e $HOME/fim ]] && rm $HOME/fim
${comando[0]} -y > /dev/null 2>&1
${comando[1]} -y > /dev/null 2>&1
touch $HOME/fim
) > /dev/null 2>&1 &
tput civis
echo -ne " \033[1;33mWAIT \033[1;37m- \033[1;33m["
while true; do
for((i=0; i<18; i++)); do
echo -ne "\033[1;31m#"
sleep 0.1s
done
[[ -e $HOME/fim ]] && rm $HOME/fim && break
echo -e "\033[1;33m]"
sleep 1s
tput cuu1
tput dl1
echo -ne " \033[1;33mWAIT \033[1;37m- \033[1;33m["
done
echo -e "\033[1;33m]\033[1;37m -\033[1;32m OK !\033[1;37m"
tput cnorm
}
clear
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
tput setaf 7 ; tput setab 4 ; tput bold ; printf '%40s%s%-12s\n' "SLOWDNS MANAGER INSTALLER" ; tput sgr0
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
echo -e ""
echo -e " This script will do the installation"
echo -e " manager for SlowDNS connection mode."
echo -e ""
echo -e " \033[1;33mInstaller made by @Laael and Modded/Translated by @KhaledAGN ❤️ \033[1;37m"
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
echo ""
echo -e "DOWLOADING DEPENDENCIES..."
echo ""
fun_att () {
apt install ncurses-utils -y
mkdir /etc/slowdns
cd /etc/slowdns
wget https://github.com/khaledagn/DNS-AGN/raw/main/dns-server; chmod +x dns-server
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/remove-slow; chmod +x remove-slow
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns-info; chmod +x slowdns-info
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns-drop; chmod +x slowdns-drop
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns-ssh; chmod +x slowdns-ssh
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns-ssl; chmod +x slowdns-ssl
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns-socks; chmod +x slowdns-socks
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/slowdns; chmod +x slowdns; cp slowdns /bin/
wget https://raw.githubusercontent.com/khaledagn/DNS-AGN/main/stopdns; chmod +x stopdns
}
fun_bar 'fun_att'
echo -e "CONFIGURING FIREWALL..."
echo ""
fun_ports () {
apt install firewalld -y && sudo firewall-cmd --zone=public --permanent --add-port=80/tcp && sudo firewall-cmd --zone=public --permanent --add-port=8080/tcp && sudo firewall-cmd --zone=public --permanent --add-port=443/tcp && sudo firewall-cmd && sudo firewall-cmd --zone=public --permanent --add-port=53/udp && sudo firewall-cmd --zone=public --permanent --add-port=5300/udp && sudo firewall-cmd && sudo firewall-cmd --zone=public --permanent --add-port=2222/tcp && sudo firewall-cmd --reload
}
fun_bar 'fun_ports'
echo -e "SETTING CLOUDFLARE DNS..."
echo ""
fun_dnscf () {
sudo systemctl disable systemd-resolved.service && sudo systemctl stop systemd-resolved.service && sudo mv /etc/resolv.conf /etc/resolv.conf.bkp && echo "nameserver 1.1.1.1" > /etc/resolv.conf
sudo systemctl enable systemd-resolved.service && sudo systemctl start systemd-resolved.service
sleep 2
}
fun_bar 'fun_dnscf'
clear
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
tput setaf 7 ; tput setab 4 ; tput bold ; printf '%40s%s%-12s\n' "SLOWDNS MANAGER INSTALLER" ; tput sgr0
echo -e "\033[1;31m════════════════════════════════════════════════════\033[0m"
echo ""
echo -e " \033[1;33mINSTALLATION COMPLETED!\033[0m "
echo ""
echo -e "To open the menu, use the command: \033[1;33mslowdns\033[0m"
cd
rm install