Update SpecialProxy.sh

This commit is contained in:
mmmdbybyd 2019-02-28 07:28:39 +08:00 committed by GitHub
parent 434fc94a89
commit a4c9932ec1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,6 +12,7 @@ do
[ "$server_port" -gt "0" -a "$server_port" -lt "65536" ] && break [ "$server_port" -gt "0" -a "$server_port" -lt "65536" ] && break
echo "Please input 1-65535." echo "Please input 1-65535."
done done
read -p "Please input SpecialProxy proxy header(default is 'Meng'): " proxy_header
echo -n "Please input SpecialProxy encode code(default is 0, no encode): " echo -n "Please input SpecialProxy encode code(default is 0, no encode): "
read encodeCode read encodeCode
apt-get -y gcc make git || yum install -y gcc make git apt-get -y gcc make git || yum install -y gcc make git
@ -20,6 +21,6 @@ git clone https://github.com/mmmdbybyd/SpecialProxy.git
cd SpecialProxy cd SpecialProxy
make || Exit "\033[41;37mcompile tinyproxy failed\033[0m" make || Exit "\033[41;37mcompile tinyproxy failed\033[0m"
dnsip=`grep nameserver /etc/resolv.conf | grep -Eo '[1-9]{1,3}[0-9]{0,2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -n 1` dnsip=`grep nameserver /etc/resolv.conf | grep -Eo '[1-9]{1,3}[0-9]{0,2}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}' | head -n 1`
./SpecialProxy -l $server_port -p Meng -d ${dnsip:-114.114.114.114} -e ${encodeCode:-0} && \ ./SpecialProxy -l $server_port -p ${proxy_header:-Meng} -t 5 -d ${dnsip:-114.114.114.114} -e ${encodeCode:-0} && \
Exit "\033[32mSpeciaoProxy is running.\033[0m" || \ Exit "\033[32mSpeciaoProxy is running.\033[0m" || \
Exit "\033[41;37mSpeciaoProxy is stopping.\033[0m" Exit "\033[41;37mSpeciaoProxy is stopping.\033[0m"