forked from panduola5566yy/SSH-XRAY
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathsl-fix
45 lines (38 loc) · 1.2 KB
/
sl-fix
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
#!/bin/bash
# ==========================================
cd /usr/bin
rm -rf restart
rm -r restart
rm restart
rm -r sslh-fix-reboot
rm -rf sslh-fix-reboot
rm sslh-fix-reboot
cd /usr/bin
wget -O sslh-fix-reboot "https://raw.githubusercontent.com/MyMasWayVPN/SSH-XRAY/main/sslh-fix-reboot.sh"
wget -O restart "https://raw.githubusercontent.com/MyMasWayVPN/SSH-XRAY/main/menu/restart.sh"
cd /usr/bin
chmod +x sslh-fix-reboot
chmod +x restart
cd /root/
# nano /etc/rc.local
cat > /etc/rc.local <<-END
#!/bin/sh -e
# rc.local
# By default this script does nothing.
sslh-fix-reboot
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7100 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7200 --max-clients 500
screen -dmS badvpn badvpn-udpgw --listen-addr 127.0.0.1:7300 --max-clients 500
iptables -I INPUT -p udp --dport 5300 -j ACCEPT
iptables -t nat -I PREROUTING -p udp --dport 53 -j REDIRECT --to-ports 5300
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
cd /root/