Skip to content

Commit

Permalink
Update mtproxy.sh
Browse files Browse the repository at this point in the history
增加 mtproto-proxy 二进制版,免去编译及装依赖的部分。
  • Loading branch information
ellermister committed Aug 24, 2020
1 parent ead80b5 commit b708809
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions mtproxy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,29 +70,41 @@ install(){
xxd_status=0
fi

if check_sys packageManager yum; then
yum install -y openssl-devel zlib-devel
yum groupinstall -y "Development Tools"
if [ $xxd_status == 0 ];then
if [[ "`uname -m`" != "x86_64" ]]; then
if check_sys packageManager yum; then
yum install -y openssl-devel zlib-devel
yum groupinstall -y "Development Tools"
if [ $xxd_status == 0 ];then
yum install -y vim-common
fi
elif check_sys packageManager apt; then
apt-get -y update
apt install -y git curl build-essential libssl-dev zlib1g-dev
if [ $xxd_status == 0 ];then
apt install -y vim-common
fi
fi
else
if check_sys packageManager yum && [ $xxd_status == 0 ]; then
yum install -y vim-common
fi
elif check_sys packageManager apt; then
apt-get -y update
apt install -y git curl build-essential libssl-dev zlib1g-dev
if [ $xxd_status == 0 ];then
elif check_sys packageManager apt && [ $xxd_status == 0 ]; then
apt-get -y update
apt install -y vim-common
fi
fi



if [ ! -d 'MTProxy' ];then
git clone https://github.com/TelegramMessenger/MTProxy
fi;
cd MTProxy
make && cd objs/bin
cp -f $WORKDIR/MTProxy/objs/bin/mtproto-proxy $WORKDIR
cd $WORKDIR
if [[ "`uname -m`" != "x86_64" ]];then
if [ ! -d 'MTProxy' ];then
git clone https://github.com/TelegramMessenger/MTProxy
fi;
cd MTProxy
make && cd objs/bin
cp -f $WORKDIR/MTProxy/objs/bin/mtproto-proxy $WORKDIR
cd $WORKDIR
else
wget https://github.com/ellermister/mtproxy/releases/download/0.01/mtproto-proxy -O mtproto-proxy -q
chmod +x mtproto-proxy
fi
}


Expand Down

0 comments on commit b708809

Please sign in to comment.