-
Notifications
You must be signed in to change notification settings - Fork 2
/
faketls.sh
44 lines (35 loc) · 1.18 KB
/
faketls.sh
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
#!/bin/bash
if [ ! -f FTT ]; then
wget "https://raw.githubusercontent.com/radkesvat/FakeTlsTunnel/master/install.sh" -O install.sh && chmod +x install.sh && bash install.sh
fi
read -p "Select 'i' for internal and 'o' for outside server : " choice
read -p "Enter the port number: " port
read -p "Enter the tunneling port number: " tport
read -p "Enter the service number: " number
if [[ "$choice" == "i" ]]; then
read -p "Enter your ip: " ip
execstart="--tunnel --lport:$port --toip:$ip --toport:$tport --sni:data.services.jetbrains.com --password:doodool --terminate:6"
else
execstart="--server --lport:$tport --toip:127.0.0.1 --toport:$port --sni:data.services.jetbrains.com --password:doodool --terminate:6"
fi
echo "[Unit]
Description=Faketls tunnel $number
After=network.target
Wants=network.target
[Service]
Type=simple
ExecStart=/root/FTT $execstart
Restart=always
RestartSec=3
LimitNOFILE=infinity
StandardOutput=null
StandardError=null
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/ftt$number.service
ufw allow $tport
ufw allow $port
systemctl daemon-reload
systemctl enable ftt$number
systemctl start ftt$number
systemctl restart ftt$number
systemctl status ftt$number