-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmtpup.sh
More file actions
29 lines (22 loc) · 1.17 KB
/
mtpup.sh
File metadata and controls
29 lines (22 loc) · 1.17 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
#!/bin/bash
export DIR="/opt"
export BINDIR="/opt/MTProxy/objs/bin"
export CronFile="/etc/cron.daily/mtproxy-multi"
BOLD='\033[1m' # ${BOLD}
LGREEN='\033[1;32m' # ${LGREEN}
LBLUE='\033[1;34m' # ${LBLUE}
BGGREEN='\033[42m' # ${BGGREEN}
BGGRAY='\033[47m' # ${BGGRAY}
BREAK='\033[m' # ${BREAK}
systemctl stop mtproxy
echo -en "${BOLD}Save iptables rules file...${BREAK}\n\n"
mv ${BINDIR}/iptables.sh /tmp/iptables.sh
echo -en "\n${BOLD} Script Update MTProto Proxy Files${BREAK}\n\n"
cd $DIR && rm -rf MTProxy && git clone https://github.com/TelegramMessenger/MTProxy && cd MTProxy && make
cd $DIR/MTProxy/objs/bin && curl -s https://core.telegram.org/getProxySecret -o proxy-secret && curl -s https://core.telegram.org/getProxyConfig -o proxy-multi.conf
mv /tmp/iptables.sh ${BINDIR}/iptables.sh
systemctl start mtproxy
echo -e "===================================\n"
echo -en "${LGREEN}Update Complete!${BREAK}\n"
echo -en "check status ${BOLD}systemctl status mtproxy${BREAK}\n"
echo -en "In this version, you need add dd before hex secret! ${BOLD}dd+secret makes clients add random padding to some packets to make DPI detection of mtproxy harder${BREAK}\n"