#!/bin/bash # Script By SL # 2022 SLOWDNS # =============================================== cd rm -rf slhostdns.sh wget https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/slhostdns.sh && chmod +x slhostdns.sh && ./slhostdns.sh nameserver=$(cat /root/nsdomain) apt update -y apt install -y python3 python3-dnslib net-tools apt install ncurses-utils -y apt install dnsutils -y apt install golang -y apt install git -y apt install curl -y apt install wget -y apt install ncurses-utils -y apt install screen -y apt install cron -y apt install iptables -y apt install -y git screen whois dropbear wget apt install -y pwgen python php jq curl apt install -y sudo gnutls-bin apt install -y mlocate dh-make libaudit-dev build-essential apt install -y dos2unix debconf-utils service cron reload service cron restart #sl-fix cd /usr/bin wget -O sl-fix "https://raw.githubusercontent.com/fisabiliyusri/Mantap/main/sslh-fix/sl-fix" chmod +x sl-fix sl-fix cd echo "Port 3369" >> /etc/ssh/sshd_config echo "Port 2269" >> /etc/ssh/sshd_config sed -i 's/#AllowTcpForwarding yes/AllowTcpForwarding yes/g' /etc/ssh/sshd_config rm -rf /etc/slowdns mkdir -m 777 /etc/slowdns wget -q -O /etc/slowdns/server.key "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/server.key" wget -q -O /etc/slowdns/server.pub "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/server.pub" wget -q -O /etc/slowdns/sldns-server "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/sldns-server" wget -q -O /etc/slowdns/sldns-client "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/sldns-client" cd chmod +x /etc/slowdns/server.key chmod +x /etc/slowdns/server.pub chmod +x /etc/slowdns/sldns-server chmod +x /etc/slowdns/sldns-client cd #wget -q -O /etc/systemd/system/client-sldns.service "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/client-sldns.service" #wget -q -O /etc/systemd/system/server-sldns.service "https://raw.githubusercontent.com/fisabiliyusri/SLDNS/main/slowdns/server-sldns.service" cd #install client-sldns.service cat > /etc/systemd/system/client-sldns.service << END [Unit] Description=Client SlowDNS By SL Documentation=https://nekopoi.care After=network.target nss-lookup.target [Service] Type=simple User=root CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/etc/slowdns/sldns-client -udp 8.8.8.8:53 --pubkey-file /etc/slowdns/server.pub $nameserver 127.0.0.1:3369 Restart=on-failure [Install] WantedBy=multi-user.target END cd #install server-sldns.service cat > /etc/systemd/system/server-sldns.service << END [Unit] Description=Server SlowDNS By SL Documentation=https://nekopoi.care After=network.target nss-lookup.target [Service] Type=simple User=root CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE AmbientCapabilities=CAP_NET_ADMIN CAP_NET_BIND_SERVICE NoNewPrivileges=true ExecStart=/etc/slowdns/sldns-server -udp :5300 -privkey-file /etc/slowdns/server.key $nameserver 127.0.0.1:2269 Restart=on-failure [Install] WantedBy=multi-user.target END cd chmod +x /etc/systemd/system/client-sldns.service chmod +x /etc/systemd/system/server-sldns.service pkill sldns-server pkill sldns-client systemctl daemon-reload systemctl stop client-sldns systemctl stop server-sldns systemctl enable client-sldns systemctl enable server-sldns systemctl start client-sldns systemctl start server-sldns systemctl restart client-sldns systemctl restart server-sldns cd