1 Star 0 Fork 888

大饼/project_26514798

forked from 狂奔的蜗牛./goproxy 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
install_auto.sh 1.20 KB
一键复制 编辑 原始数据 按行查看 历史
snail007 提交于 2022-06-07 18:36 . update
#!/bin/bash
F="proxy-linux-amd64.tar.gz"
set -e
if [ -e /tmp/proxy ]; then
rm -rf /tmp/proxy
fi
mkdir /tmp/proxy
cd /tmp/proxy
echo -e "\n>>> downloading ... $F\n"
manual="https://snail007.host900.com/goproxy/manual/zh/"
LAST_VERSION=$(curl --silent "https://mirrors.host900.com/https://api.github.com/repos/snail007/goproxy/releases/latest" | grep -Po '"tag_name":"\K.*?(?=")')
wget -t 1 "https://mirrors.host900.com/https://github.com/snail007/goproxy/releases/download/${LAST_VERSION}/$F"
echo -e ">>> installing ... \n"
# #install proxy
tar zxvf $F >/dev/null 2>&1
set +e
killall -9 proxy >/dev/null 2>&1
set -e
cp -f proxy /usr/bin/
chmod +x /usr/bin/proxy
if [ ! -e /etc/proxy ]; then
mkdir /etc/proxy
cp blocked /etc/proxy
cp direct /etc/proxy
fi
if [ ! -e /etc/proxy/proxy.crt ]; then
cd /etc/proxy/
proxy keygen -C proxy >/dev/null 2>&1
fi
rm -rf /tmp/proxy
version=`proxy --version 2>&1`
echo -e ">>> install done, thanks for using snail007/goproxy $version\n"
echo -e ">>> install path /usr/bin/proxy\n"
echo -e ">>> configuration path /etc/proxy\n"
echo -e ">>> uninstall just exec : rm /usr/bin/proxy && rm -rf /etc/proxy\n"
echo -e ">>> How to using? Please visit : $manual\n"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/zz_com_zz/proxy.git
git@gitee.com:zz_com_zz/proxy.git
zz_com_zz
proxy
project_26514798
master

搜索帮助